diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 5c2b4a6668d..be8aa5759dc 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -951,7 +951,7 @@ class AccountMove(models.Model): existing_terms_lines = self.line_ids.filtered(lambda line: line.account_id.user_type_id.type in ('receivable', 'payable')) others_lines = self.line_ids.filtered(lambda line: line.account_id.user_type_id.type not in ('receivable', 'payable')) - company_currency_id = self.company_id.currency_id + company_currency_id = (self.company_id or self.env.company).currency_id total_balance = sum(others_lines.mapped(lambda l: company_currency_id.round(l.balance))) total_amount_currency = sum(others_lines.mapped('amount_currency'))