<?xml version="1.0"?>
<t t-name="purchase_edi_ubl_bis3.bis3_PartyType">
        <t xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
            <cac:PartyName>
                <cbc:Name t-out="vals.get('party_name')"/>
            </cac:PartyName>
            <cac:PostalAddress>
                <t t-call="purchase_edi_ubl_bis3.bis3_AddressType">
                    <t t-set="vals" t-value="vals.get('postal_address_vals', {})"/>
                </t>
            </cac:PostalAddress>
            <cac:PartyTaxScheme t-if="vals.get('party_tax_scheme_vals')">
                <t t-set="party_tax_scheme_vals" t-value="vals.get('party_tax_scheme_vals')"/>
                <cbc:CompanyID t-out="party_tax_scheme_vals.get('company_id')"/>
                <cac:TaxScheme>
                    <t t-set="tax_scheme_vals" t-value="party_tax_scheme_vals['tax_scheme_vals']"/>
                    <cbc:ID t-out="tax_scheme_vals['id']"/>
                </cac:TaxScheme>
            </cac:PartyTaxScheme>
            <cac:PartyLegalEntity t-if="'party_legal_entity_vals' in vals">
                <t t-set="party_legal_entity_vals" t-value="vals['party_legal_entity_vals']"/>
                <cbc:RegistrationName t-out="party_legal_entity_vals['registration_name']"/>
                <cbc:CompanyID t-out="party_legal_entity_vals['company_id']"/>
                <cac:RegistrationAddress t-if="'registration_address' in party_legal_entity_vals">
                    <t t-call="purchase_edi_ubl_bis3.bis3_AddressType">
                        <t t-set="vals" t-value="party_legal_entity_vals['registration_address_vals']"/>
                    </t>
                </cac:RegistrationAddress>
            </cac:PartyLegalEntity>
            <cac:Contact t-if="vals.get('contact_vals')">
                <t t-call="purchase_edi_ubl_bis3.bis3_ContactType">
                    <t t-set="vals" t-value="vals.get('contact_vals')"/>
                </t>
            </cac:Contact>
        </t>
    </t>

    