diff --git a/README.md b/README.md
index c96e92069c4..e5ea10f3b2b 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ addon | version | maintainers | summary
[base_view_inheritance_extension](base_view_inheritance_extension/) | 19.0.1.0.0 |
| Adds more operators for view inheritance
[base_write_diff](base_write_diff/) | 19.0.1.0.0 | | Prevents updates on fields whose values won't change anyway
[bus_alt_connection](bus_alt_connection/) | 19.0.1.0.0 | | Needed when using PgBouncer as a connection pooler
-[database_cleanup](database_cleanup/) | 19.0.1.0.3 | | Database cleanup
+[database_cleanup](database_cleanup/) | 19.0.1.0.6 | | Database cleanup
[dbfilter_from_header](dbfilter_from_header/) | 19.0.1.0.0 | | Filter databases with HTTP headers
[field_vector](field_vector/) | 19.0.1.0.0 |
| New specialized field to store vector data
[iap_alternative_provider](iap_alternative_provider/) | 19.0.1.0.0 |
| Base module for providing alternative provider for iap apps
diff --git a/database_cleanup/README.rst b/database_cleanup/README.rst
index b1b314e47e9..22a634b977f 100644
--- a/database_cleanup/README.rst
+++ b/database_cleanup/README.rst
@@ -11,7 +11,7 @@ Database cleanup
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:d03832b90bf6fd35cdb5112468c09e27bbdee9d3aa1a3a422b9423750f4cf990
+ !! source digest: sha256:34dd0f034d406539b5c0f25bc8a0b60b58acf39d61e17ec5f687b312f534d234
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
diff --git a/database_cleanup/__manifest__.py b/database_cleanup/__manifest__.py
index eec7bf77c28..7acd92828a5 100644
--- a/database_cleanup/__manifest__.py
+++ b/database_cleanup/__manifest__.py
@@ -3,7 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Database cleanup",
- "version": "19.0.1.0.3",
+ "version": "19.0.1.0.6",
"author": "Therp BV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-tools",
"depends": ["base"],
diff --git a/database_cleanup/static/description/index.html b/database_cleanup/static/description/index.html
index 6b052d3ab25..35e85e116ad 100644
--- a/database_cleanup/static/description/index.html
+++ b/database_cleanup/static/description/index.html
@@ -372,7 +372,7 @@
Clean your Odoo database from remnants of modules, models, columns and diff --git a/database_cleanup/wizards/purge_line_modules.py b/database_cleanup/wizards/purge_line_modules.py index de7f13bd318..caeeb24a61c 100644 --- a/database_cleanup/wizards/purge_line_modules.py +++ b/database_cleanup/wizards/purge_line_modules.py @@ -25,10 +25,7 @@ def purge(self): return True self.logger.info("Purging modules %s", ", ".join(module_names)) installed = modules.filtered(lambda x: x.state in ("installed", "to upgrade")) - to_remove = modules - installed - to_remove += to_remove.downstream_dependencies() - to_remove.write({"state": "to remove"}) - installed.button_immediate_uninstall() + installed.module_uninstall() with self.env.registry.cursor() as new_cr: self.env(cr=new_cr)["ir.module.module"].browse(modules.ids).unlink() return self.write({"purged": True}) diff --git a/database_cleanup/wizards/purge_menus.py b/database_cleanup/wizards/purge_menus.py index be3d529df25..50118be8468 100644 --- a/database_cleanup/wizards/purge_menus.py +++ b/database_cleanup/wizards/purge_menus.py @@ -4,6 +4,7 @@ # pylint: disable=consider-merging-classes-inherited from odoo import api, fields, models from odoo.exceptions import UserError +from odoo.fields import Command class CleanupPurgeWizardMenu(models.TransientModel): @@ -22,19 +23,15 @@ def find(self): .with_context(active_test=False) .search([("action", "!=", False)]) ): + command = Command.create({"name": menu.complete_name, "menu_id": menu.id}) + if not menu.action.exists(): + # Menus may have actions that do not exist or have been deleted + res.append(command) + continue if menu.action.type != "ir.actions.act_window": continue if menu.action.res_model and menu.action.res_model not in self.env: - res.append( - ( - 0, - 0, - { - "name": menu.complete_name, - "menu_id": menu.id, - }, - ) - ) + res.append(command) if not res: raise UserError(self.env._("No dangling menu entries found")) return res diff --git a/database_cleanup/wizards/purge_tables.py b/database_cleanup/wizards/purge_tables.py index 4376d8b41c7..5bb39c33411 100644 --- a/database_cleanup/wizards/purge_tables.py +++ b/database_cleanup/wizards/purge_tables.py @@ -17,6 +17,15 @@ class CleanupPurgeWizardTable(models.TransientModel): _description = "Purge tables" blacklist = [ "endpoint_route", # web-api/endpoint_route_handler + # \/\/ from Registry.setup_signaling() \/\/ + "orm_signaling_assets", + "orm_signaling_default", + "orm_signaling_groups", + "orm_signaling_registry", + "orm_signaling_routing", + "orm_signaling_stable", + "orm_signaling_templates", + # /\/\ from Registry.setup_signaling() /\/\ ] @api.model