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

Hide/Show Confirm button based on user (Purchase Order)

By
Emre Kabaoğlu
on 5/14/13, 12:59 PM 4,844 views

Hi friens,

I want asking something. We are using OpenERP 7 version. Ä°n Purchase Order Overflow;

For user : I want to hide confirm order button. For Administrator : I want to show confirm order button.

Now confirm order button showing everyone.(Users and Administrators)

What can i do for this

0

Brett Lehrer

--Brett Lehrer--
1252
| 5 4 8
Milwaukee, United States
--Brett Lehrer--
Director of IT and open source enthusiast.
Brett Lehrer
On 5/14/13, 1:08 PM

Set the groups attribute in the XML tag for that button to filter down to the external/XML ID of the groups you want it to apply to. So for example:

<button name="confirm_order" string="Confirm Order" groups="base.group_erp_manager"/>

This is (in 6.1 at least) the group for Administration Access Rights, but should also apply to users with Configuration permission, since that group is a subset of Access Rights already.

Thanks for your answer.

I did your solution. But button still showing.

Emre Kabaoğlu
on 5/14/13, 1:15 PM

Make sure you are updating module after changing xml file.

Sudhir Arya (SA)
on 5/15/13, 2:33 AM
0
Emre Kabaoğlu
On 5/14/13, 1:15 PM

Thanks for your answer.

I did your solution. But button still showing.

0

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 5/14/13, 1:06 PM

Hi,

in purchase/purchase_view.xml line 168 :

<button name="purchase_confirm" states="draft" string="Confirm Order" />

add group_purchase_manager for this button:

<button name="purchase_confirm" states="draft" string="Confirm Order"
 groups="purchase.group_purchase_manager"  />

update module purchase .Settings>>Installed Modules>>Purchase Management and clik Upgrade

how it works, but it is recommended to create a new module to change the button.

Bye.

Thanks for your answer. I did your solution. But button still showing.

Emre Kabaoğlu
on 5/14/13, 1:18 PM

update module purchase .Settings>>Installed Modules>> search module Purchase Management and clik upgrade

Borni DHIFI
on 5/14/13, 1:20 PM

Solved. I want same requirement in sales order. I hide confirm sale button from sale order. Now i want to show only product list to the customer. How can i implement this?

Remya
on 5/18/13, 5:01 AM

Hello Remya , Can you tell me how was you able to solve the problem based on purchase? I applied the changes as said by Borni but still I am getting the same problem.

Viney
on 2/24/14, 5:11 AM

Did you login as admin?

Remya
on 2/24/14, 5:22 AM

Did you login as admin?

Remya
on 2/24/14, 5:48 AM
0
Dharmesh Rathod
On 5/15/13, 1:48 AM

Hi,

You have to use "groups" attribute on button tag. Make sure that only administrator user in that group.

Email : info@acespritech.com
Skype : acespritech
Blog : acespritechblog.wordpress.com

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: 5/14/13, 12:59 PM
Seen: 4844 times
Last updated: 8/4/16, 4:48 AM