Odoo Help


how to hide menus ?

on 8/5/14, 8:56 AM 6,800 views

I developped custom modules that inherit from existing modules (accountig, hr, etc..) and by installing those modules, their menus appear. so I would like to hide those menus (Accounting, Human resources) from the users with keeping the rights for the users on those modules, is it possible ? how can i do it ? 

On 9/8/14, 12:02 AM

You can hide a menu using the groups in .xml:

   first create a new folder inside of your module name it as SECURITY then inside of it create and .xml file and put this one

    <record id="make_invisible" model="res.groups">

        <field name="name">Invisible</field>


and then put the name of this .xml file in your

     _openerp_.py ->'update_xml' : ['Security/module_name.xml','module_contains_menus.xml']

after that in your menuitems add groups equals the id of your created xml file like this:

<menuitem name="menu1"


I hope this one will help.

Will this "delete" the menu only when i install the module ? and if it is so, will it be enabled if i uninstall the module ? Thanks again

on 9/8/14, 4:48 AM

Is it required the csv file please explain step by step .How to create a security for a custom module.As per you code I can create only a field inside Access Rights tabs under users.No functionality

on 1/13/15, 6:26 AM

First shot! Great. Thanks!

Pascal Tremblay
on 1/13/15, 7:15 AM

René Schuster

--René Schuster--
| 5 5 8
Weinheim, Germany
--René Schuster--

Challenge Everything!

René Schuster
On 8/5/14, 9:15 AM

Add a custom xml file to your custom modules and use the delete tag.

For example for the Human Resource menu item

<delete model="ir.ui.menu" id="hr.menu_hr_root"></delete>



mohsel asked if it was possible to hide the menu from a selection of people. Your solution permanently hides the menuitem from everyone, which is fine is most cases, but I think not in the case of the ts.

21south, Ludo - 21South
on 8/5/14, 11:22 AM

Maybe it's due to my english, but I think he wants the official menues to be hidden, while only his own menues are visible. Anyway, you are right, delete will permanently remove the menu items, not hide them.

René Schuster
on 8/6/14, 3:36 AM

Thanks René and Ludo, your are both right, in fact i will try to hide the menus, if it doesn't work, i will use René's proposition to delete them, i"ll just gonna have to be able te reinstall them

on 8/7/14, 5:35 AM

Ludo - 21South

--Ludo - 21South--
| 2 2 5
Zwijndrecht, Netherlands
--Ludo - 21South--


Ludo - 21South
On 8/5/14, 9:10 AM

Yes this is possible. If you made the custom XML's with the <menuitem> tags as well, just add the the groups-attribute to that tag, like so:

<menuitem id="myitem" groups="hr.hr_manager"/>

This way, only users that belong to the hr_manager group defined in the HR module will be able to see the menu. 

You can alternatively also add your own groups in your module. The syntax would not differ much, but you would not point to the original HR module for the group name.

Thank you for your answer, what i understood, in orther to hide the hr and accounting menus i will have to surcharge the xml declaration for the menus hr and accounting ?

on 8/7/14, 5:31 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 8/5/14, 8:56 AM
Seen: 6800 times
Last updated: 3/16/15, 8:10 AM