1 <?xml version="1.0" encoding="utf-8"?>
4 <record id="hr_timesheet_sheet_tree" model="ir.ui.view">
5 <field name="name">hr.timesheet.sheet.tree</field>
6 <field name="model">hr_timesheet_sheet.sheet</field>
7 <field name="type">tree</field>
8 <field name="arch" type="xml">
9 <tree string="Timesheets">
10 <field name="user_id"/>
11 <field name="date_from"/>
12 <field name="date_to"/>
14 <field name="total_attendance" groups="hr_attendance.group_hr_attendance"/>
15 <field name="total_timesheet"/>
16 <field name="total_difference" groups="hr_attendance.group_hr_attendance"/>
22 <record id="hr_timesheet_account_form" model="ir.ui.view">
23 <field name="name">hr.timesheet.account.form</field>
24 <field name="model">hr_timesheet_sheet.sheet.account</field>
25 <field name="type">form</field>
26 <field name="arch" type="xml">
27 <form string="Timesheet by Accounts">
28 <field name="sheet_id" select="1"/>
29 <field name="name" select="1"/>
30 <field name="total" sum="Total"/>
31 <field name="invoice_rate" select="2"/>
36 <record id="hr_timesheet_account_tree" model="ir.ui.view">
37 <field name="name">hr.timesheet.account.tree</field>
38 <field name="model">hr_timesheet_sheet.sheet.account</field>
39 <field name="type">tree</field>
40 <field name="arch" type="xml">
41 <tree string="Timesheet by Accounts">
42 <field name="sheet_id"/>
44 <field name="total" sum="Total"/>
45 <field name="invoice_rate"/>
50 <record id="hr_timesheet_day_form" model="ir.ui.view">
51 <field name="name">hr.timesheet.day.form</field>
52 <field name="model">hr_timesheet_sheet.sheet.day</field>
53 <field name="type">form</field>
54 <field name="arch" type="xml">
55 <form string="Timesheet by Days">
56 <field name="sheet_id" select="1"/>
57 <field name="name" select="1"/>
58 <field name="total_timesheet"/>
59 <field name="total_attendance" groups="hr_attendance.group_hr_attendance"/>
60 <field name="total_difference" groups="hr_attendance.group_hr_attendance"/>
65 <record id="hr_timesheet_day_tree" model="ir.ui.view">
66 <field name="name">hr.timesheet.day.tree</field>
67 <field name="model">hr_timesheet_sheet.sheet.day</field>
68 <field name="type">tree</field>
69 <field name="arch" type="xml">
70 <tree colors="red:total_difference<=0.1;blue:total_difference>=0.1" string="Timesheet by Days">
71 <field name="sheet_id"/>
73 <field name="total_timesheet" sum="Total Timesheet"/>
74 <field name="total_attendance" sum="Total Attendance" groups="hr_attendance.group_hr_attendance"/>
75 <field name="total_difference" sum="Total Difference" groups="hr_attendance.group_hr_attendance"/>
80 <record id="hr_timesheet_sheet_form" model="ir.ui.view">
81 <field name="name">hr.timesheet.sheet.form</field>
82 <field name="model">hr_timesheet_sheet.sheet</field>
83 <field name="type">form</field>
84 <field name="arch" type="xml">
85 <form string="Timesheet">
87 <field name="user_id"/>
88 <field name="date_from"/>
89 <field name="date_to"/>
90 <field name="company_id" select="1" groups="base.group_multi_company"/>
91 <notebook colspan="4">
92 <page string="Daily View">
93 <group col="6" colspan="4">
94 <button name="button_dummy" string="Go to:" type="object" icon="gtk-redo"/>
95 <field name="date_current" nolabel="1"/>
97 <button icon="gtk-media-previous" name="date_previous" string="" type="object"/>
98 <button name="date_today" string="Today" type="object" icon="gtk-home"/>
99 <button icon="gtk-media-next" name="date_next" string="" type="object"/>
102 <field colspan="3" context="name=date_current,user_id=user_id" height="100" name="attendances_ids" nolabel="1" groups="hr_attendance.group_hr_attendance">
103 <tree string="Attendances">
105 <field name="action"/>
106 <field invisible="1" name="employee_id"/>
109 <group col="1" colspan="1" groups="hr_attendance.group_hr_attendance">
110 <button name="sign_in" string="Sign In" type="object" icon="gtk-go-back"/>
111 <button name="sign_out" string="Sign Out" type="object" icon="gtk-go-forward"/>
114 <field name="state_attendance" groups="hr_attendance.group_hr_attendance"/>
115 <field name="total_attendance_day" widget="float_time" groups="hr_attendance.group_hr_attendance"/>
116 <field colspan="4" context="date=date_current,user_id=user_id" domain="[('name','=',date_current)]" name="timesheet_ids" nolabel="1">
117 <tree editable="top" string="Timesheet">
118 <field invisible="1" name="date"/>
119 <field domain="[('type','=','normal'), ('state', '<>', 'close')]" name="account_id" on_change="on_change_account_id(account_id)"/>
121 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" widget="float_time"/>
122 <field name="to_invoice"/>
123 <field invisible="1" name="journal_id"/>
124 <field invisible="1" name="product_id"/>
125 <field invisible="1" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
126 <field name="amount"/>
127 <field name="general_account_id"/>
128 <field invisible="1" name="user_id" required="1"/>
130 <form string="Timesheet">
132 <field domain="[('type','=','normal'), ('state', '<>', 'close')]" name="account_id" on_change="on_change_account_id(account_id)"/>
134 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" widget="float_time"/>
135 <field name="to_invoice"/>
136 <field invisible="1" name="journal_id"/>
137 <field invisible="1" name="product_id"/>
138 <field invisible="1" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
139 <field name="amount"/>
140 <field name="general_account_id"/>
141 <field name="user_id" required="1"/>
144 <field name="total_difference_day" widget="float_time"/>
145 <field name="total_timesheet_day" widget="float_time"/>
147 <page string="By Day">
148 <field colspan="4" name="period_ids" nolabel="1">
149 <tree colors="red:total_difference<=0.1;blue:total_difference>=0.1" string="Period">
151 <field name="total_attendance" widget="float_time" groups="hr_attendance.group_hr_attendance"/>
152 <field name="total_timesheet" widget="float_time"/>
153 <field name="total_difference" widget="float_time" groups="hr_attendance.group_hr_attendance"/>
156 <field name="total_attendance" widget="float_time"/>
157 <field name="total_timesheet" widget="float_time"/>
158 <field name="total_difference" widget="float_time"/>
161 <field name="state"/>
162 <group col="4" colspan="2">
163 <button name="button_confirm" states="draft" string="Confirm" type="object" icon="gtk-execute"/>
164 <button name="action_set_to_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert"/>
165 <button name="cancel" states="confirm" string="Refuse" type="workflow" icon="gtk-stop"/>
166 <button name="done" states="confirm" string="Accept" type="workflow" icon="gtk-apply"/>
172 <record id="view_hr_timesheet_sheet_filter" model="ir.ui.view">
173 <field name="name">hr_timesheet_sheet.sheet.filter</field>
174 <field name="model">hr_timesheet_sheet.sheet</field>
175 <field name="type">search</field>
176 <field name="arch" type="xml">
177 <search string="Search Timesheet">
178 <group col='8' colspan='4'>
179 <filter icon="terp-partner" string="My Timesheets" domain="[('user_id','=',uid)]" help="My Timesheet"/>
180 <filter icon="terp-crm" string="My departments timesheets" domain="[('user_id', 'child_of', [uid])]" help="My Departments Timesheet"/>
181 <separator orientation="vertical"/>
183 <filter icon="terp-hr" domain="[('state','=','draft')]" help="Draft Timesheets"/>
184 <filter icon="terp-hr" domain="[('state','=','confirm')]" help="Confirmed Timesheets"/>
186 <field name="name" select='1'/>
187 <field name="user_id" select="1" widget="selection">
194 <record id="act_hr_timesheet_sheet_form" model="ir.actions.act_window">
195 <field name="name">Timesheets</field>
196 <field name="type">ir.actions.act_window</field>
197 <field name="res_model">hr_timesheet_sheet.sheet</field>
198 <field name="view_type">form</field>
199 <field name="view_id" eval="False"/>
200 <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
202 <menuitem id="next_id_60" name="Timesheets" parent="hr.menu_hr_root"/>
203 <menuitem action="act_hr_timesheet_sheet_form" id="menu_act_hr_timesheet_sheet_form" parent="next_id_60"
204 groups="hr.group_hr_manager"/>
206 <record id="act_hr_timesheet_sheet_form_my" model="ir.actions.act_window">
207 <field name="name">My timesheets</field>
208 <field name="type">ir.actions.act_window</field>
209 <field name="res_model">hr_timesheet_sheet.sheet</field>
210 <field name="domain">[('user_id','=',uid)]</field>
211 <field name="view_type">form</field>
212 <field name="view_mode">tree,form</field>
213 <field name="filter" eval="True"/>
214 <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
216 <menuitem action="act_hr_timesheet_sheet_form_my" id="menu_act_hr_timesheet_sheet_form_my" parent="hr_timesheet_sheet.next_id_60" groups="base.group_extended"/>
218 <record id="act_hr_timesheet_sheet_form_my_confirm" model="ir.actions.act_window">
219 <field name="name">My timesheets to confirm</field>
220 <field name="type">ir.actions.act_window</field>
221 <field name="res_model">hr_timesheet_sheet.sheet</field>
222 <field name="domain">[('user_id','=',uid),('state','=','draft'),('date_to','<=',time.strftime('%Y-%m-%d'))]</field>
223 <field name="view_type">form</field>
224 <field name="view_mode">tree,form</field>
225 <field name="filter" eval="True"/>
226 <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
229 <record id="act_hr_timesheet_sheet_form_my_department" model="ir.actions.act_window">
230 <field name="name">My Department's Timesheets</field>
231 <field name="type">ir.actions.act_window</field>
232 <field name="res_model">hr_timesheet_sheet.sheet</field>
233 <field name="domain">[('user_id', 'child_of', [uid])]</field>
234 <field name="view_type">form</field>
235 <field name="view_mode">tree,form</field>
236 <field name="filter" eval="True"/>
237 <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
239 <menuitem action="act_hr_timesheet_sheet_form_my_department" id="menu_act_hr_timesheet_sheet_form_my_department" parent="hr_timesheet_sheet.next_id_60" groups="base.group_extended"/>
241 <record id="act_hr_timesheet_sheet_form_my_confirm_department" model="ir.actions.act_window">
242 <field name="name">My Department's Timesheets to Confirm</field>
243 <field name="type">ir.actions.act_window</field>
244 <field name="res_model">hr_timesheet_sheet.sheet</field>
245 <field name="domain">[('user_id', 'child_of', [uid]),('state','=','draft'),('date_to','<=',time.strftime('%Y-%m-%d'))]</field>
246 <field name="view_type">form</field>
247 <field name="view_mode">tree,form</field>
248 <field name="filter" eval="True"/>
249 <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
252 <record id="act_hr_timesheet_sheet_form_my_validate_department" model="ir.actions.act_window">
253 <field name="name">My Department's Timesheets to Validate</field>
254 <field name="type">ir.actions.act_window</field>
255 <field name="res_model">hr_timesheet_sheet.sheet</field>
256 <field name="domain">[('user_id', 'child_of', [uid]),('state','=','confirm'),('date_to','<=',time.strftime('%Y-%m-%d'))]</field>
257 <field name="view_type">form</field>
258 <field name="view_mode">tree,form</field>
259 <field name="filter" eval="True"/>
260 <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
263 <wizard id="act_hr_timesheet_sheet_form_my_current" model="hr.employee" name="hr_timesheet_sheet.current.open" string="My Current Timesheet"/>
265 <menuitem action="act_hr_timesheet_sheet_form_my_current" icon="STOCK_NEW" id="menu_act_hr_timesheet_sheet_form_my_current" parent="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my" type="wizard"/>
267 <record id="act_hr_timesheet_sheet_form_all_confirm" model="ir.actions.act_window">
268 <field name="name">Timesheets To Confirm</field>
269 <field name="type">ir.actions.act_window</field>
270 <field name="res_model">hr_timesheet_sheet.sheet</field>
271 <field name="domain">[('state','=','draft'),('date_to','<=',time.strftime('%Y-%m-%d'))]</field>
272 <field name="view_type">form</field>
273 <field name="view_mode">tree,form</field>
274 <field name="filter" eval="True"/>
275 <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
277 <record id="act_hr_timesheet_sheet_form_all_valid" model="ir.actions.act_window">
278 <field name="name">Timesheets To Validate</field>
279 <field name="type">ir.actions.act_window</field>
280 <field name="res_model">hr_timesheet_sheet.sheet</field>
281 <field name="domain">[('state','=','confirm')]</field>
282 <field name="view_type">form</field>
283 <field name="view_mode">tree,form</field>
284 <field name="filter" eval="True"/>
285 <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
292 <record id="hr_timesheet_sheet_company" model="ir.ui.view">
293 <field name="name">res.company.sheet</field>
294 <field name="model">res.company</field>
295 <field name="type">form</field>
296 <field name="inherit_id" ref="base.view_company_form"/>
297 <field name="arch" type="xml">
298 <page string="Configuration" position="inside">
299 <separator string="Timesheets" colspan="4"/>
300 <field name="timesheet_range"/>
301 <field name="timesheet_max_difference"/>
308 hr.analytic.timesheet inheritancy
311 <record id="hr_timesheet_line_form" model="ir.ui.view">
312 <field name="name">hr.analytic.timesheet.form</field>
313 <field name="model">hr.analytic.timesheet</field>
314 <field name="type">form</field>
315 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/>
316 <field name="arch" type="xml">
317 <field name="date" position="after">
318 <field name="sheet_id" select="2"/>
323 hr.attendance inheritancy
326 <record id="view_attendance_form" model="ir.ui.view">
327 <field name="name">hr.attendance.form</field>
328 <field name="model">hr.attendance</field>
329 <field name="type">form</field>
330 <field name="inherit_id" ref="hr_attendance.view_attendance_form"/>
331 <field name="arch" type="xml">
332 <field name="action_desc" position="after">
333 <field name="sheet_id" select="2"/>
337 <record id="view_attendance_tree" model="ir.ui.view">
338 <field name="name">hr.attendance.tree</field>
339 <field name="model">hr.attendance</field>
340 <field name="type">tree</field>
341 <field name="inherit_id" ref="hr_attendance.view_attendance_tree"/>
342 <field name="arch" type="xml">
343 <field name="action_desc" position="after">
344 <field name="sheet_id"/>
349 <act_window domain="[('sheet_id', '=', active_id)]" id="act_hr_timesheet_sheet_sheet_by_day" name="Timesheet by Account" res_model="hr_timesheet_sheet.sheet.account" src_model="hr_timesheet_sheet.sheet"/>
350 <act_window domain="[('sheet_id', '=', active_id)]" id="act_hr_timesheet_sheet_sheet_by_account" name="Timesheet by Day" res_model="hr_timesheet_sheet.sheet.day" src_model="hr_timesheet_sheet.sheet"/>
353 <act_window domain="[('sheet_id', '=', active_id)]" id="act_hr_timesheet_sheet_sheet_2_hr_analytic_timesheet" name="Timesheet Lines" res_model="hr.analytic.timesheet" src_model="hr_timesheet_sheet.sheet"/>
355 <act_window domain="[('sheet_id', '=', active_id)]" id="act_hr_timesheet_sheet_sheet_2_hr_attendance" name="Attendances" res_model="hr.attendance" src_model="hr_timesheet_sheet.sheet"/>
357 <record id="hr_timesheet_sheet_tree_simplified" model="ir.ui.view">
358 <field name="name">hr.timesheet.sheet.tree.simplified</field>
359 <field name="model">hr_timesheet_sheet.sheet</field>
360 <field name="type">tree</field>
361 <field eval="20" name="priority"/>
362 <field name="arch" type="xml">
363 <tree string="Timesheets">
364 <field name="date_from"/>
365 <field name="user_id"/>
367 <field name="total_attendance"/>
368 <field name="total_timesheet"/>
369 <field name="state"/>
374 <record id="act_hr_timesheet_sheet_unvalidate" model="ir.actions.act_window">
375 <field name="name">Unvalidated Timesheets</field>
376 <field name="res_model">hr_timesheet_sheet.sheet</field>
377 <field name="domain">[('state','<>','done'),('date_to','<',time.strftime('%Y-%m-%d'))]</field>
378 <field name="view_type">form</field>
379 <field name="view_id" ref="hr_timesheet_sheet_tree_simplified"/>
380 <field name="filter" eval="True"/>
381 <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>