Neveen
Neveen

Reputation: 1

hide button according to group

I have a defined groups and i want to display a button according a group.

<button name="assign_ticket" states= "pending_assignment,draft" groups="group_centricare_care_agents" string="Assign to me"/>

i want this button to be displayed to the group "roup_centricare_care_agents" but when adding groups tag it cause an exception.

P.S.: This button in tree view.

How can i do this??

Thanks in advance

Upvotes: 0

Views: 2489

Answers (2)

Syed Waqar
Syed Waqar

Reputation: 1

I have also faced a same problem, i am using openerp 7 on window and when i edit the following code

buton name="purchase_approve" states="confirmed" string="Approve Order" class="oe_highlight" groups="base.gm_approved"
in form view of purchase order for access the button only for gm_approved group then this button does not show for any user. also i try groups="base.group_gm_approved" but same issue

Upvotes: 0

Don Kirkby
Don Kirkby

Reputation: 56590

I think the groups attribute has to have the module name included in the group name. For example, groups="base.group_extended" is used a lot. The module name should be from the module that originally created the group. It might also be that the groups attribute is not supported in tree views or on buttons, I don't know.

Can you post details of what your error says?

Upvotes: 1

Related Questions