Contributors mailing list archives

contributors@odoo-community.org

unit test of onchange in v10 - full new api

by
Akretion France, David BEAL
- 22/08/2017 16:57:27
Hi guys,

I need your advice about unit test and onchange in v10,

Compared to old api there is a behavior I can't reproduce

In old api we had `def my_onchange (self, cr, ..., product, pricelist, ...)`

For test unit, it's easy just call method by replacing product by the product you want test.

example here


But in new api, there is no more argument in onchange method.
Then i can't understand how can i specify a particular product for my own test.

In OCA test, i haven't found any example where i could understand explicitly
where I put my product value.

For sure expert really could help me here.

Thanks a lot

Bonne journée


David BEAL - Akretion
Odoo Development / Integration