I have two Boolean fields and i want to give attrs invisible to both fields
Plz help..
Thanks in advance
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I have two Boolean fields and i want to give attrs invisible to both fields
Plz help..
Thanks in advance
Your code:
<field name="my_field" attrs="{'invisible': [('boolean_field','=',False)]}" />
If bool1 OR bool2
<field name="my_field" attrs="{'invisible': ['|', ('boolean_field1','=',False), ('boolean_field2','=',False)]}" />
If bool1 AND bool2
<field name="my_field" attrs="{'invisible': ['&', ('boolean_field1','=',False), ('boolean_field2','=',False)]}" />
If It is a many2one field You can Try
fields.many2one('test.test', 'String',domain=[('type', '<>', 'service'),('is_raw_material','=',True)])
By Default it uses AND condition.
You Can Specify for OR operation like below
fields.many2one('test.test', 'String',domain=['|',('is_cutting','=',True),('is_forging','=',True)] )