Reputation: 23
I want to make a field invisible but without any other dependencies.
<field name="days_before" attrs="{'invisible': [('object', '=', '5')]}"/>
So without [('object', '=', '5')]
Is there a way?
Upvotes: 0
Views: 61
Reputation: 1
You can add invisible="1" in the xml file like:
<field name="field_name" invisible="1"/>
Also if you have inherited the view you can make an inherited field invisible without conditions by adding in the xml file:
<field name="field_name" position="attributes">
<attribute name='invisible'>1</attribute>
</field>
Upvotes: 0
Reputation: 2825
Making a field invisible without any condition is much easier syntax.
<field name="days_before" invisible="1"/>
Same syntax works for readonly. Either value 1
or True
can be used.
Upvotes: 1