<?xml version="1.0"?>
<openerp>
<data noupdate="1">
    
    <act_window
        id="crm_case_categ_phone_create_partner"
        name="Schedule Phone Call"
        res_model="crm.case"
        src_model="res.partner"
        view_mode="calendar,tree,form"
        context="{'default_partner_id': active_id, 'default_duration': 1.0}"
        domain="[('section_id','=','Phone Calls')]"/>

    <record model="ir.actions.act_window" id="crm_case_categ_phone_create_partner">
        <field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+')]'"/>
    </record>
    ######################## PHONE CALLS (menu) ###########################
    <record model="ir.actions.act_window" id="crm_case_categ_phone0">
        <field name="name">Phone Calls</field>
        <field name="res_model">crm.case</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,calendar</field>
        <field name="view_id" ref="crm_case_phone_tree_view"/>
        <field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+')]'"/>
    </record>
    <record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone0">
        <field name="sequence" eval="1"/>
        <field name="view_mode">tree</field>
        <field name="view_id" ref="crm_case_phone_tree_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone0"/>
    </record>    
    <record model="ir.actions.act_window.view" id="action_crm_tag_calendar_phone0">
        <field name="sequence" eval="2"/>
        <field name="view_mode">calendar</field>
        <field name="view_id" ref="crm_case_phone_calendar_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone0"/>
    </record>
    <record model="ir.actions.act_window.view" id="action_crm_tag_form_phone0">
        <field name="sequence" eval="3"/>
        <field name="view_mode">form</field>
        <field name="view_id" ref="crm_case_phone_form_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone0"/>
    </record>
    <menuitem name="Phone Calls" id="menu_crm_case_phone"  parent="crm.menu_crm" action="crm_case_categ_phone0"/>

    <record model="ir.actions.act_window" id="crm_case_categ_phone_incoming0">
        <field name="name">Inbound</field>
        <field name="res_model">crm.case</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,calendar</field>
        <field name="view_id" ref="crm_case_phone_tree_view"/>
        <field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone1'))+')]'"/>
    </record>
    <record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_incoming0">
        <field name="sequence" eval="1"/>
        <field name="view_mode">tree</field>
        <field name="view_id" ref="crm_case_phone_tree_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_incoming0"/>
    </record>    
    <record model="ir.actions.act_window.view" id="action_crm_tag_calendar_phone_incoming0">
        <field name="sequence" eval="2"/>
        <field name="view_mode">calendar</field>
        <field name="view_id" ref="crm_case_phone_calendar_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_incoming0"/>
    </record>
    <record model="ir.actions.act_window.view" id="action_crm_tag_form_phone_incoming0">
        <field name="sequence" eval="3"/>
        <field name="view_mode">form</field>
        <field name="view_id" ref="crm_case_phone_form_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_incoming0"/>
    </record>
    <menuitem name="Inbound" id="menu_crm_case_categ_phone_incoming0"  parent="menu_crm_case_phone" action="crm_case_categ_phone_incoming0"/>

    <record model="ir.actions.act_window" id="crm_case_categ_phone_incoming1">
        <field name="name">New Incoming Call</field>
        <field name="res_model">crm.case</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree</field>
        <field name="view_id" ref="crm_case_phone_form_view"/>
        <field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone1'))+')]'"/>
    </record>
    <record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_incoming1">
        <field name="sequence" eval="2"/>
        <field name="view_mode">tree</field>
        <field name="view_id" ref="crm_case_phone_tree_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_incoming1"/>
    </record>    
    <record model="ir.actions.act_window.view" id="action_crm_tag_form_phone_incoming1">
        <field name="sequence" eval="1"/>
        <field name="view_mode">form</field>
        <field name="view_id" ref="crm_case_phone_form_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_incoming1"/>
    </record>
    <menuitem name="New Incoming Call" id="menu_crm_case_categ_phone_incoming1"  parent="menu_crm_case_categ_phone_incoming0" action="crm_case_categ_phone_incoming1"/>

    <record model="ir.actions.act_window" id="crm_case_categ_phone_incoming2">
        <field name="name">Planned Calls</field>
        <field name="res_model">crm.case</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,calendar</field>
        <field name="view_id" ref="crm_case_phone_tree_view"/>
        <field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone1'))+'), (\'state\',\'=\',\'open\')]'"/>
    </record>
    <record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_incoming2">
        <field name="sequence" eval="1"/>
        <field name="view_mode">tree</field>
        <field name="view_id" ref="crm_case_phone_tree_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_incoming2"/>
    </record>
    <record model="ir.actions.act_window.view" id="action_crm_tag_calendar_phone_incoming2">
        <field name="sequence" eval="2"/>
        <field name="view_mode">calendar</field>
        <field name="view_id" ref="crm_case_phone_calendar_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_incoming2"/>
    </record>
    <record model="ir.actions.act_window.view" id="action_crm_tag_form_phone_incoming2">
        <field name="sequence" eval="3"/>
        <field name="view_mode">form</field>
        <field name="view_id" ref="crm_case_phone_form_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_incoming2"/>
    </record>
    <menuitem name="Planned Calls" id="menu_crm_case_categ_phone_incoming2"  parent="menu_crm_case_categ_phone_incoming0" action="crm_case_categ_phone_incoming2"/>

################################################################
    <record model="ir.actions.act_window" id="crm_case_categ_phone_outgoing0">
        <field name="name">Outbound</field>
        <field name="res_model">crm.case</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,calendar</field>
        <field name="view_id" ref="crm_case_phone_tree_view"/>
        <field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone2'))+')]'"/>
    </record>
    <record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_outgoing0">
        <field name="sequence" eval="1"/>
        <field name="view_mode">tree</field>
        <field name="view_id" ref="crm_case_phone_tree_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_outgoing0"/>
    </record>    
    <record model="ir.actions.act_window.view" id="action_crm_tag_calendar_phone_outgoing0">
        <field name="sequence" eval="2"/>
        <field name="view_mode">calendar</field>
        <field name="view_id" ref="crm_case_phone_calendar_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_outgoing0"/>
    </record>
    <record model="ir.actions.act_window.view" id="action_crm_tag_form_phone_outgoing0">
        <field name="sequence" eval="3"/>
        <field name="view_mode">form</field>
        <field name="view_id" ref="crm_case_phone_form_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_outgoing0"/>
    </record>
    <menuitem name="Outbound" id="menu_crm_case_categ_phone_outgoing0"  parent="menu_crm_case_phone" action="crm_case_categ_phone_outgoing0"/>

    <record model="ir.actions.act_window" id="crm_case_categ_phone_outgoing1">
        <field name="name">New Outgoing Call</field>
        <field name="res_model">crm.case</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree</field>
        <field name="view_id" ref="crm_case_phone_form_view"/>
        <field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone2'))+')]'"/>
    </record>
    <record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_outgoing1">
        <field name="sequence" eval="2"/>
        <field name="view_mode">tree</field>
        <field name="view_id" ref="crm_case_phone_tree_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_outgoing1"/>
    </record>    
    <record model="ir.actions.act_window.view" id="action_crm_tag_form_phone_outgoing1">
        <field name="sequence" eval="1"/>
        <field name="view_mode">form</field>
        <field name="view_id" ref="crm_case_phone_form_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_outgoing1"/>
    </record>
    <menuitem name="New Outgoing Call" id="menu_crm_case_categ_phone_outgoing1"  parent="menu_crm_case_categ_phone_outgoing0" action="crm_case_categ_phone_outgoing1"/>

    <record model="ir.actions.act_window" id="crm_case_categ_phone_outgoing2">
        <field name="name">Planned Calls</field>
        <field name="res_model">crm.case</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,calendar</field>
        <field name="view_id" ref="crm_case_phone_tree_view"/>
        <field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone2'))+'), (\'state\',\'=\',\'open\')]'"/>
    </record>
    <record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_outgoing2">
        <field name="sequence" eval="1"/>
        <field name="view_mode">tree</field>
        <field name="view_id" ref="crm_case_phone_tree_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_outgoing2"/>
    </record>
    <record model="ir.actions.act_window.view" id="action_crm_tag_calendar_phone_outgoing2">
        <field name="sequence" eval="2"/>
        <field name="view_mode">calendar</field>
        <field name="view_id" ref="crm_case_phone_calendar_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_outgoing2"/>
    </record>
    <record model="ir.actions.act_window.view" id="action_crm_tag_form_phone_outgoing2">
        <field name="sequence" eval="3"/>
        <field name="view_mode">form</field>
        <field name="view_id" ref="crm_case_phone_form_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_outgoing2"/>
    </record>
    <menuitem name="Planned Calls" id="menu_crm_case_categ_phone_outgoing2"  parent="menu_crm_case_categ_phone_outgoing0" action="crm_case_categ_phone_outgoing2"/>

    <record model="ir.actions.act_window" id="crm_case_categ_phone_outgoing4">
        <field name="name">Calls Not Held</field>
        <field name="res_model">crm.case</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,calendar</field>
        <field name="view_id" ref="crm_case_phone_tree_view"/>
        <field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('section_support_phone'))+'), (\'categ_id\',\'=\','+str(ref('categ_phone2'))+'), (\'state\',\'=\',\'pending\')]'"/>
    </record>
    <record model="ir.actions.act_window.view" id="action_crm_tag_tree_phone_outgoing4">
        <field name="sequence" eval="1"/>
        <field name="view_mode">tree</field>
        <field name="view_id" ref="crm_case_phone_tree_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_outgoing4"/>
    </record>
    <record model="ir.actions.act_window.view" id="action_crm_tag_calendar_phone_outgoing4">
        <field name="sequence" eval="2"/>
        <field name="view_mode">calendar</field>
        <field name="view_id" ref="crm_case_phone_calendar_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_outgoing4"/>
    </record>
    <record model="ir.actions.act_window.view" id="action_crm_tag_form_phone_outgoing4">
        <field name="sequence" eval="3"/>
        <field name="view_mode">form</field>
        <field name="view_id" ref="crm_case_phone_form_view"/>
        <field name="act_window_id" ref="crm_case_categ_phone_outgoing4"/>
    </record>
    <menuitem name="Calls Not Held" id="menu_crm_case_categ_phone_outgoing4"  parent="menu_crm_case_categ_phone_outgoing0" action="crm_case_categ_phone_outgoing4"/>

</data>
</openerp>
