Browse Source

Take out dynamic required and invisible

Contacts are never companies
Add labels
pull/44/head
Sandy Carter 10 years ago
parent
commit
7eeb62df49
  1. 10
      partner_firstname/partner_view.xml

10
partner_firstname/partner_view.xml

@ -33,10 +33,12 @@
</field>
<!-- Add firstname and last name in inner contact form of child_ids -->
<xpath expr="//form[@string='Contact']/sheet//field[@name='category_id']" position="before">
<group attrs="{'invisible': [('is_company', '=', True)]}">
<field name="lastname" attrs="{'required': [('is_company', '=', False)]}"/>
<field name="firstname"/>
</group>
<group>
<label for="lastname" class="oe_edit_only"/>
<field name="lastname" required="1" nolabel="1"/>
<label for="firstname" class="oe_edit_only"/>
<field name="firstname" nolabel="1"/>
</group>
</xpath>
<xpath expr="//form[@string='Contact']/sheet//field[@name='category_id']" position="attributes">
<attribute name="style"/>

Loading…
Cancel
Save