<odoo>
    <record id="certificate_cancel_wizard_form" model="ir.ui.view">
        <field name="name">Cancelar CFDI</field>
        <field name="model">l10n_mx_cfdi.document_cancel</field>
        <field name="arch" type="xml">
            <form>
                <group>
                    <field name="certificate_ids" readonly="True">
                        <tree>
                            <field name="name" string="Folio" />
                            <field name="type" />
                            <field name="uuid" />
                            <field name="state" widget="badge" />
                        </tree>
                    </field>
                    <field name="cancel_reason_id" />
                    <field name="requires_replacement" invisible="1" />
                    <field
                        name="replacement_certificate_id"
                        attrs="{
                            'invisible':[('requires_replacement', '=', False)],
                            'required':[('requires_replacement', '=', True)],
                           }"
                    />
                </group>
                <footer>
                    <label for="simulate_operation" string="Simular operación" />
                    <field name="simulate_operation" />

                    <button type="object" name="cancel_certificate" string="Aceptar" />
                    <button special="cancel" string="Cancelar" class="btn-secondary" />

                </footer>
            </form>
        </field>
    </record>

    <record id="document_cancel_action" model="ir.actions.act_window">
        <field name="name">Cancelar CFDI</field>
        <field name="res_model">l10n_mx_cfdi.document_cancel</field>
        <field name="view_mode">form</field>
        <field name="target">new</field>
    </record>
</odoo>
