1 <?xml version="1.0" encoding="utf-8"?>
5 <record id="hr_timesheet_account_form" model="ir.ui.view">
6 <field name="name">hr.timesheet.account.form</field>
7 <field name="model">hr_timesheet_sheet.sheet.account</field>
8 <field name="type">form</field>
9 <field name="arch" type="xml">
10 <form string="Timesheet by Accounts" version="7.0">
12 <field name="sheet_id"/>
13 <field name="name" groups="analytic.group_analytic_accounting"/>
14 <field name="total" sum="Total"/>
15 <field name="invoice_rate"/>
20 <record id="hr_timesheet_account_filter" model="ir.ui.view">
21 <field name="name">hr.timesheet.account.filter</field>
22 <field name="model">hr_timesheet_sheet.sheet.account</field>
23 <field name="type">search</field>
24 <field name="arch" type="xml">
25 <search string="Search Account">
27 <field name="sheet_id" />
28 <field name="name" groups="analytic.group_analytic_accounting"/>
29 <field name="invoice_rate"/>
34 <record id="hr_timesheet_account_tree" model="ir.ui.view">
35 <field name="name">hr.timesheet.account.tree</field>
36 <field name="model">hr_timesheet_sheet.sheet.account</field>
37 <field name="type">tree</field>
38 <field name="arch" type="xml">
39 <tree string="Timesheet by Accounts">
40 <field name="sheet_id"/>
41 <field name="name" groups="analytic.group_analytic_accounting"/>
42 <field name="total" sum="Total"/>
43 <field name="invoice_rate"/>
48 <record id="hr_timesheet_sheet_form" model="ir.ui.view">
49 <field name="name">hr.timesheet.sheet.form</field>
50 <field name="model">hr_timesheet_sheet.sheet</field>
51 <field name="type">form</field>
52 <field name="arch" type="xml">
53 <form string="Timesheet" version="7.0">
55 <button name="button_confirm" states="draft" string="Submited to Manager" type="object"/>
56 <button name="done" states="confirm" string="Approve" type="workflow" groups="base.group_hr_user"/>
57 <button name="action_set_to_draft" states="done" string="Set to Draft" type="object"/>
58 <button name="cancel" states="confirm" string="Refuse" type="workflow" groups="base.group_hr_user"/>
59 <field name="state" widget="statusbar" statusbar_visible="new,confirm,done"/>
62 <label for="employee_id" class="oe_edit_only"/>
63 <h1><field name="employee_id" on_change="onchange_employee_id(employee_id)"/></h1>
64 <label for="date_from" class="oe_edit_only" string="Timesheet Period"/>
65 <h2>From <field name="date_from"/> to <field name="date_to"/></h2>
69 <field name="department_id"/>
70 <field name="company_id" groups="base.group_multi_company"/>
73 <field name="total_attendance" widget="float_time"/>
74 <field name="total_timesheet" widget="float_time"/>
75 <field name="total_difference" widget="float_time"/>
76 <field name="user_id" invisible="1"/>
83 <button name="button_dummy" class="oe_inline" string="Go to" type="object" icon="terp-gtk-jump-to-ltr"/> :
84 <field name="date_current" class="oe_inline"/>
87 <button class="oe_inline" icon="terp-gtk-go-back-ltr" name="date_previous" string="" type="object"/>
88 <button class="oe_inline" name="date_today" string="Today" type="object" icon="terp-go-today"/>
89 <button class="oe_inline" icon="terp-gtk-go-back-rtl" name="date_next" string="" type="object"/>
92 <group colspan="4" col="3">
93 <field context="{'name':date_current,'user_id':user_id}" name="attendances_ids" nolabel="1">
94 <tree string="Attendances" editable="bottom">
96 <field name="action"/>
97 <field invisible="1" name="employee_id"/>
102 <button name="sign_in" string="Sign In" type="object" icon="terp-gtk-jump-to-ltr"/>
103 <button name="sign_out" string="Sign Out" type="object" icon="terp-gtk-jump-to-rtl"/>
108 <field name="state_attendance"/>
109 <field name="total_attendance_day" widget="float_time"/>
111 <field colspan="4" context="{'date':date_current,'user_id':user_id}" domain="[('name','=',date_current)]" name="timesheet_ids" nolabel="1">
112 <tree editable="top" string="Timesheet Lines">
113 <field invisible="1" name="date"/>
114 <field domain="[('type','in',['normal', 'contract']), ('state', '<>', 'close'),('use_timesheets','=',1)]" name="account_id" on_change="on_change_account_id(account_id)" context="{'default_use_timesheets': 1}"/>
116 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
117 <field name="to_invoice" widget="selection"/>
118 <field invisible="1" name="journal_id"/>
119 <field invisible="1" name="product_id" domain="[('type','=','service')]" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
120 <field invisible="1" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
121 <field invisible="1" name="amount"/>
122 <field invisible="1" name="general_account_id"/>
123 <field invisible="1" name="user_id" required="1"/>
125 <form string="Timesheet Lines" version="7.0">
127 <field domain="[('type','=','normal'), ('state', '<>', 'close')]" name="account_id" on_change="on_change_account_id(account_id)"/>
129 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
130 <field name="to_invoice"/>
131 <field name="journal_id"/>
132 <field name="product_id" domain="[('type','=','service')]" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
133 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
134 <field name="amount"/>
135 <field name="general_account_id"/>
136 <field name="user_id" required="1"/>
139 <field name="total_difference_day" widget="float_time"/>
140 <field name="total_timesheet_day" widget="float_time"/>
142 <page string="Summary">
143 <field colspan="4" name="period_ids" nolabel="1">
144 <tree colors="red:total_difference<0.1;blue:total_difference>=0.1" string="Period">
146 <field name="total_attendance" widget="float_time"/>
147 <field name="total_timesheet" widget="float_time"/>
148 <field name="total_difference" widget="float_time"/>
158 <record id="view_hr_timesheet_sheet_filter" model="ir.ui.view">
159 <field name="name">hr_timesheet_sheet.sheet.filter</field>
160 <field name="model">hr_timesheet_sheet.sheet</field>
161 <field name="type">search</field>
162 <field name="arch" type="xml">
163 <search string="Search Timesheet">
165 <field name="date_from"/>
166 <separator orientation="vertical"/>
167 <filter icon="terp-document-new" string="In Draft" domain="[('state','in',('draft', 'new'))]" help="Unvalidated Timesheets"/>
168 <filter icon="terp-camera_test" string="To Approve" domain="[('state','=','confirm')]" help="Confirmed Timesheets"/>
169 <separator orientation="vertical"/>
170 <field name="employee_id"/>
171 <field name="department_id" widget="selection"/>
174 <group expand="0" string="Group By...">
175 <filter string="Employees" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
176 <filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
182 <record id="act_hr_timesheet_sheet_form" model="ir.actions.act_window">
183 <field name="name">Timesheets</field>
184 <field name="type">ir.actions.act_window</field>
185 <field name="res_model">hr_timesheet_sheet.sheet</field>
186 <field name="view_type">form</field>
187 <field name="view_id" eval="False"/>
188 <field name="context">{'search_default_my_timesheet':1}</field>
189 <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
190 <field name="help">Check your timesheets for a specific period. You can also encode time spent on a project (i.e. an analytic account) thus generating costs in the analytic account concerned.</field>
193 <menuitem action="act_hr_timesheet_sheet_form" id="menu_act_hr_timesheet_sheet_form" parent="hr_attendance.menu_hr_time_tracking"
194 sequence="2" groups="base.group_hr_user,base.group_hr_manager"/>
200 <record id="hr_timesheet_sheet_company" model="ir.ui.view">
201 <field name="name">res.company.sheet</field>
202 <field name="model">res.company</field>
203 <field name="type">form</field>
204 <field name="inherit_id" ref="base.view_company_form"/>
205 <field name="arch" type="xml">
206 <page string="Configuration" position="inside">
207 <separator string="Timesheets" colspan="4"/>
208 <field name="timesheet_range"/>
209 <field name="timesheet_max_difference"/>
216 hr.analytic.timesheet inheritancy
219 <record id="hr_timesheet_line_form" model="ir.ui.view">
220 <field name="name">hr.analytic.timesheet.form</field>
221 <field name="model">hr.analytic.timesheet</field>
222 <field name="type">form</field>
223 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/>
224 <field name="arch" type="xml">
225 <field name="date" position="after">
226 <field name="sheet_id" />
231 <record id="hr_timesheet_line_search" model="ir.ui.view">
232 <field name="name">hr.analytic.timesheet.search</field>
233 <field name="model">hr.analytic.timesheet</field>
234 <field name="type">form</field>
235 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_search"/>
236 <field name="arch" type="xml">
237 <field name="user_id" position="before">
238 <field name="sheet_id"/>
244 hr.attendance inheritancy
247 <record model="ir.ui.view" id="view_hr_attendance_filter">
248 <field name="name">view_hr_attendance_filter</field>
249 <field name="model">hr.attendance</field>
250 <field name="type">search</field>
251 <field name="inherit_id" ref="hr_attendance.view_hr_attendance_filter" />
252 <field name="arch" type="xml">
253 <field name="employee_id" position="after">
254 <field name="sheet_id"/>
259 <record id="view_attendance_form" model="ir.ui.view">
260 <field name="name">hr.attendance.form</field>
261 <field name="model">hr.attendance</field>
262 <field name="type">form</field>
263 <field name="inherit_id" ref="hr_attendance.view_attendance_form"/>
264 <field name="arch" type="xml">
265 <field name="action_desc" position="after">
266 <field name="sheet_id"/>
270 <record id="view_attendance_tree" model="ir.ui.view">
271 <field name="name">hr.attendance.tree</field>
272 <field name="model">hr.attendance</field>
273 <field name="type">tree</field>
274 <field name="inherit_id" ref="hr_attendance.view_attendance_tree"/>
275 <field name="arch" type="xml">
276 <field name="action" position="after">
277 <field name="sheet_id"/>
281 <record id="view_attendance_tree_who" model="ir.ui.view">
282 <field name="name">hr.attendance.tree</field>
283 <field name="model">hr.attendance</field>
284 <field name="type">tree</field>
285 <field name="inherit_id" ref="hr_attendance.view_attendance_who"/>
286 <field name="arch" type="xml">
287 <field name="action" position="after">
288 <field name="sheet_id"/>
294 context="{'search_default_sheet_id': [active_id]}"
295 id="act_hr_timesheet_sheet_sheet_by_account"
296 name="Timesheet by Account"
297 res_model="hr_timesheet_sheet.sheet.account"
298 src_model="hr_timesheet_sheet.sheet"/>
301 context="{'search_default_sheet_id': [active_id]}"
302 id="act_hr_timesheet_sheet_sheet_by_day"
303 name="Timesheet by Day"
304 res_model="hr_timesheet_sheet.sheet.day"
305 src_model="hr_timesheet_sheet.sheet"/>
308 context="{'search_default_sheet_id': [active_id]}"
309 id="act_hr_timesheet_sheet_sheet_2_hr_analytic_timesheet"
310 name="Timesheet Lines"
311 res_model="hr.analytic.timesheet"
312 src_model="hr_timesheet_sheet.sheet"/>
316 context="{'search_default_sheet_id': [active_id]}"
317 id="act_hr_timesheet_sheet_sheet_2_hr_attendance"
319 res_model="hr.attendance"
320 src_model="hr_timesheet_sheet.sheet"/>
322 <record id="hr_timesheet_sheet_tree_simplified" model="ir.ui.view">
323 <field name="name">hr.timesheet.sheet.tree</field>
324 <field name="model">hr_timesheet_sheet.sheet</field>
325 <field name="type">tree</field>
326 <field eval="10" name="priority"/>
327 <field name="arch" type="xml">
328 <tree colors="blue:state == 'draft';black:state in ('confirm','new');gray:state == 'done'" string="Timesheets">
329 <field name="employee_id"/>
330 <field name="date_from"/>
331 <field name="date_to"/>
332 <field name="department_id"/>
333 <field name="total_attendance" widget="float_time"/>
334 <field name="total_timesheet" widget="float_time"/>
335 <field name="total_difference" widget="float_time"/>
336 <field name="state"/>
341 <record id="hr_timesheet_day_tree" model="ir.ui.view">
342 <field name="name">hr.timesheet.day.tree</field>
343 <field name="model">hr_timesheet_sheet.sheet.day</field>
344 <field name="type">tree</field>
345 <field name="arch" type="xml">
346 <tree colors="blue:total_difference<0.1;red:total_difference>=0.1" string="Period">
348 <field name="total_attendance" widget="float_time" sum="Total Attendances"/>
349 <field name="total_timesheet" widget="float_time" sum="Total Timesheet"/>
350 <field name="total_difference" widget="float_time" sum="Total Difference"/>
355 <!-- Timesheet Button on Employee Form -->
357 context="{'search_default_employee_id': [active_id], 'default_employee_id': active_id}"
358 id="act_hr_employee_2_hr_timesheet" name="Timesheets" res_model="hr_timesheet_sheet.sheet" src_model="hr.employee"/>
360 <record id="hr_timesheet_sheet_employee_extd_form" model="ir.ui.view">
361 <field name="name">hr.timesheet.sheet.employee.extd_form</field>
362 <field name="model">hr.employee</field>
363 <field name="inherit_id" ref="hr.view_employee_form"/>
364 <field name="arch" type="xml">
365 <xpath expr="//div[@name='button_box']" position="inside">
366 <button name="%(act_hr_employee_2_hr_timesheet)d" string="Timesheets" type="action"/>