Menu Inheritance in Odoo

Many times we develop custom module but we get in a dilemma that how we can modify the attributes for existing menu items. What we would like to do is remove the original menu item so that users in that group cant see it. So to achieve this in Odoo we need to inherit the original menu item in our custom module and modify the attributes as per our needs.

Now, Let’s see how we can bring it in custom module.

Firstly, You might be knowing that menu entries are usually defined with the ‘menuitem’ XML tag.

<menuitem name=”menuName” id=”menu_id” … />

You got menuitem then you can easily inherit and make it compatible as per your requirements.
1. Adding New Attributes.
2. Removing Old Attributes.
3. Modifying Existing Attributes.

To redefine menu item you don’t need xpath , simply redefine that in your xml file, with correct id reference.

You just have to add original module name followed by “.”(Dot) followed by original menuitem ID.

Syntax :

<menuitem id=”module_name.menu_id” name=”menuName” … />



<menuitem name=”Human Resources”

you can evict group from Human Resources menuitem like this:-

<menuitem name=”Human Resources”

That’s It.

You must be logged in to post a comment.