<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <template
        id="report_purchaseorder_document_inherit"
        inherit_id="purchase_stock.report_purchaseorder_document"
    >
        <xpath
            expr="//div[@t-if='o.picking_type_id and o.picking_type_id.warehouse_id']"
            position="attributes"
        >
            <attribute
                name="t-att-style"
            >'display: none!important' if o.picking_type_id.warehouse_id.warehouse_address_details else ''</attribute>
        </xpath>
        <xpath
            expr="//div[@t-if='o.picking_type_id and o.picking_type_id.warehouse_id']"
            position="after"
        >
            <div t-if="o.picking_type_id.warehouse_id.warehouse_address_details">
                <span
                    t-field="o.picking_type_id.warehouse_id.warehouse_address_details"
                />
            </div>
        </xpath>
    </template>
</odoo>
