[FIX] database_cleanup: filter on many2many fields
Following odoo/odoo@54238c88e8 a Many2many may have no relation This avoids having a None record in the list (which is problematic with the NOT IN clause) https://wiki.postgresql.org/wiki/Don't_Do_This#Don.27t_use_NOT_INpull/2684/head
parent
f181991bed
commit
13c2a780b5
|
@ -93,6 +93,7 @@ class CleanupPurgeWizardTable(models.TransientModel):
|
|||
for column in model_pool._fields.values()
|
||||
if column.type == 'many2many' and
|
||||
(column.compute is None or column.store)
|
||||
and column.relation
|
||||
]
|
||||
|
||||
self.env.cr.execute(
|
||||
|
|
Loading…
Reference in New Issue