Odoo Help

0

Does anyone here knows how to hide this VALIDATE BUTTON??

By
Alcaline
on 12/12/14, 3:11 AM 1,007 views

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..

XML view:

<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"/>
           </xpath>

0
Ludo - Neobis
On 12/12/14, 3:32 AM

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.

<xpath expr="//button[@name='invoice_open']" position="replace">

Alcaline
on 12/12/14, 3:46 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.

Register

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)

Stats

Asked: 12/12/14, 3:11 AM
Seen: 1007 times
Last updated: 3/16/15, 8:10 AM