[FIX] account: Bad query
Fix Error:
`ERROR: syntax error at or near ")"
LINE 7: ... WHERE full_reconcile_id IS NULL and account_id IN ()`
This can occurs when:
- using write to some account like:
`some_account.write({'reconcile': True})`
closes odoo/odoo#29164
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user