Search code examples
pythonxmlodooodoo-11

How to hide a Many2one field without any dependecies?


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?


Solution

  • 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.