<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="res_config_settings_view_form" model="ir.ui.view">
        <field name="name">res.config.settings.view.form.inherit.l10n.es</field>
        <field name="model">res.config.settings</field>
        <field name="inherit_id" ref="account.res_config_settings_view_form"/>
        <field name="arch" type="xml">
            <xpath expr="//div[@data-key='account']/div[@name='spain_localization']//div[hasclass('o_setting_right_pane')]/span[hasclass('o_form_label')]" position="replace">
                <span class="o_form_label">Registro de Libros connection SII/TicketBAI</span>
            </xpath>
            <xpath expr="//div[@data-key='account']/div[@name='spain_localization']//div[hasclass('o_setting_right_pane')]//div[hasclass('mt16')]/*" position="before">
                <label for="l10n_es_tbai_tax_agency" class="o_light_label"/>
                <field name="l10n_es_tbai_tax_agency"/>
                <div class="text-muted" attrs="{'invisible': [('l10n_es_tbai_tax_agency', '!=', False)]}">
                    No tax agency selected: TicketBAI not activated.
                </div>
                <div class="text-muted" attrs="{'invisible': [('l10n_es_tbai_tax_agency', '=', False)]}">
                    Tax agency selected: TicketBAI is activated.
                </div>
                <br/>
            </xpath>
        </field>
    </record>
</odoo>
