From f25e0f17375ed7a92fe0fd88f58d6a6e07c0fb83 Mon Sep 17 00:00:00 2001 From: Laurent Smet Date: Tue, 1 Sep 2020 13:49:57 +0000 Subject: [PATCH] [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 Signed-off-by: Laurent Smet --- addons/account/models/account_move.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index dd28b712f8b..9484274857b 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -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: