-
- Downloads
[FIX] stock_account: don't update inventory valuation for negative quantity
Expected Behaviour When updating the cost of a product with a negative quantity and then making an inventory adjustment, the final value should be corrected according to the current cost of the product Observed Behaviour In the case we had a negative quantity when changing the cost, the compensation layer will be ignored when doing an inventory adjustment afterward, leading to an incorrect total value in the inventory valuation Reproducibility This bug can be reproduced following these steps: - Create Storable product with costing method = AVCO Automated, Update cost to 100$ - Sell 10 units of this product (Inventory valuation at -1000 $ for -10 units) - Update cost of the product to 10 $ (Inventory valuation at -100 $ for -10 units) - Create an inventory adjustment to set the quantity of the product to 0. ==> Inventory valuation is a 900 $ for 0 unit of our product Related Issues/PR - opw-2635692 closes odoo/odoo#86328 X-original-commit: 2e4fdcb8 Signed-off-by:William Henrotin (whe) <whe@odoo.com> Signed-off-by:
Hendrickx Anthony (anhe) <anhe@odoo.com>
Loading
Please register or sign in to comment