Odoo Help

Welcome!

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

0

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

By
Alcaline
on 12/12/14, 3:11 AM 801 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

--Ludo - Neobis--
2387
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--

Developer

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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