feat: add dlv_partner_child_address_street — street/street2 and email below phone on child cards of the partner form

This commit is contained in:
Kristof Bernaert
2026-10-04 17:57:33 +02:00
parent c4b848ce0b
commit aa0bafca84
5 changed files with 117 additions and 0 deletions
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_partner_form_child_street" model="ir.ui.view">
<field name="name">res.partner.form.child.street</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<!-- street/street2 are already loaded by the base child_ids kanban -->
<xpath expr="//field[@name='child_ids']/kanban//div[hasclass('oe_kanban_details')]//div[@t-if=&quot;record.type.raw_value != 'contact'&quot;]/div" position="before">
<div t-if="record.street.raw_value"><field name="street"/></div>
<div t-if="record.street2.raw_value"><field name="street2"/></div>
</xpath>
<!-- email below phone/mobile instead of directly under the name -->
<xpath expr="//field[@name='child_ids']/kanban//div[hasclass('oe_kanban_details')]/div[@t-if=&quot;record.mobile.raw_value&quot;]" position="after">
<xpath expr="//field[@name='child_ids']/kanban//div[hasclass('oe_kanban_details')]/div[@t-if=&quot;record.email.raw_value&quot;]" position="move"/>
</xpath>
</field>
</record>
</odoo>