<?xml version="1.0"?>
<t t-name="l10n_es_edi_facturae.address_type">
            <t t-if="partner_country_code == 'ESP'">
                <AddressInSpain>
                    <Address t-out="', '.join(val for val in (partner.street, partner.street2) if val)[:80]"/>
                    <PostCode t-out="str(partner.zip)"/>
                    <Town t-out="(partner.city or '')[:50]"/>
                    <Province t-out="partner.state_id.name[:20] if partner.state_id else partner.country_id.name[:20]"/>
                    <CountryCode t-out="partner_country_code"/>
                </AddressInSpain>
            </t>
            <t t-else="">
                <OverseasAddress>
                    <Address t-out="', '.join(val for val in (partner.street, partner.street2) if val)[:80]"/>
                    <PostCodeAndTown t-out="' '.join(var for var in (str(partner.zip), partner.city) if var)[:50]"/>
                    <Province t-out="partner.state_id.name[:20] if partner.state_id else partner.country_id.name[:20]"/>
                    <CountryCode t-out="partner_country_code"/>
                </OverseasAddress>
            </t>
        </t>

        