[FIX] account: Fix currency of tax_base_amount

The tax_base_amount field on account.move.line is expressed using the company currency but the current code is storing an amount expressed using the move currency.

closes odoo/odoo#56905

X-original-commit: 09c59012bf80d2ccbafe21c39e604d6cfda72924
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
This commit is contained in:
Laurent Smet
2020-09-01 16:43:39 +00:00
parent 9fd602bffa
commit f25e0f1737
+2
View File
@@ -652,6 +652,8 @@ class AccountMove(models.Model):
continue
tax_base_amount = (-1 if self.is_inbound() else 1) * taxes_map_entry['tax_base_amount']
# tax_base_amount field is expressed using the company currency.
tax_base_amount = currency._convert(tax_base_amount, self.company_currency_id, self.company_id, self.date or fields.Date.context_today(self))
# Recompute only the tax_base_amount.
if taxes_map_entry['tax_line'] and recompute_tax_base_amount: