<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <data>
        <template id="external_layout_din5008_deliveryslip" inherit_id="l10n_din5008.external_layout_din5008">
            <xpath expr="//div[@id='din5008_report_main_address']" position="before">
                <t t-if="o and o._name == 'stock.picking' and (o.should_print_delivery_address() or o.partner_id)">
                    <t t-set="address">
                        <t t-set="main_address" t-value="o.move_ids[0].partner_id if o.should_print_delivery_address() else o.partner_id"/>
                        <t t-if="o.should_print_delivery_address()">
                            <address class="mb-0" t-field="o.move_ids[0].partner_id" t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True}'/>
                        </t>
                        <t t-else="">
                            <address class="mb-0" t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True}'/>
                        </t>
                    </t>
                </t>
            </xpath>
        </template>
    </data>
</odoo>
