diff --git a/database_cleanup/models/purge_modules.py b/database_cleanup/models/purge_modules.py index bdfe3fcfa49..ac9276e2ce5 100644 --- a/database_cleanup/models/purge_modules.py +++ b/database_cleanup/models/purge_modules.py @@ -53,11 +53,12 @@ def purge(self): if not modules: return True 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 # our changes self.env.cr.commit() # pylint: disable=invalid-commit RegistryManager.new(self.env.cr.dbname, update_module=True) + modules.refresh() modules.unlink() return objs.write({'purged': True})