2

I have a field inherit, and I want add an attribute, but conditional. Options no_create if is a group X. Any similar to:

<field name="state_id" position="attributes">                       
    <attribute name="options">{'no_create': [('groups', '==', 'X')]}</attribute>
</field>

I tried different ways (==, =), but nothing.

aispobla
  • 143
  • 1
  • 1
  • 8

1 Answers1

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

Community
  • 1
  • 1
Alessandro Ruffolo
  • 1,575
  • 1
  • 16
  • 34