summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2016-11-07 13:22:08 +0100
committerNicolas Martinelli <nim@odoo.com>2016-11-07 13:35:54 +0100
commit0a17be70e0b99cae0d87abc83f615af9e54900af (patch)
treeb3bd09afc540b12246a6efaa80bb61b8966ba416
parent369e0bcb452f27176914ce0abcd872249fe9ee3c (diff)
[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
-rw-r--r--addons/account/account_invoice.py2
1 files changed, 2 insertions, 0 deletions
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