I have a field inherit, and I want add an attribute, but conditional. Options no_create if is a group X. Any similar to:
我有一个字段继承,我想添加一个属性,但有条件。选项no_create if是一个组X.任何类似于:
<field name="state_id" position="attributes">
<attribute name="options">{'no_create': [('groups', '==', 'X')]}</attribute>
</field>
I tried different ways (==, =), but nothing.
我尝试了不同的方式(==,=),但没有。
1 个解决方案
#1
0
Have a look at this.
看看这个。
hiding create button from treeview
隐藏树视图中的创建按钮
You can change the snippet I gave into my answer in order to check the group of the user instead of tha parameter inside the context
您可以将我提供的代码段更改为我的答案,以便在上下文中检查用户组而不是tha参数
#1
0
Have a look at this.
看看这个。
hiding create button from treeview
隐藏树视图中的创建按钮
You can change the snippet I gave into my answer in order to check the group of the user instead of tha parameter inside the context
您可以将我提供的代码段更改为我的答案,以便在上下文中检查用户组而不是tha参数