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

	#
	# Cases by user and section
	#

	<record model="ir.ui.view" id="view_crm_case_user_tree">
		<field name="name">report.crm.case.user.tree</field>
		<field name="model">report.crm.case.user</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Cases by User and Section">
				<field name="name"/>
				<field name="user_id"/>
				<field name="section_id"/>
				<field name="nbr"/>
				<field name="delay_close"/>
				<field name="amount_revenue"/>
				<field name="amount_costs"/>
				<field name="amount_revenue_prob"/>
				<field name="probability"/>
				<field name="state"/>
			</tree>
		</field>
	</record>
	<record model="ir.ui.view" id="view_crm_case_user_form">
		<field name="name">report.crm.case.user.form</field>
		<field name="model">report.crm.case.user</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Cases by User and Section">
				<field name="name" select="1"/>
				<field name="user_id" select="1"/>
				<field name="section_id" select="1"/>
				<field name="nbr" select="1"/>
				<field name="state" select="1"/>
			</form>
		</field>
	</record>

	<record model="ir.ui.view" id="view_crm_case_user_graph">
		<field name="name">report.crm.case.user.graph</field>
		<field name="model">report.crm.case.user</field>
		<field name="type">graph</field>
		<field name="arch" type="xml">
			<graph string="Cases by User and Section" type="bar">
				<field name="user_id" group="True"/>
				<field name="nbr" operator="+"/>
			</graph>
		</field>
	</record>


	<record model="ir.actions.act_window" id="action_report_crm_case_user_tree_month">
		<field name="name">report.crm.case.user.tree</field>
		<field name="res_model">report.crm.case.user</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree,graph</field>
		<field name="domain">[('name','=',time.strftime('%Y-%m-01'))]</field>
	</record>
	<menuitem name="CRM &amp; SRM/Reporting/This Month/Cases by user and section" action="action_report_crm_case_user_tree_month" id="menu_crm_case_user_tree_month"/>
	<record model="ir.actions.act_window" id="action_report_crm_case_user_tree">
		<field name="name">report.crm.case.user.tree</field>
		<field name="res_model">report.crm.case.user</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree</field>
	</record>
	<menuitem name="CRM &amp; SRM/Reporting/All Months/Cases by user and section" action="action_report_crm_case_user_tree" id="menu_crm_case_user_tree"/>

	<record model="ir.actions.act_window" id="action_report_crm_case_user_tree_month_my">
		<field name="name">report.crm.case.user.tree.my</field>
		<field name="res_model">report.crm.case.user</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree</field>
		<field name="domain">[('user_id','=',uid),('name','=',time.strftime('%Y-%m-01'))]</field>
	</record>
	<menuitem name="CRM &amp; SRM/Reporting/This Month/My cases of the month by section" action="action_report_crm_case_user_tree_month_my" id="menu_crm_case_user_tree_month_my"/>

	<record model="ir.actions.act_window" id="action_report_crm_case_user_tree_my">
		<field name="name">report.crm.case.user.tree.my</field>
		<field name="res_model">report.crm.case.user</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree</field>
		<field name="domain">[('user_id','=',uid)]</field>
	</record>
	<menuitem name="CRM &amp; SRM/Reporting/All Months/My cases by section" action="action_report_crm_case_user_tree_my" id="menu_crm_case_user_tree_my"/>

	#
	# Cases by section and categoryof case
	#

	<record model="ir.ui.view" id="view_crm_case_categ_tree">
		<field name="name">report.crm.case.categ.tree</field>
		<field name="model">report.crm.case.categ</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Cases by User and Section">
				<field name="name"/>
				<field name="categ_id"/>
				<field name="section_id"/>
				<field name="nbr"/>
				<field name="delay_close"/>
				<field name="amount_revenue"/>
				<field name="amount_costs"/>
				<field name="amount_revenue_prob"/>
				<field name="probability"/>
				<field name="state"/>
			</tree>
		</field>
	</record>
	<record model="ir.ui.view" id="view_crm_case_categ_form">
		<field name="name">report.crm.case.categ.form</field>
		<field name="model">report.crm.case.categ</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Cases by User and Section">
				<field name="name" select="1"/>
				<field name="categ_id" select="1"/>
				<field name="section_id" select="1"/>
				<field name="nbr" select="1"/>
				<field name="state" select="1"/>
			</form>
		</field>
	</record>


	<record model="ir.actions.act_window" id="action_report_crm_case_categ_tree_month">
		<field name="name">report.crm.case.categ.tree</field>
		<field name="res_model">report.crm.case.categ</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 name="CRM &amp; SRM/Reporting/This Month/Cases by categories and section" action="action_report_crm_case_categ_tree_month" id="menu_crm_case_categ_tree_month"/>
	<record model="ir.actions.act_window" id="action_report_crm_case_categ_tree">
		<field name="name">report.crm.case.categ.tree</field>
		<field name="res_model">report.crm.case.categ</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree</field>
	</record>
	<menuitem name="CRM &amp; SRM/Reporting/All Months/Cases by categories and section" action="action_report_crm_case_categ_tree" id="menu_crm_case_categ_tree"/>



	</data>
</terp>
