Holger Brunn
7 years ago
No known key found for this signature in database
GPG Key ID: 1C9760FECA3AE18
1 changed files with
2 additions and
7 deletions
-
database_cleanup/models/purge_modules.py
|
|
@ -40,12 +40,7 @@ class CleanupPurgeLineModule(models.TransientModel): |
|
|
|
Uninstall modules upon manual confirmation, then reload |
|
|
|
the database. |
|
|
|
""" |
|
|
|
if self: |
|
|
|
objs = self |
|
|
|
else: |
|
|
|
objs = self.env['cleanup.purge.line.module']\ |
|
|
|
.browse(self._context.get('active_ids')) |
|
|
|
module_names = objs.filtered(lambda x: not x.purged).mapped('name') |
|
|
|
module_names = self.filtered(lambda x: not x.purged).mapped('name') |
|
|
|
modules = self.env['ir.module.module'].search([ |
|
|
|
('name', 'in', module_names) |
|
|
|
]) |
|
|
@ -57,7 +52,7 @@ class CleanupPurgeLineModule(models.TransientModel): |
|
|
|
).button_immediate_uninstall() |
|
|
|
modules.refresh() |
|
|
|
modules.unlink() |
|
|
|
return objs.write({'purged': True}) |
|
|
|
return self.write({'purged': True}) |
|
|
|
|
|
|
|
|
|
|
|
class CleanupPurgeWizardModule(models.TransientModel): |
|
|
|