Instead of updating the record, you can replace the menuitem itself,
All you have to do is find the menu item that you want to override, and then add your code to it. For example, an already defined menu,
<menuitem id="menu_example" action="menu_action" name="Example Menu" parent="menu_example_parent" sequence="10"/>
Now suppose you want to add a group to this menu,
<menuitem id="existing_module.menu_example" action="existing_module.menu_action" name="Example Menu" parent="existing_module.menu_example_parent" sequence="10" groups="group_example"/>
If this does not work, first delete this menu and then write down this menu again, including your code. To delete a menu
<delete model="ir.ui.menu" id="module_name.menu_id" />
Hope this is helpful.
source share