|
@ -6,11 +6,11 @@ |
|
|
<field name="inherit_id" ref="base.view_partner_simple_form"/> |
|
|
<field name="inherit_id" ref="base.view_partner_simple_form"/> |
|
|
<field name="arch" type="xml"> |
|
|
<field name="arch" type="xml"> |
|
|
<field name="name" position="attributes"> |
|
|
<field name="name" position="attributes"> |
|
|
<attribute name="attrs">{'readonly': [('is_company', '=', False)]}</attribute> |
|
|
|
|
|
|
|
|
<attribute name="attrs">{'readonly': [('is_company', '=', False)], 'required': [('is_company', '=', True)]}</attribute> |
|
|
</field> |
|
|
</field> |
|
|
<field name="category_id" position="before"> |
|
|
<field name="category_id" position="before"> |
|
|
<group attrs="{'invisible': [('is_company', '=', True)]}"> |
|
|
<group attrs="{'invisible': [('is_company', '=', True)]}"> |
|
|
<field name="lastname"/> |
|
|
|
|
|
|
|
|
<field name="lastname" attrs="{'required': [('is_company', '=', False)]}"/> |
|
|
<field name="firstname" /> |
|
|
<field name="firstname" /> |
|
|
</group> |
|
|
</group> |
|
|
</field> |
|
|
</field> |
|
@ -23,11 +23,11 @@ |
|
|
<field name="inherit_id" ref="base.view_partner_form"/> |
|
|
<field name="inherit_id" ref="base.view_partner_form"/> |
|
|
<field name="arch" type="xml"> |
|
|
<field name="arch" type="xml"> |
|
|
<field name="name" position="attributes"> |
|
|
<field name="name" position="attributes"> |
|
|
<attribute name="attrs">{'readonly': [('is_company', '=', False)]}</attribute> |
|
|
|
|
|
|
|
|
<attribute name="attrs">{'readonly': [('is_company', '=', False)], 'required': [('is_company', '=', True)]}</attribute> |
|
|
</field> |
|
|
</field> |
|
|
<field name="category_id" position="before"> |
|
|
<field name="category_id" position="before"> |
|
|
<group attrs="{'invisible': [('is_company', '=', True)]}"> |
|
|
<group attrs="{'invisible': [('is_company', '=', True)]}"> |
|
|
<field name="lastname"/> |
|
|
|
|
|
|
|
|
<field name="lastname" attrs="{'required': [('is_company', '=', False)]}"/> |
|
|
<field name="firstname"/> |
|
|
<field name="firstname"/> |
|
|
</group> |
|
|
</group> |
|
|
</field> |
|
|
</field> |
|
|