Better views and graphs
[odoo/odoo.git] / addons / report_timesheet / report_timesheet_view.xml
1 <?xml version="1.0"?>
2 <terp>
3 <data>
4
5         #
6         # Statistics report on timesheet by user
7         #
8
9         <record model="ir.ui.view" id="view_timesheet_user_graph">
10                 <field name="name">report_timesheet.user.graph</field>
11                 <field name="model">report_timesheet.user</field>
12                 <field name="type">graph</field>
13                 <field name="arch" type="xml">
14                         <graph string="Timesheet by user" type="bar">
15                                 <field name="name"/>
16                                 <field name="quantity" operator="+"/>
17                                 <field name="user_id" group="True"/>
18                         </graph>
19                 </field>
20         </record>
21
22
23         <record model="ir.ui.view" id="view_timesheet_user_form">
24                 <field name="name">report_timesheet.timesheet.user.form</field>
25                 <field name="model">report_timesheet.user</field>
26                 <field name="type">form</field>
27                 <field name="arch" type="xml">
28                         <form string="Timesheet by user">
29                                 <field name="name" select="1"/>
30                                 <field name="user_id" select="1"/>
31                         </form>
32                 </field>
33         </record>
34
35
36         <record model="ir.ui.view" id="view_timesheet_user_tree">
37                 <field name="name">report_timesheet.timesheet.user.tree</field>
38                 <field name="model">report_timesheet.user</field>
39                 <field name="type">tree</field>
40                 <field name="arch" type="xml">
41                         <tree string="Timesheet by user">
42                                 <field name="name"/>
43                                 <field name="user_id"/>
44                                 <field name="quantity"/>
45                                 <field name="cost"/>
46                         </tree>
47                 </field>
48         </record>
49
50         <record model="ir.actions.act_window" id="action_timesheet_user_stat">
51                 <field name="name">Timesheet by user (this month)</field>
52                 <field name="res_model">report_timesheet.user</field>
53                 <field name="view_type">form</field>
54                 <field name="view_mode">graph,tree</field>
55                 <field name="domain">[('name','&gt;=',time.strftime('%Y-%m-01'))]</field>
56         </record>
57         <menuitem 
58                 name="Human Resources/Reporting/This Month/Timesheet by user"
59                 action="action_timesheet_user_stat"
60                 id="menu_report_timesheet_user"/>
61
62         <record model="ir.ui.view" id="view_timesheet_account_date_graph_account">
63                 <field name="name">report_timesheet.account.date.graph</field>
64                 <field name="model">report_timesheet.account.date</field>
65                 <field name="type">graph</field>
66                 <field name="arch" type="xml">
67                         <graph string="Daily timesheet per account" orientation="horizontal" type="bar">
68                                 <field name="name"/>
69                                 <field name="quantity" operator="+"/>
70                                 <field name="account_id" group="True"/>
71                         </graph>
72                 </field>
73         </record>
74
75
76
77         <record model="ir.actions.act_window" id="action_timesheet_user_stat_my">
78                 <field name="name">My timesheet of the month</field>
79                 <field name="res_model">report_timesheet.account.date</field>
80                 <field name="view_type">form</field>
81                 <field name="view_mode">graph,tree</field>
82                 <field name="view_id" ref="view_timesheet_account_date_graph_account"/>
83                 <field name="domain">[('name','&gt;=',time.strftime('%Y-%m-01')), ('user_id','=',uid)]</field>
84         </record>
85         <menuitem 
86                 name="Human Resources/Reporting/This Month/"
87                 action="action_timesheet_user_stat_my"
88                 id="menu_report_timesheet_user_my"/>
89
90
91         <record model="ir.actions.act_window" id="action_timesheet_user_stat_all">
92                 <field name="res_model">report_timesheet.user</field>
93                 <field name="view_type">form</field>
94                 <field name="view_mode">graph,tree</field>
95         </record>
96         <menuitem 
97                 name="Human Resources/Reporting/All Months/Timesheet by user"
98                 action="action_timesheet_user_stat_all"
99                 id="menu_report_timesheet_user_all"/>
100
101         #
102         # Statistics report on timesheets to invoice
103         #
104
105         <record model="ir.ui.view" id="view_timesheet_invoice_graph">
106                 <field name="name">report_timesheet.invoice.graph</field>
107                 <field name="model">report_timesheet.invoice</field>
108                 <field name="type">graph</field>
109                 <field name="arch" type="xml">
110                         <graph string="Timesheet by invoice">
111                                 <field name="account_id"/>
112                                 <field name="amount_invoice" operator="+"/>
113                         </graph>
114                 </field>
115         </record>
116
117
118         <record model="ir.ui.view" id="view_timesheet_invoice_form">
119                 <field name="name">report_timesheet.timesheet.invoice.form</field>
120                 <field name="model">report_timesheet.invoice</field>
121                 <field name="type">form</field>
122                 <field name="arch" type="xml">
123                         <form string="Timesheet by invoice">
124                                 <field name="account_id" select="1"/>
125                                 <field name="manager_id" select="1"/>
126                                 <field name="user_id" select="1"/>
127                         </form>
128                 </field>
129         </record>
130
131
132         <record model="ir.ui.view" id="view_timesheet_invoice_tree">
133                 <field name="name">report_timesheet.timesheet.invoice.tree</field>
134                 <field name="model">report_timesheet.invoice</field>
135                 <field name="type">tree</field>
136                 <field name="arch" type="xml">
137                         <tree string="Timesheets to invoice">
138                                 <field name="user_id"/>
139                                 <field name="project_id"/>
140                                 <field name="manager_id"/>
141                                 <field name="quantity"/>
142                                 <field name="amount_invoice"/>
143                         </tree>
144                 </field>
145         </record>
146
147         <record model="ir.actions.act_window" id="action_timesheet_invoice_stat_all">
148                 <field name="res_model">report_timesheet.invoice</field>
149                 <field name="view_type">form</field>
150                 <field name="view_mode">graph,tree</field>
151         </record>
152         <menuitem 
153                 name="Human Resources/Reporting/All Months/Timesheet by invoice"
154                 action="action_timesheet_invoice_stat_all"
155                 id="menu_report_timesheet_invoice_all"/>
156
157         <record model="ir.actions.act_window" id="action_timesheet_invoice_stat_my">
158                 <field name="name">My timesheets to invoice</field>
159                 <field name="res_model">report_timesheet.invoice</field>
160                 <field name="view_type">form</field>
161                 <field name="view_mode">graph,tree</field>
162                 <field name="domain">[('manager_id','=',uid)]</field>
163         </record>
164         <menuitem 
165                 name="Human Resources/Reporting/This Month/My timesheets to invoice"
166                 action="action_timesheet_invoice_stat_my"
167                 id="menu_report_timesheet_invoice_my"/>
168
169         #
170         # Statistics report on daily timesheets per account
171         #
172
173         <record model="ir.ui.view" id="view_timesheet_account_date_tree">
174                 <field name="name">report_timesheet.account.date.tree</field>
175                 <field name="model">report_timesheet.account.date</field>
176                 <field name="type">tree</field>
177                 <field name="arch" type="xml">
178                         <tree string="Daily timesheet per account">
179                                 <field name="name"/>
180                                 <field name="account_id"/>
181                                 <field name="user_id"/>
182                                 <field name="quantity"/>
183                         </tree>
184                 </field>
185         </record>
186         <record model="ir.ui.view" id="view_timesheet_account_date_graph">
187                 <field name="name">report_timesheet.account.date.graph</field>
188                 <field name="model">report_timesheet.account.date</field>
189                 <field name="type">graph</field>
190                 <field name="arch" type="xml">
191                         <graph string="Daily timesheet per account" orientation="horizontal">
192                                 <field name="account_id"/>
193                                 <field name="quantity" operator="+"/>
194                                 <field name="user_id" group="True"/>
195                         </graph>
196                 </field>
197         </record>
198
199
200         <record model="ir.ui.view" id="view_timesheet_account_date_form">
201                 <field name="name">report_timesheet.timesheet.account.date.form</field>
202                 <field name="model">report_timesheet.account.date</field>
203                 <field name="type">form</field>
204                 <field name="arch" type="xml">
205                         <form string="Daily timesheet by account">
206                                 <field name="name" select="1"/>
207                                 <field name="account_id" select="1"/>
208                                 <field name="user_id" select="1"/>
209                                 <field name="quantity"/>
210                         </form>
211                 </field>
212         </record>
213
214         <record model="ir.actions.act_window" id="action_timesheet_account_date_stat_all">
215                 <field name="res_model">report_timesheet.account.date</field>
216                 <field name="view_type">form</field>
217                 <field name="view_mode">graph,tree</field>
218         </record>
219         <menuitem 
220                 name="Human Resources/Reporting/All Months/Daily timesheet by account"
221                 action="action_timesheet_account_date_stat_all"
222                 id="menu_report_timesheet_account_date_all"/>
223
224         <record model="ir.actions.act_window" id="action_timesheet_account_date_stat_my">
225                 <field name="name">My daily timesheets by account</field>
226                 <field name="res_model">report_timesheet.account.date</field>
227                 <field name="view_type">form</field>
228                 <field name="view_mode">graph,tree</field>
229                 <field name="domain">[('user_id','=',uid)]</field>
230         </record>
231         <menuitem 
232                 name="Human Resources/Reporting/This Month/My daily timesheets by account"
233                 action="action_timesheet_account_date_stat_my"
234                 id="menu_report_timesheet_account_date_my"/>
235
236         #
237         # Statistics report on timesheets per account
238         #
239
240         <record model="ir.ui.view" id="view_timesheet_account_tree">
241                 <field name="name">report_timesheet.account.tree</field>
242                 <field name="model">report_timesheet.account</field>
243                 <field name="type">tree</field>
244                 <field name="arch" type="xml">
245                         <tree string="Timesheet per account">
246                                 <field name="name"/>
247                                 <field name="account_id"/>
248                                 <field name="user_id"/>
249                                 <field name="quantity"/>
250                         </tree>
251                 </field>
252         </record>
253         <record model="ir.ui.view" id="view_timesheet_account_graph">
254                 <field name="name">report_timesheet.account.graph</field>
255                 <field name="model">report_timesheet.account</field>
256                 <field name="type">graph</field>
257                 <field name="arch" type="xml">
258                         <graph string="Timesheet per account">
259                                 <field name="account_id"/>
260                                 <field name="quantity" operator="+"/>
261                                 <field name="user_id" group="True"/>
262                         </graph>
263                 </field>
264         </record>
265
266
267
268         <record model="ir.ui.view" id="view_timesheet_account_form">
269                 <field name="name">report_timesheet.timesheet.account.form</field>
270                 <field name="model">report_timesheet.account</field>
271                 <field name="type">form</field>
272                 <field name="arch" type="xml">
273                         <form string="Timesheet by account">
274                                 <field name="name" select="1"/>
275                                 <field name="account_id" select="1"/>
276                                 <field name="user_id" select="1"/>
277                                 <field name="quantity"/>
278                         </form>
279                 </field>
280         </record>
281
282         <record model="ir.actions.act_window" id="action_timesheet_account_stat_all">
283                 <field name="res_model">report_timesheet.account</field>
284                 <field name="view_type">form</field>
285                 <field name="view_mode">graph,tree</field>
286         </record>
287         <menuitem 
288                 name="Human Resources/Reporting/All Months/Timesheet by account"
289                 action="action_timesheet_account_stat_all"
290                 id="menu_report_timesheet_account_all"/>
291
292         <record model="ir.actions.act_window" id="action_timesheet_account_stat_my">
293                 <field name="name">My timesheets by account</field>
294                 <field name="res_model">report_timesheet.account</field>
295                 <field name="view_type">form</field>
296                 <field name="view_mode">graph,tree</field>
297                 <field name="domain">[('user_id','=',uid)]</field>
298         </record>
299         <menuitem 
300                 name="Human Resources/Reporting/This Month/My timesheets by account"
301                 action="action_timesheet_account_stat_my"
302                 id="menu_report_timesheet_account_my"/>
303
304         <act_window name="Timesheets per day"
305                 domain="[('user_id', '=', active_id)]"
306                 res_model="report_timesheet.user"
307                 src_model="res.users"
308                 id="act_res_users_2_report_timesheet_user"/>
309
310         <act_window name="Timesheets per account"
311                 domain="[('user_id', '=', active_id)]"
312                 res_model="report_timesheet.account"
313                 src_model="res.users"
314                 id="act_res_users_2_report_timehsheet_account"/>
315
316         <act_window name="Timesheets"
317                 domain="[('account_id', '=', active_id)]"
318                 res_model="report_timesheet.account"
319                 src_model="account.analytic.account"
320                 id="act_account_analytic_account_2_report_timehsheet_account"/>
321
322         <act_window name="Costs to invoice"
323                 domain="[('account_id', '=', active_id)]"
324                 res_model="report_timesheet.invoice"
325                 src_model="account.analytic.account"
326                 id="act_account_analytic_account_2_report_timesheet_invoice"/>
327
328         <act_window name="Costs to invoice"
329                 domain="[('manager_id', '=', active_id)]"
330                 res_model="report_timesheet.invoice"
331                 src_model="res.users"
332                 id="act_res_users_2_report_timesheet.invoice"/>
333
334 </data>
335 </terp>