Browse Source

[FIX] database_cleanup: ignore to_buy modules

Since 12.0, some virtual modules are created as an incentive to buy enterprise
Hide installation warning
pull/1408/head
Martin Trigaux 6 years ago
committed by Pedro M. Baeza
parent
commit
d502f7233c
  1. 5
      database_cleanup/models/purge_modules.py

5
database_cleanup/models/purge_modules.py

@ -63,8 +63,9 @@ class CleanupPurgeWizardModule(models.TransientModel):
@api.model
def find(self):
res = []
for module in self.env['ir.module.module'].search([]):
if get_module_path(module.name):
IrModule = self.env['ir.module.module']
for module in IrModule.search([('to_buy', '=', False)]):
if get_module_path(module.name, display_warning=False):
continue
if module.state == 'uninstalled':
self.env['cleanup.purge.line.module'].create({

Loading…
Cancel
Save