-
- Downloads
[FIX] stock_account: round SVL's value of incoming move
The SVL of in/out moves may be different because of rounding To reproduce the issue: (Need purchase,sale_management,stock) 1. In Settings, enable "Multi-Currencies" 2. Edit the USD currency: - Rounding factor: 1.0 3. Create a product category PC: - Costing Method: FIFO 4. Create a product P: - Type: Storable - Category: PC 5. Create a purchase order PO with one line: - Product: P - Quantity: 0.5 - Unit Price: 3.0 - Taxes: None 6. Confirm the PO and receive P 7. Create a sale order SO with 0.5 x P 8. Confirm the SO and deliver P 9. Inventory > Reporting > Inventory Valuation Error: The quantity of P is zero but its total value is 0.50$ When receiving P, a SVL is created but does not round the value. So, we have 0.5 x P in stock with a value equal to $1.50 Then, when deliver the product, the FIFO process is executed and create a second SVL. However, this time the value is rounded: https://github.com/odoo/odoo/blob/2e4fdcb84ba6375bb51fe71355168cebe2d922a0/addons/stock_account/models/product.py#L290 Therefore, the SVL of the out move has a value equal to $2. This explains why, when checking the inventory valuation, the value is $-0.50 OPW-2724864 closes odoo/odoo#89743 X-original-commit: bf9b03a8 Signed-off-by:William Henrotin (whe) <whe@odoo.com> Signed-off-by:
Adrien Widart <awt@odoo.com>
Loading
Please register or sign in to comment