diff --git a/account_constraints/account_constraints.py b/account_constraints/account_constraints.py index 6497cc1d0..bd20e27a3 100644 --- a/account_constraints/account_constraints.py +++ b/account_constraints/account_constraints.py @@ -123,9 +123,9 @@ class AccountMoveLine(orm.Model): def _check_currency_and_amount(self, cr, uid, ids, context=None): for l in self.browse(cr, uid, ids, context=context): # we check zero amount line - if not bool(l.debit) + bool(l.credit): + if not (l.debit and l.credit): continue - if (bool(l.currency_id) != bool(l.amount_currency)): + if bool(l.currency_id) != bool(l.amount_currency): return False return True