[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
Showing
- addons/mrp_account/tests/test_mrp_account.py 1 addition, 1 deletionaddons/mrp_account/tests/test_mrp_account.py
- addons/stock_account/__init__.py 2 additions, 7 deletionsaddons/stock_account/__init__.py
- addons/stock_account/models/account_chart_template.py 2 additions, 0 deletionsaddons/stock_account/models/account_chart_template.py
- addons/stock_account/tests/test_account_move.py 45 additions, 11 deletionsaddons/stock_account/tests/test_account_move.py
- addons/stock_landed_costs/tests/test_stock_landed_costs_purchase.py 4 additions, 0 deletions...ck_landed_costs/tests/test_stock_landed_costs_purchase.py
Loading
Please register or sign in to comment