<?xml version="1.0"?>
<data inherit_id="account_edi_ubl_cii.ubl_20_InvoiceLineType" primary="True">
        <xpath expr="//*[local-name()='Item']" position="before">
            <t t-if="invoice.move_type == 'out_refund'">
                <!-- AllowanceCharge and TaxTotal are swapped in the CreditLine
                w.r.t InvoiceLine. see: http://www.datypic.com/sc/ubl21/e-cac_InvoiceLine.html
                vs http://www.datypic.com/sc/ubl21/e-cac_CreditNoteLine.html-->
                <t t-foreach="vals.get('allowance_charge_vals', [])" t-as="foreach_vals">
                    <cac:AllowanceCharge xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
                        <t t-call="{{AllowanceChargeType_template}}">
                            <t t-set="vals" t-value="foreach_vals"/>
                        </t>
                    </cac:AllowanceCharge>
                </t>
            </t>
        </xpath>
    <xpath expr="." position="attributes"><attribute name="t-name">account_edi_ubl_cii.ubl_21_InvoiceLineType</attribute></xpath></data>

    