hide button according to group

青春壹個敷衍的年華 提交于 2020-01-06 06:45:24

问题


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


回答1:


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?




回答2:


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



来源:https://stackoverflow.com/questions/2395775/hide-button-according-to-group

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!