summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorSimon Lejeune <sle@openerp.com>2018-07-19 11:14:33 +0200
committerSimon Lejeune <sle@openerp.com>2018-07-19 14:29:34 +0200
commit22062d9efccaeaa12b2639ae9696cae5724f6a86 (patch)
treef1f752cbf1003e1c15d09c2725f5304fa7492cb7 /addons/web/static/src/js/fields/basic_fields.js
parent9f8eae34d1d89d7cf01eef8a1a89dc431ef5f4e2 (diff)
[FIX] stock_landed_costs: wrong `price_unit`update when multiple landed costs
`new_landed_cost_value` was added to `value` to recompute the `price_unit` field. The issue is that when applying multiple landed costs, `value` and `new_landed_cost_value` already contains the previous landed costs, resulting in an erroneous `price_unit`. This patch only adds `cost_to_add`, which is the current landed cost, to `value`, which contains all the previous one. To reproduce: - Create a product FIFO / AUTOMATED - Purchase 50 units@$2 and receive them (total value=$100) - Add a landed cost of $100 on those 50 units and a landed cost of $50 on those 50 units (total value = $100+$100+$50) - Sell 15 units (the value on move out =$75 > $75/15 = $5 unit cost) The standard_price on the product = $7 while I expect to have $5 opw-1867002
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions