[FIX] stock_account, purchase_stock: no stock account in manual valuation
Issues:
1) When the inventory valuation is Manual the stock accounts field of the
product category should be empty and they should be set when the
inventory valuation is Automated.
2) For the moment at installation all the categories have the Manual default
value and the comapy account default values for the stock accounts (not
respecting condition 1)
Solutions:
For issue 1 we add checks on the write and create functions of the product
category model so that after creation/modification the instance respect the
condition
For issue 2 we add at the end of the post_hook script some code to set an
empty stock account property for every product category.
opw-2746384
closes odoo/odoo#98379
Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
Showing
- addons/purchase_stock/tests/test_stockvaluation.py 3 additions, 2 deletionsaddons/purchase_stock/tests/test_stockvaluation.py
- addons/stock_account/__init__.py 13 additions, 8 deletionsaddons/stock_account/__init__.py
- addons/stock_account/models/product.py 31 additions, 1 deletionaddons/stock_account/models/product.py
- addons/stock_account/tests/test_stock_valuation_layer_revaluation.py 1 addition, 0 deletions...k_account/tests/test_stock_valuation_layer_revaluation.py
- addons/stock_account/tests/test_stockvaluationlayer.py 1 addition, 2 deletionsaddons/stock_account/tests/test_stockvaluationlayer.py
Loading