sale_margin_sync
Recomputes sale order margins when related stock move cost prices change.
Key Features
- stock.valuation.layer: creation of valuation layers linked to sale lines triggers margin synchronization for those sales
- stock.valuation.layer: updates to unit_cost automatically refresh linked sale line margins unless explicitly skipped via context
- sale.order.line: purchase price is reset from the linked valuation layer cost for outgoing moves with unit of measure conversion before margin recalculation