Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Re: unit test of onchange in v10 - full new api
byOn Sep 27, 2017, at 7:02 AM, Pedro M. Baeza (Tecnativa) <pedro.baeza@tecnativa.com> wrote:Regards.self.assertEqual(...)You can use the new method for making things on cache/memory:product = self.env['product.product'].new({'name': 'Test',})product._onchange...()2017-09-27 15:46 GMT+02:00 Dave Lasley <dave@laslabs.com>:I typically will just make the necessary changes to the record, such as the product in this instance, then run the onchange method. Its all just using the record cache now, so it just works.
-Dave LasleyFor sure expert really could help me here.In OCA test, i haven't found any example where i could understand explicitlyThen i can't understand how can i specify a particular product for my own test.In old api we had `def my_onchange (self, cr, ..., product, pricelist, ...)`Compared to old api there is a behavior I can't reproduceHi guys,I need your advice about unit test and onchange in v10,For test unit, it's easy just call method by replacing product by the product you want test.example hereBut in new api, there is no more argument in onchange method.
where I put my product value.Thanks a lot
Bonne journée
David BEAL - Akretion
Odoo Development / Integration______________________________
_________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe ______________________________
_________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe _______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
Reference
-
unit test of onchange in v10 - full new api
byAkretion France., David BEAL-
Re: unit test of onchange in v10 - full new api
byTecnativa. S. L., Pedro M. Baeza -
Re: unit test of onchange in v10 - full new api
byAkretion France., David BEAL