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.
As in subject.
How can I hide menu depending on what is user department_id ?
Already tried use domain:
domain="[('department_id', '=', Warehouse)]"
filter_domain="[('department_id', '=', Warehouse)]"
File "lxml.etree.pyx", line 3027, in lxml.etree._Validator.assert_ (src/lxml/lxml.etree.c:129517)
AssertionError: Invalid attribute filter_domain for element menuitem, line 226
Actually, menu definition is as follows
<menuitem id="menu_act_for_warehouse" action="act_for_warehouse" sequence="2" parent="some_parent_id"/>
Where 'act_for_warehouse' is the action id that call a specific view.
You have to define a group for all users in department A, say. You have after that to rewrite the menu definition as follows
<menuitem id="menu_act_for_warehouse" action="act_for_warehouse" sequence="2" parent="some_parent_id" groups="your_module_name.group_for_department_a"/>
This menu will be seen only by the users in the group 'group_for_department_a', and other users won't see it. This is the most trivia solution even it requires double work. I mean, you have to add users to department and add them also to the group that is related to this department.
I think one can invent other solution that avoid double work. Try this first and let us see.
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/25/15, 7:02 AM|
|Seen: 595 times|
|Last updated: 8/25/15, 11:49 AM|