Skip to content
Snippets Groups Projects
Commit b47a3a26 authored by Adrien Widart (awt)'s avatar Adrien Widart (awt)
Browse files

[FIX] {stock,mrp}_account,stock_landed_costs: set product categories properties

[1] is not enough. First, when installing `stock_account`, the
post-install hook will only add `False` values to the first company.
We should do it for all existing ones

Second, the field `property_valuation` is company-dependent:
https://github.com/odoo/odoo/blob/640907ec1852c4e477957c865549a87d3ae840dd/addons/stock_account/models/product.py#L708-L714
And when creating a new company, its value will be (by default)
`manual_periodic`. Therefore, the other properties should also be
set to `False`.

Note about test modification: for the tests in `stock_landed_costs`
module, we set the categ to auto so the stock accounts are defined.
Otherwise, when validating the landed costs, it will lead to an error
https://github.com/odoo/odoo/blob/608ed487b61c81e38a5d0b856732a8b94c6df64a/addons/stock_landed_costs/models/stock_landed_cost.py#L416-L417

[1] 9dc7835c

OPW-2746384

Part-of: odoo/odoo#117920
parent 748de223
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment