<?xml version="1.0"?>
<openerp>
<data>
    #
    # Cases by section and category2 of case
    #

    <record model="ir.ui.view" id="view_crm_case_section_categ_tree">
        <field name="name">CRM Report - Sections and Type(Tree)</field>
        <field name="model">report.crm.case.section.categ2</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="Cases by Section and Type">
                <field name="name"/>
                <field name="user_id"/>
                <field name="section_id"/>
                <field name="category2_id"/>
                <field name="stage_id"/>
                <field name="amount_revenue"/>
                <field name="nbr"/>
                <field name="delay_close"/>
                <field name="state"/>
            </tree>
        </field>
    </record>
    <record model="ir.ui.view" id="view_crm_case_section_categ_form">
        <field name="name">CRM Report - Sections and Type(Form)</field>
        <field name="model">report.crm.case.section.categ2</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Cases by Section and Category2">
                <field name="name"/>
                <field name="user_id"/>
                <field name="section_id" select="1"/>
                <field name="category2_id" select="1"/>
                <field name="stage_id"/>
                <field name="amount_revenue"/>
                <field name="nbr" select="1"/>
                <field name="state" select="1"/>
                <field name="delay_close"/>
            </form>
        </field>
    </record>
    <record model="ir.ui.view" id="view_crm_case_section_categ_graph">
        <field name="name">CRM Report - Sections and Type(Graph)</field>
        <field name="model">report.crm.case.section.categ2</field>
        <field name="type">graph</field>
        <field name="arch" type="xml">
            <graph string="Cases by Section and Type" type="bar" orientation="horizontal">
                <field name="category2_id"/>
                <field name="amount_revenue" operator="+"/>
                <field name="section_id" group="True"/>
            </graph>
        </field>
    </record>

    <record model="ir.actions.act_window" id="action_report_crm_case_section_categ_tree_month">
        <field name="res_model">report.crm.case.section.categ2</field>
        <field name="view_type">form</field>
        <field name="view_mode">graph,tree</field>
        <field name="domain">[('name','=',time.strftime('%Y-%m-01'))]</field>
    </record>
    <menuitem parent="report_crm.next_id_65" name="Cases by Section and Type" action="action_report_crm_case_section_categ_tree_month" id="menu_crm_case_section_categ_tree_month"/>

    <record model="ir.actions.act_window" id="action_report_crm_case_section_categ_tree">
        <field name="res_model">report.crm.case.section.categ2</field>
        <field name="view_type">form</field>
        <field name="view_mode">graph,tree</field>
    </record>
    <menuitem parent="report_crm.next_id_66" name="Cases by Section and Type" action="action_report_crm_case_section_categ_tree" id="menu_crm_case_section_categ_tree"/>

    #
    # Cases by section and stage
    #

    <record model="ir.ui.view" id="view_crm_case_section_stage_tree">
        <field name="name">CRM Report - Sections and Stage(Tree)</field>
        <field name="model">report.crm.case.section.stage</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="Cases by Section and Stage">
                <field name="name"/>
                <field name="user_id"/>
                <field name="section_id"/>
                <field name="stage_id"/>
                <field name="amount_revenue"/>
                <field name="nbr"/>
                <field name="delay_close"/>
                <field name="state"/>
            </tree>
        </field>
    </record>
    <record model="ir.ui.view" id="view_crm_case_section_stage_form">
        <field name="name">CRM Report - Sections and Stage(Form)</field>
        <field name="model">report.crm.case.section.stage</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Cases by Section and Stage">
                <field name="name"/>
                <field name="user_id"/>
                <field name="section_id" select="1"/>
                <field name="stage_id"/>
                <field name="amount_revenue"/>
                <field name="nbr" select="1"/>
                <field name="state" select="1"/>
                <field name="delay_close"/>
            </form>
        </field>
    </record>
    <record model="ir.ui.view" id="view_crm_case_section_stage_graph">
        <field name="name">CRM Report - Sections and Stage(Graph)</field>
        <field name="model">report.crm.case.section.stage</field>
        <field name="type">graph</field>
        <field name="arch" type="xml">
            <graph string="Cases by Section and Stage" type="bar" orientation="horizontal">
                <field name="stage_id"/>
                <field name="amount_revenue" operator="+"/>
                <field name="section_id" group="True"/>
            </graph>
        </field>
    </record>

    <record model="ir.actions.act_window" id="action_report_crm_case_section_stage_tree_month">
        <field name="res_model">report.crm.case.section.stage</field>
        <field name="view_type">form</field>
        <field name="view_mode">graph,tree</field>
        <field name="domain">[('name','=',time.strftime('%Y-%m-01'))]</field>
    </record>
    <menuitem parent="report_crm.next_id_65" name="Cases by Section and Stage" action="action_report_crm_case_section_stage_tree_month" id="menu_crm_case_section_stage_tree_month"/>
    <record model="ir.actions.act_window" id="action_report_crm_case_section_stage_tree">
        <field name="res_model">report.crm.case.section.stage</field>
        <field name="view_type">form</field>
        <field name="view_mode">graph,tree</field>
    </record>
    <menuitem parent="report_crm.next_id_66" name="Cases by Section and Stage" action="action_report_crm_case_section_stage_tree" id="menu_crm_case_section_stage_tree"/>

    #
    # Cases by section, category and stage
    #

    <record model="ir.ui.view" id="view_crm_case_section_categ_stage_tree">
        <field name="name">CRM Report - Section, Category and Stage(Tree)</field>
        <field name="model">report.crm.case.section.categ.stage</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="Cases by Section, Category and Stage">
                <field name="name"/>
                <field name="user_id"/>
                <field name="section_id"/>
                <field name="categ_id"/>
                <field name="stage_id"/>
                <field name="nbr"/>
                <field name="delay_close"/>
                <field name="state"/>
            </tree>
        </field>
    </record>
    <record model="ir.ui.view" id="view_crm_case_section_categ_stage_form">
        <field name="name">CRM Report - Section, Category and Stage(Form)</field>
        <field name="model">report.crm.case.section.categ.stage</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Cases by Section, Category and Stage">
                <field name="name"/>
                <field name="user_id"/>
                <field name="section_id" select="1"/>
                <field name="categ_id"/>
                <field name="stage_id"/>
                <field name="nbr" select="1"/>
                <field name="state" select="1"/>
                <field name="delay_close"/>
            </form>
        </field>
    </record>

    <record model="ir.actions.act_window" id="action_report_crm_case_section_categ_stage_tree_month">
        <field name="res_model">report.crm.case.section.categ.stage</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree</field>
        <field name="domain">[('name','=',time.strftime('%Y-%m-01'))]</field>
    </record>
    <menuitem parent="report_crm.next_id_65" name="Cases by Section, Category and Stage" action="action_report_crm_case_section_categ_stage_tree_month" id="menu_crm_case_section_categ_stage_tree_month"/>
    <record model="ir.actions.act_window" id="action_report_crm_case_section_categ_stage_tree">
        <field name="res_model">report.crm.case.section.categ.stage</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree</field>
    </record>
    <menuitem parent="report_crm.next_id_66" name="Cases by Section, Category and Stage" action="action_report_crm_case_section_categ_stage_tree" id="menu_crm_case_section_categ_stage_tree"/>

    #
    # Cases by section, category and category2
    #

    <record model="ir.ui.view" id="view_crm_case_section_categ_categ2_tree">
        <field name="name">CRM Report - Section, Category and Type(Tree)</field>
        <field name="model">report.crm.case.section.categ.categ2</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="Cases by Section, Category and Type">
                <field name="name"/>
                <field name="user_id"/>
                <field name="section_id"/>
                <field name="categ_id"/>
                <field name="category2_id"/>
                <field name="stage_id"/>
                <field name="nbr"/>
                <field name="delay_close"/>
                <field name="state"/>
            </tree>
        </field>
    </record>
    <record model="ir.ui.view" id="view_crm_case_section_categ_categ2_form">
        <field name="name">CRM Report - Section, Category and Type(Form)</field>
        <field name="model">report.crm.case.section.categ.categ2</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Cases by Section, Category and Type">
                <field name="name"/>
                <field name="user_id"/>
                <field name="section_id" select="1"/>
                <field name="categ_id"/>
                <field name="category2_id"/>
                <field name="stage_id"/>
                <field name="nbr" select="1"/>
                <field name="state" select="1"/>
                <field name="delay_close"/>
            </form>
        </field>
    </record>

    <record model="ir.actions.act_window" id="action_report_crm_case_section_categ_categ2_tree_month">
        <field name="res_model">report.crm.case.section.categ.categ2</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree</field>
        <field name="domain">[('name','=',time.strftime('%Y-%m-01'))]</field>
    </record>
    <menuitem  parent="report_crm.next_id_65" name="Cases by Section, Category and Type" action="action_report_crm_case_section_categ_categ2_tree_month" id="menu_crm_case_section_categ_categ2_tree_month"/>
    <record model="ir.actions.act_window" id="action_report_crm_case_section_categ_categ2_tree">
        <field name="res_model">report.crm.case.section.categ.categ2</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree</field>
    </record>
    <menuitem parent="report_crm.next_id_66" name="Cases by Section, Category and Type" action="action_report_crm_case_section_categ_categ2_tree" id="menu_crm_case_section_categ_categ2_tree"/>
</data>
</openerp>
