From 0a17be70e0b99cae0d87abc83f615af9e54900af Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Mon, 7 Nov 2016 13:22:08 +0100 Subject: [PATCH] [FIX] account: tax line amount The company currency is USD, the invoice currency is EUR. - Create an invoice in EUR, set an invoice date - Compute the taxes (click on "update" button) - Change the exchange rate between EUR and USD - Validate the invoice At validation, the tax amounts are not recomputed. Therefore, they are still converted in the company currency using the old rate. Closes #14024 opw-692430 --- addons/account/account_invoice.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 580e033e8f3..fcf37c7ca74 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -741,6 +741,8 @@ class account_invoice(models.Model): line['currency_id'] = currency.id line['amount_currency'] = currency.round(line['price']) line['price'] = currency.compute(line['price'], company_currency) + if line.get('tax_amount'): + line['tax_amount'] = currency.compute(line['tax_amount'], company_currency) else: line['currency_id'] = False line['amount_currency'] = False