<?xml version="1.0"?>
<t t-name="account_edi_ubl_cii.ubl_20_CommonLineType">
        <t xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
            <cbc:ID t-out="vals.get('id')"/>
            <cbc:Note t-out="vals.get('note')"/>
            <cbc:LineExtensionAmount t-att-currencyID="vals['currency'].name" t-out="format_float(vals.get('line_extension_amount'), vals.get('currency_dp'))"/>
            <cac:PricingReference>
                <t t-set="pr_vals" t-value="vals.get('pricing_reference_vals', {})"/>
                <cac:AlternativeConditionPrice t-foreach="pr_vals.get('alternative_condition_price_vals', [])" t-as="foreach_vals">
                    <cbc:PriceAmount t-att-currencyID="foreach_vals['currency'].name" t-out="format_float(foreach_vals.get('price_amount'), foreach_vals.get('price_amount_dp'))"/>
                    <cbc:PriceTypeCode t-out="foreach_vals.get('price_type_code')"/>
                </cac:AlternativeConditionPrice>
            </cac:PricingReference>
            <cac:TaxTotal t-foreach="vals.get('tax_total_vals', [])" t-as="foreach_vals">
                <t t-call="{{TaxTotalType_template}}">
                    <t t-set="vals" t-value="foreach_vals"/>
                </t>
            </cac:TaxTotal>
            <cac:Item>
                <t t-set="item_vals" t-value="vals.get('item_vals', {})"/>
                <cbc:Description t-out="item_vals.get('description')"/>
                <cbc:Name t-out="item_vals.get('name')"/>
                <cbc:BrandName t-out="item_vals.get('brand_name')"/>
                <cbc:ModelName t-out="item_vals.get('model_name')"/>
                <cac:SellersItemIdentification>
                    <t t-set="sellers_item_identification_vals" t-value="item_vals.get('sellers_item_identification_vals', {})"/>
                    <cbc:ID t-out="sellers_item_identification_vals.get('id')"/>
                    <cbc:ExtendedID t-out="sellers_item_identification_vals.get('extended_id')"/>
                </cac:SellersItemIdentification>
                <cac:StandardItemIdentification>
                    <t t-set="standard_item_identification_vals" t-value="item_vals.get('standard_item_identification_vals', {})"/>
                    <cbc:ID t-att="standard_item_identification_vals.get('id_attrs')" t-out="standard_item_identification_vals.get('id')"/>
                </cac:StandardItemIdentification>
                <cac:CommodityClassification t-foreach="item_vals.get('commodity_classification_vals', [])" t-as="foreach_vals">
                    <cbc:ItemClassificationCode t-att="foreach_vals.get('item_classification_attrs', {})" t-out="foreach_vals.get('item_classification_code')"/>
                </cac:CommodityClassification>
                <cac:ClassifiedTaxCategory t-foreach="item_vals.get('classified_tax_category_vals', [])" t-as="foreach_vals">
                    <t t-call="{{TaxCategoryType_template}}">
                        <t t-set="vals" t-value="foreach_vals"/>
                    </t>
                </cac:ClassifiedTaxCategory>
            </cac:Item>
            <cac:Price>
                <t t-set="price_vals" t-value="vals.get('price_vals', {})"/>
                <cbc:PriceAmount t-att-currencyID="price_vals['currency'].name" t-out="price_vals.get('price_amount')"/>
                <!-- nbr of item units to which the price applies), i.e.: 1 Dozen = 12 units, not mandatory -->
                <cbc:BaseQuantity t-att="price_vals.get('base_quantity_attrs', {})" t-out="price_vals.get('base_quantity')"/>
            </cac:Price>
        </t>
    </t>

    