From 589e99c4e00dabf08261da2c60b6438a40925cec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 5 Mar 2013 10:36:56 +0100 Subject: [PATCH] Fix missing unit_price currency convertion issue3036 review697002 (transplanted from 1d1da0ad31d92ddc55db2710ef7ee850caee60b5) --- stock.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stock.py b/stock.py index 3d530902cb..ece745d876 100644 --- a/stock.py +++ b/stock.py @@ -23,7 +23,9 @@ class Move(ModelSQL, ModelView): 'name': move.rec_name, } if type_.endswith('supplier'): - unit_price = move.unit_price + with Transaction().set_context(date=move.effective_date): + unit_price = currency_obj.compute(move.currency.id, + move.unit_price, move.company.currency.id, round=False) else: unit_price = uom_obj.compute_price(move.product.default_uom, move.cost_price, move.uom)