[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
This commit is contained in:
parent
369e0bcb45
commit
0a17be70e0
|
@ -741,6 +741,8 @@ class account_invoice(models.Model):
|
||||||
line['currency_id'] = currency.id
|
line['currency_id'] = currency.id
|
||||||
line['amount_currency'] = currency.round(line['price'])
|
line['amount_currency'] = currency.round(line['price'])
|
||||||
line['price'] = currency.compute(line['price'], company_currency)
|
line['price'] = currency.compute(line['price'], company_currency)
|
||||||
|
if line.get('tax_amount'):
|
||||||
|
line['tax_amount'] = currency.compute(line['tax_amount'], company_currency)
|
||||||
else:
|
else:
|
||||||
line['currency_id'] = False
|
line['currency_id'] = False
|
||||||
line['amount_currency'] = False
|
line['amount_currency'] = False
|
||||||
|
|
Loading…
Reference in New Issue