<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <record id="view_move_form_inherit_l10n_es_edi" model="ir.ui.view">
            <field name="name">account.move.form.inherit.l10n_es_edi</field>
            <field name="model">account.move</field>
            <field name="inherit_id" ref="account.view_move_form"/>
            <field name="arch" type="xml">
                <xpath expr="//group[@id='other_tab_group']//group[@name='accounting_info_group']" position="inside">
                    <field name="l10n_es_registration_date" readonly="state == 'posted'" invisible="country_code != 'ES'"/>
                    <field name="l10n_es_edi_csv" invisible="1"/>
                </xpath>
                <field name="ref" position="attributes">
                    <attribute name="readonly">l10n_es_edi_csv</attribute>
                </field>
            </field>
        </record>
    </data>
</odoo>
