diff --git a/addons/account/models/account_reconcile_model.py b/addons/account/models/account_reconcile_model.py index ecdc1f061d6..8a6c0b21e54 100644 --- a/addons/account/models/account_reconcile_model.py +++ b/addons/account/models/account_reconcile_model.py @@ -178,7 +178,10 @@ class AccountReconcileModel(models.Model): total_residual = move_lines and sum(aml.currency_id and aml.amount_residual_currency or aml.amount_residual for aml in move_lines) or 0.0 balance = line_residual - total_residual - if not self.account_id or float_is_zero(balance, precision_rounding=line_currency.rounding) or balance < 0: + if not self.account_id\ + or float_is_zero(balance, precision_rounding=line_currency.rounding)\ + or (st_line.amount > 0 and balance < 0)\ + or (st_line.amount < 0 and balance > 0): return [] line_balance = self.amount_type == 'percentage' and balance * (self.amount / 100.0) or self.amount