|
@ -53,11 +53,12 @@ class CleanupPurgeLineModule(models.TransientModel): |
|
|
if not modules: |
|
|
if not modules: |
|
|
return True |
|
|
return True |
|
|
self.logger.info('Purging modules %s', ', '.join(module_names)) |
|
|
self.logger.info('Purging modules %s', ', '.join(module_names)) |
|
|
modules.button_uninstall() |
|
|
|
|
|
|
|
|
modules.button_immediate_uninstall() |
|
|
# we need this commit because reloading the registry would roll back |
|
|
# we need this commit because reloading the registry would roll back |
|
|
# our changes |
|
|
# our changes |
|
|
self.env.cr.commit() # pylint: disable=invalid-commit |
|
|
self.env.cr.commit() # pylint: disable=invalid-commit |
|
|
RegistryManager.new(self.env.cr.dbname, update_module=True) |
|
|
RegistryManager.new(self.env.cr.dbname, update_module=True) |
|
|
|
|
|
modules.refresh() |
|
|
modules.unlink() |
|
|
modules.unlink() |
|
|
return objs.write({'purged': True}) |
|
|
return objs.write({'purged': True}) |
|
|
|
|
|
|
|
|