Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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 ?
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">
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:
I hope this one will help.
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.
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 8/5/14, 8:56 AM|
|Seen: 6277 times|
|Last updated: 3/16/15, 8:10 AM|