|
|
@ -7,10 +7,12 @@ |
|
|
|
<field name="arch" type="xml"> |
|
|
|
<data> |
|
|
|
<xpath expr="//field[@name='name']" position="attributes"> |
|
|
|
<attribute name="attrs">{ |
|
|
|
<attribute name="attrs"> |
|
|
|
{ |
|
|
|
'readonly': [('is_company', '=', False)], |
|
|
|
'required': [('is_company', '=', True)] |
|
|
|
}</attribute> |
|
|
|
} |
|
|
|
</attribute> |
|
|
|
</xpath> |
|
|
|
<xpath expr="//h1//field[@name='name']/.." position="before"> |
|
|
|
<group attrs="{'invisible': [('is_company', '=', True)]}"> |
|
|
@ -38,10 +40,12 @@ |
|
|
|
<field name="arch" type="xml"> |
|
|
|
<data> |
|
|
|
<xpath expr="//field[@name='name']" position="attributes"> |
|
|
|
<attribute name="attrs">{ |
|
|
|
<attribute name="attrs"> |
|
|
|
{ |
|
|
|
'readonly': [('is_company', '=', False)], |
|
|
|
'required': [('is_company', '=', True)] |
|
|
|
}</attribute> |
|
|
|
} |
|
|
|
</attribute> |
|
|
|
</xpath> |
|
|
|
<xpath expr="//h1//field[@name='name']/.." position="after"> |
|
|
|
<div class="oe_edit_only"> |
|
|
@ -66,10 +70,12 @@ |
|
|
|
expr="//field[@name='child_ids']/form//field[@name='name']" |
|
|
|
position="attributes" |
|
|
|
> |
|
|
|
<attribute name="attrs">{ |
|
|
|
<attribute name="attrs"> |
|
|
|
{ |
|
|
|
'readonly': [('is_company', '=', False)], |
|
|
|
'required': [('is_company', '=', True)] |
|
|
|
}</attribute> |
|
|
|
} |
|
|
|
</attribute> |
|
|
|
</xpath> |
|
|
|
<xpath |
|
|
|
expr="//field[@name='child_ids']/form//field[@name='name']" |
|
|
|