Browse Source

[FIX] partner_firstname: name, firstname and lastname only required if adress 'type' is contact

pull/487/head
Marcel Much 8 years ago
committed by Enric Tobella
parent
commit
11db867c3d
  1. 18
      partner_firstname/views/res_partner.xml

18
partner_firstname/views/res_partner.xml

@ -17,10 +17,12 @@
<group attrs="{'invisible': [('is_company', '=', True)]}"> <group attrs="{'invisible': [('is_company', '=', True)]}">
<field name="lastname" attrs= <field name="lastname" attrs=
"{'required': [('firstname', '=', False), "{'required': [('firstname', '=', False),
('is_company', '=', False)]}"/>
('is_company', '=', False),
('type', '=', 'contact')]}"/>
<field name="firstname" attrs= <field name="firstname" attrs=
"{'required': [('lastname', '=', False), "{'required': [('lastname', '=', False),
('is_company', '=', False)]}"/>
('is_company', '=', False),
('type', '=', 'contact')]}"/>
</group> </group>
</xpath> </xpath>
</data> </data>
@ -45,10 +47,12 @@
<group attrs="{'invisible': [('is_company', '=', True)]}"> <group attrs="{'invisible': [('is_company', '=', True)]}">
<field name="lastname" attrs= <field name="lastname" attrs=
"{'required': [('firstname', '=', False), "{'required': [('firstname', '=', False),
('is_company', '=', False)]}"/>
('is_company', '=', False),
('type', '=', 'contact')]}"/>
<field name="firstname" attrs= <field name="firstname" attrs=
"{'required': [('lastname', '=', False), "{'required': [('lastname', '=', False),
('is_company', '=', False)]}"/>
('is_company', '=', False),
('type', '=', 'contact')]}"/>
</group> </group>
</div> </div>
</xpath> </xpath>
@ -69,10 +73,12 @@
<group attrs="{'invisible': [('is_company', '=', True)]}"> <group attrs="{'invisible': [('is_company', '=', True)]}">
<field name="lastname" attrs= <field name="lastname" attrs=
"{'required': [('firstname', '=', False), "{'required': [('firstname', '=', False),
('is_company', '=', False)]}"/>
('is_company', '=', False),
('type', '=', 'contact')]}"/>
<field name="firstname" attrs= <field name="firstname" attrs=
"{'required': [('lastname', '=', False), "{'required': [('lastname', '=', False),
('is_company', '=', False)]}"/>
('is_company', '=', False),
('type', '=', 'contact')]}"/>
</group> </group>
</div> </div>
</xpath> </xpath>

Loading…
Cancel
Save