diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index d6bb81c206b..c1dd1901c81 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1337,8 +1337,8 @@ class AccountMove(models.Model): res[line.tax_line_id.tax_group_id]['amount'] += line.price_subtotal tax_key_add_base = tuple(move._get_tax_key_for_group_add_base(line)) if tax_key_add_base not in done_taxes: - if line.currency_id != self.company_id.currency_id: - amount = self.company_id.currency_id._convert(line.tax_base_amount, line.currency_id, self.company_id, line.date or fields.Date.today()) + if line.currency_id and line.company_currency_id and line.currency_id != line.company_currency_id: + amount = line.company_currency_id._convert(line.tax_base_amount, line.currency_id, line.company_id, line.date or fields.Date.today()) else: amount = line.tax_base_amount res[line.tax_line_id.tax_group_id]['base'] += amount