diff --git a/account_reconcile_oca/models/account_bank_statement_line.py b/account_reconcile_oca/models/account_bank_statement_line.py index 4aa30e2a49..835b5d2e97 100644 --- a/account_reconcile_oca/models/account_bank_statement_line.py +++ b/account_reconcile_oca/models/account_bank_statement_line.py @@ -214,11 +214,10 @@ def _onchange_add_account_move_line_id(self): new_data = [] is_new_line = True pending_amount = 0.0 + currency = self._get_reconcile_currency() for line in data: if line["kind"] != "suspense": - pending_amount += self._get_amount_currency( - line, self._get_reconcile_currency() - ) + pending_amount += self._get_amount_currency(line, currency) if self.add_account_move_line_id.id in line.get( "counterpart_line_ids", [] ): @@ -230,7 +229,7 @@ def _onchange_add_account_move_line_id(self): self.add_account_move_line_id, "other", True, - max_amount=pending_amount, + max_amount=currency.round(pending_amount), move=True, ) new_data += lines