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