diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py index 1b809fe59a9..04ca1228824 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -711,8 +711,11 @@ class AccountBankStatementLine(models.Model): elif st_line_currency == company_currency: total_amount = self.amount_currency else: - total_amount = statement_currency.with_context({'date': self.date}).compute(self.amount, company_currency) - ratio = total_amount / amount + total_amount = statement_currency.with_context({'date': self.date}).compute(self.amount, company_currency, round=False) + if float_is_zero(total_amount - amount, precision_rounding=company_currency.rounding): + ratio = total_amount / amount + else: + ratio = 1.0 # Then use it to adjust the statement.line field that correspond to the move.line amount_currency if statement_currency != company_currency: amount_currency = self.amount * ratio