<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <template
        id="report_purchaseorder_document_triple_discount"
        inherit_id="purchase_discount.report_purchaseorder_document"
    >
        <xpath expr="//table[1]/thead/tr//th[last()-1]" position="attributes">
            <attribute name="style">display: none;</attribute>
        </xpath>
        <xpath expr="//table[1]/thead/tr//th[last()]" position="before">
            <th name="th_discount1" class="text-right">
                <strong>Disc. 1 (%)</strong>
            </th>
            <th name="th_discount2" class="text-right">
                <strong>Disc. 2 (%)</strong>
            </th>
           <th name="th_discount3" class="text-right">
                <strong>Disc. 3 (%)</strong>
            </th>
        </xpath>
        <xpath expr="//td[span[@t-field='line.discount']]" position="attributes">
            <attribute name="style">display: none;</attribute>
        </xpath>
        <xpath expr="//td[span[@t-field='line.discount']]" position="after">
            <td name="td_discount1" class="text-right">
                <span t-field="line.discount1" />
            </td>
            <td name="td_discount2" class="text-right">
                <span t-field="line.discount2" />
            </td>
            <td name="td_discount3" class="text-right">
                <span t-field="line.discount3" />
            </td>
        </xpath>
    </template>
</odoo>
