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:
2012-09-06
Last query:
2012-09-06
Last reply:
2012-09-06
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

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

Eh.Dem,

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

Thanks.

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

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.

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

Eh Dem,

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

Thanks.

Ok thanks a lot , I did it

Thanks Serpent Consulting Services, that solved my question.