<?xml version="1.0"?>
<odoo>
        <record id="crm_lead_lost_view_form" model="ir.ui.view">
            <field name="name">crm.lead.lost.form</field>
            <field name="model">crm.lead.lost</field>
            <field name="arch" type="xml">
                <form string="Lost Lead">
                    <field name="lead_ids" invisible="1"></field>
                    <field name="lost_reason_id" placeholder="Select a Lost Reason..." widget="selection_badge" />
                    <group>
                        <label for="lost_feedback" class="o_form_label">Closing Note</label>
                        <field name="lost_feedback" placeholder="What went wrong?" nolabel="1" colspan="2"/>
                    </group>
                    <footer>
                        <button name="action_lost_reason_apply" string="Mark as Lost" type="object" class="btn-primary" data-hotkey="q"/>
                        <button string="Discard" class="btn-secondary" special="cancel" data-hotkey="x"/>
                    </footer>
                </form>
            </field>
        </record>

        <record id="crm_lead_lost_action" model="ir.actions.act_window">
            <field name="name">Mark Lost</field>
            <field name="res_model">crm.lead.lost</field>
            <field name="view_mode">form</field>
            <field name="view_id" ref="crm_lead_lost_view_form"/>
            <field name="target">new</field>
            <field name="binding_model_id" ref="crm.model_crm_lead"/>
            <field name="context">{
                'dialog_size' : 'medium',
                'default_lead_ids': active_ids,
            }</field>
        </record>
</odoo>
