Skip to content

Commit

Permalink
[IMP] partner_second_lastname: adapt to partner_type_base
Browse files Browse the repository at this point in the history
  • Loading branch information
CRogos committed Nov 12, 2024
1 parent 089b4f8 commit 1645b80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
15 changes: 3 additions & 12 deletions partner_second_lastname/views/res_partner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
<attribute name="required" add="(not lastname2)" separator=" and " />
</field>
<field name="lastname" position="after">
<field
name="lastname2"
required="not lastname2 and not lastname and not is_company and type == 'contact'"
/>
<field name="lastname2" required="not lastname and is_individual" />
</field>
</field>
</record>
Expand All @@ -33,10 +30,7 @@
<attribute name="required" add="(not lastname2)" separator=" and " />
</field>
<field name="lastname" position="after">
<field
name="lastname2"
required="not lastname2 and not lastname and not is_company and type == 'contact'"
/>
<field name="lastname2" required="not lastname and is_individual" />
</field>
<!-- Inner contact form of child_ids -->
<xpath
Expand All @@ -55,10 +49,7 @@
expr="//field[@name='child_ids']/form//field[@name='lastname']"
position="after"
>
<field
name="lastname2"
required="not lastname2 and not lastname and not is_company and type == 'contact'"
/>
<field name="lastname2" required="not lastname and is_individual" />
</xpath>
</field>
</record>
Expand Down
2 changes: 1 addition & 1 deletion partner_second_lastname/views/res_user.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<attribute name="required" add="(not lastname2)" separator=" and " />
</field>
<field name="lastname" position="after">
<field name="lastname2" required="not lastname2 and not lastname" />
<field name="lastname2" required="not lastname" />
</field>
</field>
</record>
Expand Down

0 comments on commit 1645b80

Please sign in to comment.