rename labels to be more clear
[odoo/odoo.git] / addons / hr_timesheet_sheet / report / timesheet_report_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4         <record id="view_timesheet_report_graph" model="ir.ui.view">
5             <field name="name">timesheet.report.graph</field>
6             <field name="model">timesheet.report</field>
7             <field name="type">graph</field>
8             <field name="arch" type="xml">
9                 <graph string="Timesheet" type="bar">
10                     <field name="user_id" />
11                         <field name="quantity" operator = "+"/>
12                         <field name="state" group = "True"/>
13                 </graph>
14             </field>
15         </record>
16         <record id="view_timesheet_report_tree" model="ir.ui.view">
17             <field name="name">timesheet.report.tree</field>
18             <field name="model">timesheet.report</field>
19             <field name="type">tree</field>
20             <field name="arch" type="xml">
21                 <tree string="Timesheet">
22                     <field name="date_current" invisible="1"/>
23                     <field name="name" invisible="1"/>
24                     <field name="user_id" invisible="1"/>
25                     <field name="date_from" invisible="1"/>
26                     <field name="date_to" invisible="1"/>
27                                         <field name="quantity" sum="#Quantity"/>
28                                         <field name="cost" sum="#Cost"/>
29                     <field name="state" invisible="1"/>
30                     <field name="department_id" invisible="1"/>
31                     <field name="company_id" invisible="1"/>
32                     <field name="to_invoice" invisible="1"/>
33                     <field name="product_id" invisible="1"/>
34                     <field name="account_id" invisible="1"/>
35                     <field name="general_account_id" invisible="1"/>
36                     <field name="year" invisible="1"/>
37                     <field name="day" invisible="1"/>
38                     <field name="month" invisible="1"/>
39                 </tree>
40             </field>
41         </record>
42         <record id="view_timesheet_report_search" model="ir.ui.view">
43             <field name="name">timesheet.report.search</field>
44             <field name="model">timesheet.report</field>
45             <field name="type">search</field>
46             <field name="arch" type="xml">
47                 <search string="Timesheet">
48                     <group col="10" colspan="12">
49                         <filter icon="terp-hr" string="This Year"
50                                     domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')),('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
51                                     help="Timesheet in this year"/>
52                             <filter icon="terp-hr" string="This Month"
53                                         name="month"
54                                         domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
55                                         help="Timesheet in this month"/>
56                                 <filter icon="gtk-media-rewind"
57                                     string="    7 Days    "
58                                     separator="1"
59                                     domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
60                                     help="Timesheet during last 7 days"/>
61                             <separator orientation="vertical"/>
62                             <filter icon="terp-hr"
63                                         string="Draft"
64                                         domain="[('state','=','draft')]"/>
65                             <filter icon="terp-hr"
66                                         string="Confirmed"
67                                         domain="[('state','=','confirm')]"/>
68                             <separator orientation="vertical"/>
69                             <field name="product_id"/>
70                                                 <field name="user_id" widget="selection">
71                                 <filter icon="terp-hr"
72                                                 string="My timesheet"
73                                                 help = "My timesheet "
74                                                 domain="[('user_id','=',uid)]" />
75                                 <filter icon="terp-hr"
76                                                 string="Non Assigned timesheets to users"
77                                                 help="Non Assigned timesheets to users"
78                                                 domain="[('user_id','=',False)]"/>
79                             </field>
80                             <field name="company_id" widget="selection" groups="base.group_multi_company"/>
81                     </group>
82                     <newline/>
83                         <group expand="0" string="Extended options..." colspan="10" col="12">
84                                 <filter icon="terp-hr"
85                                         string="New"
86                                         domain="[('state','=','new')]"/>
87                             <separator orientation="vertical"/>
88                             <field name="date_from"/>
89                             <separator orientation="vertical"/>
90                             <field name="account_id"/>
91                             <field name="department_id" widget="selection"/>
92                             <newline/>
93                             <filter icon="terp-hr"
94                                                 string="Done"
95                                                 domain="[('state','=','done')]"/>
96                             <separator orientation="vertical"/>
97                             <field name="date_to"/>
98                             <separator orientation="vertical"/>
99                             <field name="general_account_id"/>
100                             <field name="to_invoice" widget="selection"/>
101                         </group>
102                     <newline/>
103                     <group expand="1" string="Group By..." colspan="10" col="12">
104                             <filter string="User" name="User" icon="terp-hr" context="{'group_by':'user_id'}"/>
105                             <filter string="Product" icon="terp-hr" context="{'group_by':'product_id'}"/>
106                             <separator orientation="vertical"/>
107                             <filter string="Type of Invoicing" icon="terp-hr" context="{'group_by':'to_invoice'}"/>
108                             <filter string="Analytic Account" icon="terp-hr" context="{'group_by':'account_id'}"/>
109                             <filter string="General Account" icon="terp-hr" context="{'group_by':'general_account_id'}"/>
110                             <separator orientation="vertical"/>
111                             <filter string="Company" icon="terp-hr" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
112                             <filter string="Department" icon="terp-hr" context="{'group_by':'department_id'}"/>
113                             <filter string="State" icon="terp-hr" context="{'group_by':'state'}"/>
114                             <separator orientation="vertical"/>
115                             <filter string="Day" icon="terp-hr" context="{'group_by':'day'}"/>
116                             <filter string="Month" icon="terp-hr" context="{'group_by':'month'}"/>
117                             <filter string="Year" icon="terp-hr" context="{'group_by':'year'}"/>
118                     </group>
119                 </search>
120             </field>
121         </record>
122
123         <record id="action_timesheet_report_stat_all" model="ir.actions.act_window">
124             <field name="name">Timesheet</field>
125             <field name="res_model">timesheet.report</field>
126             <field name="view_type">form</field>
127             <field name="view_mode">tree,graph</field>
128             <field name="context">{'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
129             <field name="search_view_id" ref="view_timesheet_report_search"/>
130         </record>
131         <menuitem action="action_timesheet_report_stat_all" id="menu_timesheet_report_all" parent="hr.menu_hr_reporting"/>
132     </data>
133 </openerp>