From e1d5737fcdfaf9ee77621531541738ef4c409c81 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Tue, 2 Aug 2016 12:55:43 +0200 Subject: [PATCH] [FIX] purge uninstalled uninstallable modules instead of deleting --- database_cleanup/models/purge_modules.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/database_cleanup/models/purge_modules.py b/database_cleanup/models/purge_modules.py index 9664d1a21..4804e64ee 100644 --- a/database_cleanup/models/purge_modules.py +++ b/database_cleanup/models/purge_modules.py @@ -69,7 +69,9 @@ class CleanupPurgeWizardModule(models.TransientModel): if get_module_path(module.name): continue if module.state == 'uninstalled': - module.unlink() + self.env['cleanup.purge.line.module'].create({ + 'name': module.name, + }).purge() continue res.append((0, 0, {'name': module.name}))