0
votes

I have problem with deleting the menu in openerp6.

In the module A (an original module) create a menu call X. My custom module B which depends on A, try to delete the menu X I used this in XML file:

<delete id="base.menu_partner_category_form" model = "ir.ui.menu"/>

When upgrading module B => It's fine When upgrading module A (it will upgrade module B together) => Display this exception:

One of the records you are trying to modify has already been deleted (Document type: ir.ui.menu).

I have three solutions but my PM does not agree with my solution

  1. Keep it and try not to update the module A
  2. Create new groups (with no users) and add the menu to that groups (instead of trying to delete the menu)
  3. Comment out the code that generate the menuitem in the original module

Any advice? Please help me!

1

1 Answers

0
votes
  1. If by original module you mean an Odoo certified module, you might be OK but if you want to pull bug fixes from github, you will have to apply them manually and then you are on your own really.

  2. This one. Re-declare the same menu in your module with the groups. Redeclaring with changes like this works well.

  3. Depending on how you manage your source tree, if you pull from github you could loose your change and not be aware of it unless a user points it out.