For example, I want to hide field "Number of Children" on the employee form.
So I see it's field: children, object: hr.employee.
I have tried:
extend hr.employee
<field name="children" position="replace"/>
//Result XML validation error
<field name="marital" position="after">
<field name="children" position="replace"/>
</field
//Exact code from the view, result, two Children fields (this code replace the Marital field with another Children)
<field name="children" attrs="{'invisible':[('children','=',True)]}"/>
//Passes validation but returns error when trying to open an employee form
<field name="children" position="attributes">
<attribute name='invisible'>1</attribute>
</field>
//Fails xml validation
I don't know any of this code and I'm trying to find examples and that's where I got these tests from. Is there no default way to hide fields like with <field name="field_name" invisible="true"/>
and I'm extending the form it will hide that field?