Hide a button for certain users

Hello guys,

How can I hide some buttons for certain users in OpenErp 6.1.

Thanks for your help.....

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Serpent Consulting Services
Solved:
Last query:
Last reply:
Revision history for this message
Ferdinand (office-chricar) said :
#1

On 09/06/2012 06:01 PM, eh.dem wrote:
> New question #207860 on OpenERP Addons:
> https://answers.launchpad.net/openobject-addons/+question/207860
>
> Hello guys,
>
>
> How can I hide some buttons for certain users in OpenErp .
>
> Thanks for your help.....
>
you must create a group for this users and modify the xml to not diplay
the button fot this group

Revision history for this message
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) said :
#2

thanks m how can I find the xml ????

Revision history for this message
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) said :
#3

I am a new

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#4

Eh.Dem,

If you understand technical aspects, you can find the xml file where your button is programmed.

Thanks.

Revision history for this message
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) said :
#5

thanks , I found it,

I create a new group "Opportunities" and I run the query " select module,name,model,res_id from ir_model_data where model='res.groups';" to find the name of my new group , but I have no answer about my new group .

Do you have an idea ???

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) said :
#6

Eh Dem,

Where have you used queries?

OpenERP is kind of an architecture which does all querying by itself except some very specific situations.

Did you create a group in xml file and put it inside button tag?

Thanks.

Revision history for this message
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) said :
#7

I thought I could create the new group on "SETTINGS->USERS->GROUPS" and I put the new group in my xml form where is the button like <button name="order_confirm" states="draft" string="Confirm Order" icon="gtk-apply" groups="new_group"/>

Revision history for this message
Best Serpent Consulting Services (serpent-consulting-services) said :
#8

Eh Dem,

No, this will not work because groups need an XML reference.

Thanks.

Revision history for this message
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) said :
#9

Ok thanks a lot , I did it

Revision history for this message
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) said :
#10

Thanks Serpent Consulting Services, that solved my question.