From e62fa5521b08742919b4a055f82ddcaba1ced4b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 24 Feb 2014 19:19:12 +0100 Subject: [PATCH] Use statement line date for currency convertion issue3650 review3571002 --- statement.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/statement.py b/statement.py index 1b44a4df81..f1db7c82a4 100644 --- a/statement.py +++ b/statement.py @@ -559,8 +559,9 @@ class Line(ModelSQL, ModelView): MoveLine = pool.get('account.move.line') Currency = Pool().get('currency.currency') zero = Decimal("0.0") - amount = Currency.compute(self.statement.journal.currency, self.amount, - self.statement.company.currency) + with Transaction().set_context(date=self.date): + amount = Currency.compute(self.statement.journal.currency, + self.amount, self.statement.company.currency) if self.statement.journal.currency != self.statement.company.currency: second_currency = self.statement.journal.currency.id amount_second_currency = abs(self.amount)