Hai ,
i want to question ...
Why invisible field can't work,
I will to invisible field 'birth_date' when I choose customer (with type field is boolean) ...
eg :
I make code in file .py :
'customer': fields.boolean('Customer'),
'birth_date':fields.date('Birth Date'),
and , make code in file .xml :
<record model="ir.ui.view" id="res_partner_formTop2_view">
<field name="name">Position Top2</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="function" position="before">
<field name="customer"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="res_partner_form5_view">
<field name="name">master customer</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="phone" position="before">
<field name="birth_date" attrs="{'invisible': [('customer','!=', True)]}"/>
</field>
</field>
</record>
how I fix my problem ?
Does it get invisible when the check box "customer" is not selected? I think you should write as {'invisible':[('customer','=',True)]}. So when you will select the check box it will invisible the field.
Ok thanks Emipro Technologies Pvt. Ltd, I want to try your suggestion