|
|
@ -42,45 +42,32 @@ |
|
|
|
}</attribute> |
|
|
|
</xpath> |
|
|
|
|
|
|
|
<xpath expr="//field[@name='category_id']" position="before"> |
|
|
|
<group attrs="{'invisible': [('is_company', '=', True)]}"> |
|
|
|
<xpath expr="//field[@name='parent_id']/.." position="before"> |
|
|
|
<div attrs="{'invisible': [('is_company', '=', True)]}"> |
|
|
|
<label for="lastname" string="Lastname"/> |
|
|
|
<field name="lastname" attrs= |
|
|
|
"{'required': [('firstname', '=', False), |
|
|
|
('is_company', '=', False)]}"/> |
|
|
|
('is_company', '=', False)]}" class="oe_inline"/><br/> |
|
|
|
<label for="firstname" string="Firstname"/> |
|
|
|
<field name="firstname" attrs= |
|
|
|
"{'required': [('lastname', '=', False), |
|
|
|
('is_company', '=', False)]}"/> |
|
|
|
</group> |
|
|
|
('is_company', '=', False)]}" class="oe_inline"/> |
|
|
|
</div> |
|
|
|
</xpath> |
|
|
|
|
|
|
|
<!-- Modify inner contact form of child_ids --> |
|
|
|
<xpath expr="//field[@name='child_ids']/form |
|
|
|
//field[@name='category_id']" |
|
|
|
//field[@name='name']" |
|
|
|
position="before"> |
|
|
|
<group attrs="{'invisible': [('is_company', '=', True)]}"> |
|
|
|
<field name="is_company"/> |
|
|
|
<field name="lastname" attrs= |
|
|
|
"{'required': [('firstname', '=', False), |
|
|
|
('is_company', '=', False)]}"/> |
|
|
|
('is_company', '=', False)], |
|
|
|
'invisible': [('is_company', '=', True)]}"/> |
|
|
|
<field name="firstname" attrs= |
|
|
|
"{'required': [('lastname', '=', False), |
|
|
|
('is_company', '=', False)]}"/> |
|
|
|
</group> |
|
|
|
</xpath> |
|
|
|
|
|
|
|
<xpath expr="//field[@name='child_ids']/form |
|
|
|
//field[@name='category_id']" |
|
|
|
position="attributes"> |
|
|
|
<attribute name="style"/> |
|
|
|
</xpath> |
|
|
|
|
|
|
|
<xpath expr="//field[@name='child_ids']/form//label[@for='name']" |
|
|
|
position="before"> |
|
|
|
<div class="oe_edit_only"> |
|
|
|
<field name="is_company" |
|
|
|
on_change="onchange_type(is_company)"/> |
|
|
|
<label for="is_company" |
|
|
|
string="Is a Company?"/> |
|
|
|
</div> |
|
|
|
('is_company', '=', False)], |
|
|
|
'invisible': [('is_company', '=', True)]}"/> |
|
|
|
</xpath> |
|
|
|
|
|
|
|
<xpath expr="//field[@name='child_ids']/form//field[@name='name']" |
|
|
|