Files
odoo_source/addons/stock_landed_costs/models
Rémy Voet (ryv) 7256e01ad0 [FIX] stock_landed_cost: efficient validate landed cost
Update the standard_price outside the loop to avoid recompute
quantity_svl at each iteration. quantity_svl is not modify in the
process and the standard_price is not read in process.

NewPrice = OldPrice + (cost_to_add_x1) / quantity_svl + (cost_to_add_x2) / quantity_svl
Becomes
NewPrice = OldPrice + (cost_to_add_x1 + cost_to_add_x2) / quantity_svl
which is equals.

opw-2374405
odoo/odoo#64011

closes odoo/odoo#64032

Forward-port-of: odoo/odoo#63742
X-original-commit: b8d7e48f27fc4f0868c538977be8276058944e57
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-01-05 07:54:32 +00:00
..