Skip to content

[19.0][IMP] database_cleanup: Purge menu has action that does not exist or has been deleted#3675

Open
quoc-pn wants to merge 1 commit into
OCA:19.0from
komit-consulting:19.0-database_cleanup-purge-menus-invalid-actions
Open

[19.0][IMP] database_cleanup: Purge menu has action that does not exist or has been deleted#3675
quoc-pn wants to merge 1 commit into
OCA:19.0from
komit-consulting:19.0-database_cleanup-purge-menus-invalid-actions

Conversation

@quoc-pn

@quoc-pn quoc-pn commented Jul 15, 2026

Copy link
Copy Markdown
Member

Problems

Some menus have actions that do not exist or have been deleted. When clicking on the menu "Purge obsolete menu entries" purge lines will be created for obsolete menus and the error below will be raised because of invalid action

image

Changes

Check whether the action exists by calling exists() before reading its data. If the action does not exist, create a purge line for the corresponding menu.

@quoc-pn quoc-pn changed the title [IMP] database_cleanup: Purge menu has action that does not exist or has been deleted [19.0][IMP] database_cleanup: Purge menu has action that does not exist or has been deleted Jul 15, 2026
@pedrobaeza pedrobaeza added this to the 19.0 milestone Jul 16, 2026

@pedrobaeza pedrobaeza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For not repeating the exact code for adding the entry, please refactor it a bit, and you can use Command.add for also shorting the 0, 0 lines.

@quoc-pn
quoc-pn force-pushed the 19.0-database_cleanup-purge-menus-invalid-actions branch from 7053e54 to 328a8c8 Compare July 16, 2026 14:18
@quoc-pn
quoc-pn requested a review from pedrobaeza July 16, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants