<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>

        <record model="ir.ui.view" id="crm_lead_forward_to_partner_form">
            <field name="name">crm_lead_forward_to_partner</field>
            <field name="model">crm.lead.forward.to.partner</field>
            <field name="arch" type="xml">
                <form string="Send Mail" version="7.0">
                    <field name="composition_mode" colspan="2" nolabel="1" invisible="1"/>
                    <field name="model" colspan="2" nolabel="1" invisible="1"/>
                    <field name="res_id" colspan="2" nolabel="1" invisible="1"/>
                    <separator string="Forward to Partner" colspan="4"/>
                    <group col="4">
                        <field name="history_mode" colspan="4"
                            on_change="on_change_history_mode(history_mode, model, res_id)"/>
                        <field name="subject" colspan="4"/>
                        <field name="partner_ids" colspan="4" widget="many2many_tags_email"/>
                        <notebook colspan="4">
                            <page string="Body">
                                <field name="body"/>
                            </page>
                            <page string="Attachments">
                                <field name="attachment_ids"/>
                            </page>
                        </notebook>
                    </group>
                    <footer>
                        <button name="action_forward" string="Send" type="object"
                            class="oe_highlight"/>
                        or
                        <button string="Cancel" special="cancel"
                            class="oe_link"/>
                    </footer>
                </form>
            </field>
        </record>

        <record model="ir.actions.act_window" id="crm_lead_forward_to_partner_act">
            <field name="name">Forward to Partner</field>
            <field name="res_model">crm.lead.forward.to.partner</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="view_id" ref="crm_lead_forward_to_partner_form"/>
            <field name="target">new</field>
        </record>

        <act_window id="action_crm_send_mass_forward"
            multi="True"
            key2="client_action_multi" name="Mass forward to partner"
            res_model="crm.lead.forward.to.partner" src_model="crm.lead"
            view_mode="form" target="new" view_type="form"
            context="{'default_composition_mode' : 'mass_mail'}"
            view_id="crm_lead_forward_to_partner_form"
        />

    </data>
</openerp>
