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

	#
	# Statistics report on timesheet by user
	#

	<record model="ir.ui.view" id="view_timesheet_user_graph">
		<field name="name">report_timesheet.user.graph</field>
		<field name="model">report_timesheet.user</field>
		<field name="type">graph</field>
		<field name="arch" type="xml">
			<graph string="Timesheet by user" type="bar">
				<field name="name" group="True"/>
				<field name="quantity" operator="+"/>
			</graph>
		</field>
	</record>


	<record model="ir.ui.view" id="view_timesheet_user_form">
		<field name="name">report_timesheet.timesheet.user.form</field>
		<field name="model">report_timesheet.user</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Timesheet by user">
				<field name="name" select="1"/>
				<field name="user_id" select="1"/>
			</form>
		</field>
	</record>


	<record model="ir.ui.view" id="view_timesheet_user_tree">
		<field name="name">report_timesheet.timesheet.user.tree</field>
		<field name="model">report_timesheet.user</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Timesheet by user">
				<field name="name"/>
				<field name="user_id"/>
				<field name="quantity"/>
				<field name="cost"/>
			</tree>
		</field>
	</record>

	<record model="ir.actions.act_window" id="action_timesheet_user_stat">
		<field name="name">report_timesheet.user.graph</field>
		<field name="res_model">report_timesheet.user</field>
		<field name="view_type">form</field>
		<field name="view_mode">graph,tree</field>
		<field name="domain">[('name','&gt;=',time.strftime('%Y-%m-01'))]</field>
	</record>
	<menuitem 
		name="Human Resources/Reporting/This Month/Timesheet by user"
		action="action_timesheet_user_stat"
		id="menu_report_timesheet_user"/>

	<record model="ir.actions.act_window" id="action_timesheet_user_stat_all">
		<field name="name">report_timesheet.user.tree.all</field>
		<field name="res_model">report_timesheet.user</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree,graph</field>
	</record>
	<menuitem 
		name="Human Resources/Reporting/All Months/Timesheet by user"
		action="action_timesheet_user_stat_all"
		id="menu_report_timesheet_user_all"/>

	#
	# Statistics report on timesheets to invoice
	#

	<record model="ir.ui.view" id="view_timesheet_invoice_graph">
		<field name="name">report_timesheet.invoice.graph</field>
		<field name="model">report_timesheet.invoice</field>
		<field name="type">graph</field>
		<field name="arch" type="xml">
			<graph string="Timesheet by invoice">
				<field name="project_id" group="True"/>
				<field name="amount_invoice" operator="+"/>
			</graph>
		</field>
	</record>


	<record model="ir.ui.view" id="view_timesheet_invoice_form">
		<field name="name">report_timesheet.timesheet.invoice.form</field>
		<field name="model">report_timesheet.invoice</field>
		<field name="type">form</field>
		<field name="arch" type="xml">
			<form string="Timesheet by invoice">
				<field name="project_id" select="1"/>
				<field name="manager_id" select="1"/>
				<field name="user_id" select="1"/>
			</form>
		</field>
	</record>


	<record model="ir.ui.view" id="view_timesheet_invoice_tree">
		<field name="name">report_timesheet.timesheet.invoice.tree</field>
		<field name="model">report_timesheet.invoice</field>
		<field name="type">tree</field>
		<field name="arch" type="xml">
			<tree string="Timesheets to invoice">
				<field name="user_id"/>
				<field name="project_id"/>
				<field name="manager_id"/>
				<field name="quantity"/>
				<field name="amount_invoice"/>
			</tree>
		</field>
	</record>

	<record model="ir.actions.act_window" id="action_timesheet_invoice_stat_all">
		<field name="name">report_timesheet.invoice.tree.all</field>
		<field name="res_model">report_timesheet.invoice</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree,graph</field>
	</record>
	<menuitem 
		name="Human Resources/Reporting/All Months/Timesheet by invoice"
		action="action_timesheet_invoice_stat_all"
		id="menu_report_timesheet_invoice_all"/>

	<record model="ir.actions.act_window" id="action_timesheet_invoice_stat_my">
		<field name="name">report_timesheet.invoice.tree</field>
		<field name="res_model">report_timesheet.invoice</field>
		<field name="view_type">form</field>
		<field name="view_mode">tree,graph</field>
		<field name="domain">[('manager_id','=',uid)]</field>
	</record>
	<menuitem 
		name="Human Resources/Reporting/This Month/My timesheets to invoice"
		action="action_timesheet_invoice_stat_my"
		id="menu_report_timesheet_invoice_my"/>

</data>
</terp>
