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 have two USER: USER 1 and USER 2
USER 1 will have an access for over all accounting while USER 2 has limitations like this I want to hide the VALIDATE BUTTON How will i going to give limitation in each USERS? I've already created a groups but it didn't work the button is still there. Anyone here does have an idea to this?? Please any help is much appreciated. Thanks in advance..
<xpath expr="//button[@name='invoice_open']" position="replace">
<button name="invoice_open" states="draft,proforma2" string="Validate" class="oe_highlight" groups="biz1_pcci_dec9.group_pcci_accounting_user2"/>
Did you use the groups tag in your XML code when overriding this button? That should help. Also make sure that you are on the right form-view. Make sure that in your xml-view your replace the button entirely. Sometimes (for reasons unknown) the adding of attributes does not seem to work.
Also, in developer mode, make sure that your groups configuration was actually set by opening the form view that you are on.
The last method (which is NOT recommended and considered a dirty hack) is to overwrite the method that is called from the button and have Odoo search for a list of user that can press it. If the current user (uid) is not in that list, raise an error.
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: 12/12/14, 3:11 AM|
|Seen: 1067 times|
|Last updated: 3/16/15, 8:10 AM|