<?xml version="1.0"?>
<openerp>
<data>

    <act_window
        id="crm_case_categ_meet_create_partner"
        name="Schedule a Meeting"
        res_model="crm.meeting"
        src_model="res.partner"
        view_mode="calendar,tree,form,gantt"
        context="{'default_partner_id': active_id, 'default_duration': 4.0}"
        domain="[('partner_id', '=', active_id)]"
    />

    <record model="ir.actions.act_window" id="crm_case_categ_meet_create_partner">
        <field name="context" eval="{'default_state':'draft'}"/>
    </record>


    <record model="ir.actions.act_window.view" id="action_crm_tag_calendar_meet_partner">
        <field name="sequence" eval="1"/>
        <field name="view_mode">calendar</field>
        <field name="view_id" ref="crm_case_calendar_view_meet"/>
        <field name="act_window_id" ref="crm_case_categ_meet_create_partner"/>
    </record>

    <record model="ir.actions.act_window.view" id="action_crm_tag_tree_meet_partner">
        <field name="sequence" eval="2"/>
        <field name="view_mode">tree</field>
        <field name="view_id" ref="crm_case_tree_view_meet"/>
        <field name="act_window_id" ref="crm_case_categ_meet_create_partner"/>
    </record>

    <record model="ir.actions.act_window.view" id="action_crm_tag_form_meet_partner">
        <field name="sequence" eval="3"/>
        <field name="view_mode">form</field>
        <field name="view_id" ref="crm_case_form_view_meet"/>
        <field name="act_window_id" ref="crm_case_categ_meet_create_partner"/>
    </record>

    <record model="ir.actions.act_window.view" id="action_crm_tag_gantt_meet_partner">
        <field name="sequence" eval="3"/>
        <field name="view_mode">gantt</field>
        <field name="view_id" ref="crm_case_gantt_view_meet"/>
        <field name="act_window_id" ref="crm_case_categ_meet_create_partner"/>
    </record>

    <record model="ir.actions.act_window" id="crm_case_categ_meet">
        <field name="name">Meetings</field>
        <field name="res_model">crm.meeting</field>
        <field name="view_mode">calendar,tree,form,gantt</field>
        <field name="view_id" ref="crm_case_calendar_view_meet"/>
        <field name="context">{"search_default_user_id":uid}</field>
        <field name="search_view_id" ref="view_crm_case_meetings_filter"/>
        <field name="help">The calendar of meetings is shared between sales teams and fully integrated with the others applications like the employee holidays. You can also synchronize meetings with your mobile phone using the caldav interface.</field>
    </record>

    <record model="ir.actions.act_window.view" id="action_crm_tag_calendar_meet">
        <field name="sequence" eval="1"/>
        <field name="view_mode">calendar</field>
        <field name="view_id" ref="crm_case_calendar_view_meet"/>
        <field name="act_window_id" ref="crm_case_categ_meet"/>
    </record>

    <record model="ir.actions.act_window.view" id="action_crm_tag_tree_meet">
        <field name="sequence" eval="2"/>
        <field name="view_mode">tree</field>
        <field name="view_id" ref="crm_case_tree_view_meet"/>
        <field name="act_window_id" ref="crm_case_categ_meet"/>
    </record>

    <record model="ir.actions.act_window.view" id="action_crm_tag_form__meet">
        <field name="sequence" eval="3"/>
        <field name="view_mode">form</field>
        <field name="view_id" ref="crm_case_form_view_meet"/>
        <field name="act_window_id" ref="crm_case_categ_meet"/>
    </record>

    <record model="ir.actions.act_window.view" id="action_crm_tag_gantt_meet">
        <field name="sequence" eval="1"/>
        <field name="view_mode">gantt</field>
        <field name="view_id" ref="crm_case_gantt_view_meet"/>
        <field name="act_window_id" ref="crm_case_categ_meet"/>
    </record>

<!-- ALL MEETINGS -->

    <menuitem name="Meetings" id="menu_meeting_sale"
        parent="base.menu_base_partner" sequence="3"/>

    <menuitem name="Meetings" id="menu_crm_case_categ_meet"
        action="crm_case_categ_meet" parent="menu_meeting_sale"
        sequence="1" />

    <record id="ir_ui_view_sc_calendar0" model="ir.ui.view_sc">
        <field name="name">Calendar</field>
        <field name="resource">ir.ui.menu</field>
        <field name="user_id" ref="base.user_root"/>
        <field name="res_id" ref="crm.menu_crm_case_categ_meet"/>
    </record>
    <record id="action_view_attendee_form" model="ir.actions.act_window">
         <field name="name">Meeting Invitations</field>
         <field name="type">ir.actions.act_window</field>
         <field name="res_model">calendar.attendee</field>
         <field name="view_type">form</field>
         <field name="view_mode">tree,form</field>
         <field name="view_id" ref="base_calendar.base_calendar_attendee_tree_view" />
        <field name="domain">[('ref','like','crm.meeting,')]</field>
         <field name="context">{"search_default_toreview":1, "search_default_user_id":uid}</field>
     </record>

    <menuitem id="menu_attendee_invitations"
            name="Meeting Invitations" parent="crm.menu_meeting_sale"
            sequence="10" action="action_view_attendee_form"
            groups="base.group_extended" />

</data>
</openerp>
