I need to detect when a user is in add (new) mode when the view is loaded or in edit mode.
I need this because I want to hide a few fields when the user is adding a new entry and show them when the user is editing an entry.
TIA
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I need to detect when a user is in add (new) mode when the view is loaded or in edit mode.
I need this because I want to hide a few fields when the user is adding a new entry and show them when the user is editing an entry.
TIA
Use invisible
attribut with dynamic conditions. See for example:
<field name="field1"/>
<field name="field2" attrs="{'invisible':[('field1','=','some_value')]}"/>
field2
will show or not depended from value field1
.