[FIX] correct various date issues in reporting
[odoo/odoo.git] / addons / hr_timesheet / report / hr_timesheet_report_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4         <record id="view_hr_timesheet_report_graph" model="ir.ui.view">
5             <field name="name">hr.timesheet.report.graph</field>
6             <field name="model">hr.timesheet.report</field>
7             <field name="arch" type="xml">
8                 <graph string="Timesheet" type="pivot">
9                     <field name="user_id" type="row"/>
10                     <field name="date" interval="day" type="col"/>
11                     <field name="quantity" type="measure"/>
12                     <field name="cost" type="measure"/>
13                 </graph>
14             </field>
15         </record>
16
17         <record id="view_hr_timesheet_report_search" model="ir.ui.view">
18             <field name="name">hr.timesheet.report.search</field>
19             <field name="model">hr.timesheet.report</field>
20             <field name="arch" type="xml">
21                 <search string="Timesheet">
22                     <field name="account_id"/>
23                     <field name="user_id"/>
24                     <filter string="This Month" name="month" icon="terp-go-year" domain="[('date','&lt;=', time.strftime('%Y-%m-%d')),('date','&gt;=',time.strftime('%Y-%m-01'))]" help="month"/>
25                     <group expand="0" string="Extended Filters...">
26                         <field name="general_account_id"/>
27                         <field name="product_id"/>
28                         <field name="journal_id"/>
29                         <field name="company_id" groups="base.group_multi_company"/>
30                         <field name="date"/>
31                     </group>
32                     <group expand="1" string="Group By">
33                         <filter string="User" name="group_user_id" icon="terp-personal" context="{'group_by':'user_id'}"/>
34                         <filter string="Product" name="product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
35                         <filter string="Analytic Account" name="analytic_account" icon="terp-folder-green" context="{'group_by':'account_id'}"/>
36                         <filter string="General Account" name="general_account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/>
37                         <filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
38                         <filter string="Date" icon="terp-go-month" context="{'group_by':'date'}" help="Group by month of date"/>
39                     </group>
40                 </search>
41             </field>
42         </record>
43
44         <record id="action_hr_timesheet_report_stat_all" model="ir.actions.act_window">
45             <field name="name">Timesheet Analysis</field>
46             <field name="res_model">hr.timesheet.report</field>
47             <field name="view_type">form</field>
48             <field name="view_mode">graph</field>
49             <field name="context">{'search_default_group_user_id':1,'group_by_no_leaf':1,'group_by':[]}</field>
50         </record>
51
52         <menuitem action="action_hr_timesheet_report_stat_all"  id="menu_hr_timesheet_report_all"
53             parent="hr.menu_hr_reporting" groups="base.group_hr_manager" sequence="3"/>
54
55     </data>
56 </openerp>