[FIX] stock: compute stock valuation with right quantity
`qty` is the quantity in the product default uom. `move.price_unit` is the price unit of the product in this move, for the specific uom of this move. The quantity to use is therefore the quantity in the move uom, `move.product_qty` Closes #4555
This commit is contained in:
parent
65d4b25565
commit
f9859c510c
|
@ -2328,7 +2328,7 @@ class stock_move(osv.osv):
|
|||
if move.location_dest_id.usage != 'internal' and move.product_id.cost_method == 'average':
|
||||
reference_amount = qty * move.product_id.standard_price
|
||||
elif move.product_id.cost_method == 'average' and move.price_unit:
|
||||
reference_amount = qty * move.price_unit
|
||||
reference_amount = move.product_qty * move.price_unit
|
||||
reference_currency_id = move.price_currency_id.id or reference_currency_id
|
||||
|
||||
# Otherwise we default to the company's valuation price type, considering that the values of the
|
||||
|
|
Loading…
Reference in New Issue