<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
    <data>
        <record id="view_partner_form_inherit_l10n_dk" model="ir.ui.view">
            <field name="name">res.partner.form.inherit.l10n_dk</field>
            <field name="model">res.partner</field>
            <field name="inherit_id" ref="account_edi_ubl_cii.view_partner_property_form"/>
            <field name="arch" type="xml">
                <xpath expr="//field[@name='company_registry']" position="attributes">
                    <attribute name="invisible" add="country_code == 'DK'" separator=" or "/>
                </xpath>
                <xpath expr="//field[@name='company_registry']" position="after">
                    <field name="company_registry" string="CVR" options="{'placeholder_field': 'company_registry_placeholder'}" invisible="country_code != 'DK'"/>
                </xpath>
                <xpath expr="//group[@id='invoice_send_settings']" position="inside">
                    <label for="nemhandel_identifier_type" string="Nemhandel Address" invisible="not is_using_nemhandel"/>
                    <div id="nemhandel_address" invisible="not is_using_nemhandel" class="row">
                        <field name="nemhandel_identifier_type" class="w-25"/>
                        <field name="nemhandel_identifier_value" placeholder="Endpoint" class="w-75"/>
                    </div>
                    <label for="nemhandel_verification_state"
                           groups="base.group_no_one"
                           invisible="not is_using_nemhandel or not nemhandel_identifier_value"
                    />
                    <div class="row"
                         groups="base.group_no_one"
                         invisible="not is_using_nemhandel or not nemhandel_identifier_value">
                        <div class="col-4">
                            <field name="nemhandel_verification_state" readonly="True"/>
                        </div>
                        <div class="col-8 pt-0">
                            <button name="button_nemhandel_check_partner_endpoint"
                                    class="btn btn-secondary"
                                    type="object"
                                    string="Verify"
                                    help="Verify partner's Nemhandel endpoint"/>
                        </div>
                    </div>
                </xpath>
            </field>
        </record>
    </data>
</odoo>
