<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="view_partner_form_inherit_l10n_es_edi_facturae" model="ir.ui.view">
        <field name="name">res.partner.form.inherit.l10n_es_edi_facturae</field>
        <field name="model">res.partner</field>
        <field name="inherit_id" ref="base.view_partner_form"/>
        <field name="arch" type="xml">
            <xpath expr="//field[@name='child_ids']//div[hasclass('oe_edit_only')]" position="inside">
                <p class="mb-0" attrs="{'invisible': [('type', '!=', 'facturae_ac')]}">
                    <span>Administrative Center for Spain Public Administrations. Used in Spanish electronic invoices.</span>
                </p>
            </xpath>
            <xpath expr="//field[@name='child_ids']//form//field[@name='name']" position="after">
                <field name="l10n_es_edi_facturae_ac_center_code" attrs="{'invisible': [('type', '!=', 'facturae_ac')]}"/>
                <field name="l10n_es_edi_facturae_ac_role_type_ids" widget="many2many_tags" attrs="{'invisible': [('type', '!=', 'facturae_ac')]}"/>
                <field name="l10n_es_edi_facturae_ac_physical_gln" attrs="{'invisible': [('type', '!=', 'facturae_ac')]}"/>
                <field name="l10n_es_edi_facturae_ac_logical_operational_point" attrs="{'invisible': [('type', '!=', 'facturae_ac')]}"/>
            </xpath>
        </field>
    </record>
</odoo>
