From 802d1abe7a446e4034f0af74d023acdd4dd45324 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Mon, 24 Aug 2015 18:16:05 +0200 Subject: [PATCH] [FIX] account: invoice lines amounts must be rounded when converted to journal items This revision is related to cfbd086b09faa77f44505e1ba952841e77da6002. This is the same use case than above, but with a different currency than the one of the company, for the field `amount_currency` this time. Closes #8135 opw-647639 --- addons/account/account_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 1cd11d9fb11..116f5d2d684 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -739,7 +739,7 @@ class account_invoice(models.Model): if self.currency_id != company_currency: currency = self.currency_id.with_context(date=self.date_invoice or fields.Date.context_today(self)) line['currency_id'] = currency.id - line['amount_currency'] = line['price'] + line['amount_currency'] = currency.round(line['price']) line['price'] = currency.compute(line['price'], company_currency) else: line['currency_id'] = False