From fa0eac8d61493b36757ae1f5113530ed3cbf17f3 Mon Sep 17 00:00:00 2001 From: Lorenzo Battistini Date: Fri, 17 May 2013 10:42:47 +0200 Subject: [PATCH] [FIX] avoid using foreign currency so rounding problems are avoided --- stock_lot_valuation/stock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stock_lot_valuation/stock.py b/stock_lot_valuation/stock.py index 61c10bd46..bbfb3a33b 100644 --- a/stock_lot_valuation/stock.py +++ b/stock_lot_valuation/stock.py @@ -184,10 +184,10 @@ class stock_move(orm.Model): move.product_qty, move.product_id.uom_id.id) if context is None: context = {} - currency_ctx = dict(context, currency_id = res[1]) + currency_ctx = dict(context, currency_id = move.company_id.currency_id.id) amount_unit = move.prodlot_id.price_get(context=currency_ctx)[move.prodlot_id.id] reference_amount = amount_unit * qty - new_res = (reference_amount, res[1]) + new_res = (reference_amount, move.company_id.currency_id.id) res = new_res return res