<?xml version="1.0"?>
<t t-name="account_edi_ubl_cii.ubl_20_CommonType">
        <t xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
            <cbc:UBLVersionID t-out="vals.get('ubl_version_id')"/>
            <cbc:CustomizationID t-out="vals.get('customization_id')"/>
            <cbc:ProfileID t-att="vals.get('profile_id_attrs', {})" t-out="vals.get('profile_id')"/>
            <cbc:ID t-out="vals.get('id')"/>
            <cbc:CopyIndicator t-out="vals.get('copy_indicator')"/>
            <cbc:UUID t-att="vals.get('uuid_attrs', {})" t-out="vals.get('uuid')"/>
            <cbc:IssueDate t-out="vals.get('issue_date')"/>
            <cbc:IssueTime t-out="vals.get('issue_time')"/>
            <cbc:Note t-foreach="vals.get('note_vals', [])" t-as="note_vals" t-att="note_vals.get('note_attrs', {})" t-out="note_vals.get('note')"/>
            <cbc:DocumentCurrencyCode t-att="vals.get('document_currency_code_attrs', {})" t-out="vals.get('document_currency_code')"/>
            <cbc:PricingCurrencyCode t-att="vals.get('pricing_currency_code_attrs', {})" t-out="vals.get('pricing_currency_code')"/>
            <cbc:TaxCurrencyCode t-att="vals.get('tax_currency_code_attrs', {})" t-out="vals.get('tax_currency_code')"/>
            <cbc:LineCountNumeric t-out="vals.get('line_count_numeric')"/>
            <cac:InvoicePeriod t-foreach="vals.get('invoice_period_vals_list', [])" t-as="foreach_vals">
                <t t-call="{{InvoicePeriodType_template}}">
                    <t t-set="vals" t-value="foreach_vals"/>
                </t>
            </cac:InvoicePeriod>
            <cac:OrderReference>
                <cbc:ID t-out="vals.get('order_reference')"/>
                <cbc:SalesOrderID t-out="vals.get('sales_order_id')"/>
                <cbc:IssueDate t-out="vals.get('order_issue_date')"/>
            </cac:OrderReference>
            <cac:BillingReference>
                <t t-set="billing_reference_vals" t-value="vals.get('billing_reference_vals', {})"/>
                <cac:InvoiceDocumentReference>
                    <cbc:ID t-out="billing_reference_vals.get('id')"/>
                    <cbc:UUID t-att="billing_reference_vals.get('uuid_attrs')" t-out="billing_reference_vals.get('uuid')"/>
                    <cbc:IssueDate t-out="billing_reference_vals.get('issue_date')"/>
                    <cbc:DocumentTypeCode t-out="billing_reference_vals.get('document_type_code')"/>
                </cac:InvoiceDocumentReference>
            </cac:BillingReference>
            <t t-foreach="vals.get('additional_document_reference_list', [])" t-as="foreach_vals">
                <cac:AdditionalDocumentReference>
                    <cbc:ID t-out="foreach_vals.get('id')"/>
                    <cbc:IssueDate t-out="foreach_vals.get('issue_date')"/>
                    <cbc:DocumentTypeCode t-out="foreach_vals.get('document_type_code')"/>
                    <cbc:DocumentType t-out="foreach_vals.get('document_type')"/>
                    <cbc:DocumentDescription t-out="foreach_vals.get('document_description')"/>
                </cac:AdditionalDocumentReference>
            </t>
            <cac:Signature t-foreach="vals.get('signature_vals', [])" t-as="foreach_vals">
                <t t-call="{{SignatureType_template}}">
                    <t t-set="vals" t-value="foreach_vals"/>
                </t>
            </cac:Signature>
            <cac:AccountingSupplierParty>
                <t t-set="accounting_supplier_vals" t-value="vals.get('accounting_supplier_party_vals', {})"/>
                <cbc:CustomerAssignedAccountID t-out="accounting_supplier_vals.get('customer_assigned_account_id')"/>
                <cbc:AdditionalAccountID t-out="accounting_supplier_vals.get('additional_account_id')"/>
                <cac:Party>
                    <t t-call="{{PartyType_template}}">
                        <t t-set="vals" t-value="accounting_supplier_vals.get('party_vals', {})"/>
                    </t>
                </cac:Party>
            </cac:AccountingSupplierParty>
            <cac:AccountingCustomerParty>
                <t t-set="accounting_customer_vals" t-value="vals.get('accounting_customer_party_vals', {})"/>
                <cbc:AdditionalAccountID t-out="accounting_customer_vals.get('additional_account_id')"/>
                <cac:Party>
                    <t t-call="{{PartyType_template}}">
                        <t t-set="vals" t-value="accounting_customer_vals.get('party_vals', {})"/>
                    </t>
                </cac:Party>
            </cac:AccountingCustomerParty>
            <cac:PaymentExchangeRate>
                <t t-set="exchange_rate_vals" t-value="vals.get('payment_exchange_rate_vals', {})"/>
                <cbc:SourceCurrencyCode t-out="exchange_rate_vals.get('source_currency_code')"/>
                <cbc:SourceCurrencyBaseRate t-out="exchange_rate_vals.get('source_currency_base_rate')"/>
                <cbc:TargetCurrencyCode t-out="exchange_rate_vals.get('target_currency_code')"/>
                <cbc:TargetCurrencyBaseRate t-out="exchange_rate_vals.get('target_currency_base_rate')"/>
                <cbc:CalculationRate t-out="exchange_rate_vals.get('calculation_rate')"/>
                <cbc:Date t-out="exchange_rate_vals.get('date')"/>
            </cac:PaymentExchangeRate>
            <cac:PricingExchangeRate t-foreach="vals.get('pricing_exchange_rate_vals_list', [])" t-as="foreach_vals">
                <t t-call="{{ExchangeRateType_template}}">
                    <t t-set="vals" t-value="foreach_vals"/>
                </t>
            </cac:PricingExchangeRate>
            <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>
        </t>
    </t>

    