diff --git a/addons/account/models/account.py b/addons/account/models/account.py index 373ec1fe9fb..6c7d88b11f5 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -273,6 +273,8 @@ class AccountAccount(models.Model): Note that: lines with debit = credit = amount_currency = 0 are set to `reconciled´ = True ''' + if not self.ids: + return None query = """ UPDATE account_move_line SET reconciled = CASE WHEN debit = 0 AND credit = 0 AND amount_currency = 0