<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <template
        id="report_saleorder_document"
        inherit_id="sale.report_saleorder_document"
    >
        <xpath
            expr="//table[hasclass('o_has_total_table','table','o_main_table')]//th[@name='th_quantity']"
            position="before"
        >
            <th name="th_secondary_uom_id" class="text-end" groups="uom.group_uom">
                <span>Second. Qty</span>
            </th>
        </xpath>
        <xpath expr="//span[@t-field='line.product_uom_qty']/.." position="before">
            <td name="td_secondary_uom_id" class="text-end" groups="uom.group_uom">
                <t t-if="line.secondary_uom_id">
                    <span t-field="line.secondary_uom_qty" />
                    <span
                        t-esc="' {}-{}-{}'.format(line.secondary_uom_id.name, line.secondary_uom_id.factor, line.secondary_uom_id.product_tmpl_id.uom_id.name)"
                    />
                </t>
            </td>
        </xpath>
    </template>
</odoo>
