-
- Downloads
[FIX] stock_account: avoid negative values after revaluation
When performing a manual stock revaluation, the value difference is distributed
equally among the available stock. This method breaks down however in case of a
devaluation where some items in stock are already valued less than the unit
cost difference: this results in a negative value.
This commit will prevent such devaluations by raising a UserError whenever the
remaining value of a stock.valuation.layer becomes negative. Additionally, after
a revaluation, the standard_price field will now also be updated for fifo valued
products.
opw-3340298
closes odoo/odoo#126157
Signed-off-by:
Arnold Moyaux (arm) <arm@odoo.com>
Showing
- addons/stock_account/i18n/stock_account.pot 5 additions, 0 deletionsaddons/stock_account/i18n/stock_account.pot
- addons/stock_account/tests/test_stock_valuation_layer_revaluation.py 1 addition, 1 deletion...k_account/tests/test_stock_valuation_layer_revaluation.py
- addons/stock_account/tests/test_stockvaluation.py 43 additions, 0 deletionsaddons/stock_account/tests/test_stockvaluation.py
- addons/stock_account/wizard/stock_valuation_layer_revaluation.py 9 additions, 6 deletions...stock_account/wizard/stock_valuation_layer_revaluation.py
Loading