diff options
| author | Rémy Voet (ryv) <ryv@odoo.com> | 2021-01-04 15:04:51 +0000 |
|---|---|---|
| committer | Rémy Voet (ryv) <ryv@odoo.com> | 2021-01-04 15:07:48 +0000 |
| commit | b8d7e48f27fc4f0868c538977be8276058944e57 (patch) | |
| tree | 13bb520f1299b1552dfeb6b5b865c9bbadd247ea /addons/web_editor/static/src/js | |
| parent | 209f421b7360a42ab43c09d9aacec6b53ad24917 (diff) | |
[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
Forward-port-of: odoo/odoo#63742
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Diffstat (limited to 'addons/web_editor/static/src/js')
0 files changed, 0 insertions, 0 deletions
