You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stock Valuation Layer unit_cost and total_value desynchronization
Module
purchase_stock_price_unit_sync
Describe the bug
When updating the unit price or discount in a confirmed purchase order (purchase.order.line) after a receipt has been completed, the corresponding unit cost (unit_cost) in the stock valuation layer (stock.valuation.layer) is updated correctly, but the total value (total_value) is not recalculated. This leads to an inconsistent stock valuation, where the total inventory value does not match the expected computation:
The stock valuation should remain consistent when price updates affect received inventory.
To Reproduce
Affected versions
Odoo 14.0, 15.0, 16.0 (potentially others)
Steps to reproduce the behavior
Create a purchase order with a product that uses one of the following cost methods:
Standard (standard)
FIFO (fifo)
Average Cost (avco)
Confirm the purchase order and receive the product.
Check the created stock valuation layer (stock.valuation.layer) entry.
Go back to the purchase order line and update the price unit or discount.
Observe that:
unit_cost in the stock valuation layer updates correctly.
value (total_value) remains unchanged, causing an inconsistency.
Expected behavior
When the unit cost (unit_cost) is updated, the corresponding total value should also be recalculated to maintain consistency in stock valuation.
The expected behavior is:
If unit_cost changes due to a price update in a confirmed purchase order, total_value should reflect this new cost.
Additional context
Odoo 14.0, 15.0, 16.0
Standard Odoo modules without modifications.
The issue has been tested with products using Standard, FIFO, and AVCO cost methods, and the behavior remains the same across all methodologies.
Impact
This issue affects accounting accuracy for companies relying on real-time inventory valuation methods (FIFO/AVCO). It may also impact cost-based margin calculations.
Please review and confirm if this is the intended behavior or if it should be adjusted to maintain valuation consistency. Thank you!
The text was updated successfully, but these errors were encountered:
Jaimermaccione
changed the title
Stock Valuation Layer unit_cost and total_value not sync
Purchase_stock_price_unit_sync: Stock Valuation Layer unit_cost and total_value not sync
Jan 29, 2025
Stock Valuation Layer
unit_cost
andtotal_value
desynchronizationModule
purchase_stock_price_unit_sync
Describe the bug
When updating the unit price or discount in a confirmed purchase order (
purchase.order.line
) after a receipt has been completed, the corresponding unit cost (unit_cost
) in the stock valuation layer (stock.valuation.layer
) is updated correctly, but the total value (total_value
) is not recalculated. This leads to an inconsistent stock valuation, where the total inventory value does not match the expected computation:The stock valuation should remain consistent when price updates affect received inventory.
To Reproduce
Affected versions
Steps to reproduce the behavior
standard
)fifo
)avco
)stock.valuation.layer
) entry.unit_cost
in the stock valuation layer updates correctly.value (total_value)
remains unchanged, causing an inconsistency.Expected behavior
When the unit cost (
unit_cost
) is updated, the corresponding total value should also be recalculated to maintain consistency in stock valuation.The expected behavior is:
If
unit_cost
changes due to a price update in a confirmed purchase order,total_value
should reflect this new cost.Additional context
Impact
This issue affects accounting accuracy for companies relying on real-time inventory valuation methods (FIFO/AVCO). It may also impact cost-based margin calculations.
Please review and confirm if this is the intended behavior or if it should be adjusted to maintain valuation consistency. Thank you!
The text was updated successfully, but these errors were encountered: