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">
26 <field name="name" groups="analytic.group_analytic_accounting"/>
27 <field name="invoice_rate"/>
28 <field name="sheet_id" />
32 <record id="hr_timesheet_account_tree" model="ir.ui.view">
33 <field name="name">hr.timesheet.account.tree</field>
34 <field name="model">hr_timesheet_sheet.sheet.account</field>
35 <field name="type">tree</field>
36 <field name="arch" type="xml">
37 <tree string="Timesheet by Accounts">
38 <field name="sheet_id"/>
39 <field name="name" groups="analytic.group_analytic_accounting"/>
40 <field name="total" sum="Total"/>
41 <field name="invoice_rate"/>
46 <record id="hr_timesheet_sheet_form" model="ir.ui.view">
47 <field name="name">hr.timesheet.sheet.form</field>
48 <field name="model">hr_timesheet_sheet.sheet</field>
49 <field name="type">form</field>
50 <field name="arch" type="xml">
51 <form string="Timesheet" version="7.0">
53 <button name="button_confirm" states="draft" string="Submited to Manager" type="object" class="oe_highlight"/>
54 <button name="done" states="confirm" string="Approve" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
55 <button name="action_set_to_draft" states="done" string="Set to Draft" type="object" />
56 <button name="cancel" states="confirm" string="Refuse" type="workflow" groups="base.group_hr_user" />
57 <field name="state" widget="statusbar" statusbar_visible="new,confirm,done"/>
60 <label for="employee_id" class="oe_edit_only"/>
61 <h1><field name="employee_id" on_change="onchange_employee_id(employee_id)"/></h1>
62 <label for="date_from" class="oe_edit_only" string="Timesheet Period"/>
63 <h2>From <field name="date_from"/> to <field name="date_to"/></h2>
67 <field name="department_id"/>
68 <field name="company_id" groups="base.group_multi_company"/>
71 <field name="total_attendance" widget="float_time"/>
72 <field name="total_timesheet" widget="float_time"/>
73 <field name="total_difference" widget="float_time"/>
74 <field name="user_id" invisible="1"/>
81 <button name="button_dummy" class="oe_inline" string="Go to" type="object" icon="terp-gtk-jump-to-ltr"/> :
82 <field name="date_current" class="oe_inline"/>
85 <button class="oe_inline" icon="terp-gtk-go-back-ltr" name="date_previous" string="" type="object"/>
86 <button class="oe_inline" name="date_today" string="Today" type="object" icon="terp-go-today"/>
87 <button class="oe_inline" icon="terp-gtk-go-back-rtl" name="date_next" string="" type="object"/>
90 <group colspan="4" col="3">
91 <field context="{'name':date_current,'user_id':user_id}" name="attendances_ids" nolabel="1">
92 <tree string="Attendances" editable="bottom">
94 <field name="action"/>
95 <field invisible="1" name="employee_id"/>
100 <button name="sign_in" string="Sign In" type="object" icon="terp-gtk-jump-to-ltr"/>
101 <button name="sign_out" string="Sign Out" type="object" icon="terp-gtk-jump-to-rtl"/>
106 <field name="state_attendance"/>
108 <field colspan="4" context="{'date':date_current,'user_id':user_id}" domain="[('name','=',date_current)]" name="timesheet_ids" nolabel="1">
109 <tree editable="top" string="Timesheet Lines">
110 <field invisible="1" name="date"/>
111 <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}"/>
113 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
114 <field name="to_invoice" widget="selection"/>
115 <field invisible="1" name="journal_id"/>
116 <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)"/>
117 <field invisible="1" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
118 <field invisible="1" name="amount"/>
119 <field invisible="1" name="general_account_id"/>
120 <field invisible="1" name="user_id" required="1"/>
122 <form string="Timesheet Lines" version="7.0">
124 <field domain="[('type','=','normal'), ('state', '<>', 'close')]" name="account_id" on_change="on_change_account_id(account_id)"/>
126 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
127 <field name="to_invoice"/>
128 <field name="journal_id"/>
129 <field name="product_id" domain="[('type','=','service')]" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
130 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
131 <field name="amount"/>
132 <field name="general_account_id"/>
133 <field name="user_id" required="1"/>
137 <page string="Summary">
138 <field colspan="4" name="period_ids" nolabel="1">
139 <tree colors="red:total_difference<0.1;blue:total_difference>=0.1" string="Period">
141 <field name="total_attendance" widget="float_time"/>
142 <field name="total_timesheet" widget="float_time"/>
143 <field name="total_difference" widget="float_time"/>
153 <record id="view_hr_timesheet_sheet_filter" model="ir.ui.view">
154 <field name="name">hr_timesheet_sheet.sheet.filter</field>
155 <field name="model">hr_timesheet_sheet.sheet</field>
156 <field name="type">search</field>
157 <field name="arch" type="xml">
158 <search string="Search Timesheet">
159 <field name="date_from"/>
160 <filter icon="terp-document-new" string="In Draft" domain="[('state','in',('draft', 'new'))]" help="Unvalidated Timesheets"/>
161 <filter icon="terp-camera_test" string="To Approve" domain="[('state','=','confirm')]" help="Confirmed Timesheets"/>
162 <field name="employee_id"/>
163 <field name="department_id"/>
164 <group expand="0" string="Group By...">
165 <filter string="Employees" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
166 <filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
172 <record id="act_hr_timesheet_sheet_form" model="ir.actions.act_window">
173 <field name="name">Timesheets</field>
174 <field name="type">ir.actions.act_window</field>
175 <field name="res_model">hr_timesheet_sheet.sheet</field>
176 <field name="view_type">form</field>
177 <field name="view_id" eval="False"/>
178 <field name="context">{'search_default_my_timesheet':1}</field>
179 <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
180 <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>
183 <menuitem action="act_hr_timesheet_sheet_form" id="menu_act_hr_timesheet_sheet_form" parent="hr_attendance.menu_hr_time_tracking"
184 sequence="2" groups="base.group_hr_user,base.group_hr_manager"/>
190 <record id="hr_timesheet_sheet_company" model="ir.ui.view">
191 <field name="name">res.company.sheet</field>
192 <field name="model">res.company</field>
193 <field name="type">form</field>
194 <field name="inherit_id" ref="base.view_company_form"/>
195 <field name="arch" type="xml">
196 <xpath expr="//group[@name='account_grp']" position="after">
197 <group name="timesheets_grp" string="Timesheets">
198 <field name="timesheet_range"/>
199 <field name="timesheet_max_difference"/>
206 hr.analytic.timesheet inheritancy
209 <record id="hr_timesheet_line_form" model="ir.ui.view">
210 <field name="name">hr.analytic.timesheet.form</field>
211 <field name="model">hr.analytic.timesheet</field>
212 <field name="type">form</field>
213 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/>
214 <field name="arch" type="xml">
215 <field name="date" position="after">
216 <field name="sheet_id" />
221 <record id="hr_timesheet_line_search" model="ir.ui.view">
222 <field name="name">hr.analytic.timesheet.search</field>
223 <field name="model">hr.analytic.timesheet</field>
224 <field name="type">form</field>
225 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_search"/>
226 <field name="arch" type="xml">
227 <field name="date" position="before">
228 <field name="sheet_id"/>
234 hr.attendance inheritancy
237 <record model="ir.ui.view" id="view_hr_attendance_filter">
238 <field name="name">view_hr_attendance_filter</field>
239 <field name="model">hr.attendance</field>
240 <field name="type">search</field>
241 <field name="inherit_id" ref="hr_attendance.view_hr_attendance_filter" />
242 <field name="arch" type="xml">
243 <field name="employee_id" position="after">
244 <field name="sheet_id"/>
249 <record id="view_attendance_form" model="ir.ui.view">
250 <field name="name">hr.attendance.form</field>
251 <field name="model">hr.attendance</field>
252 <field name="type">form</field>
253 <field name="inherit_id" ref="hr_attendance.view_attendance_form"/>
254 <field name="arch" type="xml">
255 <field name="action_desc" position="after">
256 <field name="sheet_id"/>
260 <record id="view_attendance_tree" model="ir.ui.view">
261 <field name="name">hr.attendance.tree</field>
262 <field name="model">hr.attendance</field>
263 <field name="type">tree</field>
264 <field name="inherit_id" ref="hr_attendance.view_attendance_tree"/>
265 <field name="arch" type="xml">
266 <field name="action" position="after">
267 <field name="sheet_id"/>
271 <record id="view_attendance_tree_who" model="ir.ui.view">
272 <field name="name">hr.attendance.tree</field>
273 <field name="model">hr.attendance</field>
274 <field name="type">tree</field>
275 <field name="inherit_id" ref="hr_attendance.view_attendance_who"/>
276 <field name="arch" type="xml">
277 <field name="action" position="after">
278 <field name="sheet_id"/>
284 context="{'search_default_sheet_id': [active_id]}"
285 id="act_hr_timesheet_sheet_sheet_by_account"
286 name="Timesheet by Account"
287 res_model="hr_timesheet_sheet.sheet.account"
288 src_model="hr_timesheet_sheet.sheet"/>
291 context="{'search_default_sheet_id': [active_id]}"
292 id="act_hr_timesheet_sheet_sheet_by_day"
293 name="Timesheet by Day"
294 res_model="hr_timesheet_sheet.sheet.day"
295 src_model="hr_timesheet_sheet.sheet"/>
298 context="{'search_default_sheet_id': [active_id]}"
299 id="act_hr_timesheet_sheet_sheet_2_hr_analytic_timesheet"
300 name="Timesheet Lines"
301 res_model="hr.analytic.timesheet"
302 src_model="hr_timesheet_sheet.sheet"/>
306 context="{'search_default_sheet_id': [active_id]}"
307 id="act_hr_timesheet_sheet_sheet_2_hr_attendance"
309 res_model="hr.attendance"
310 src_model="hr_timesheet_sheet.sheet"/>
312 <record id="hr_timesheet_sheet_tree_simplified" model="ir.ui.view">
313 <field name="name">hr.timesheet.sheet.tree</field>
314 <field name="model">hr_timesheet_sheet.sheet</field>
315 <field name="type">tree</field>
316 <field eval="10" name="priority"/>
317 <field name="arch" type="xml">
318 <tree colors="blue:state == 'draft';black:state in ('confirm','new');gray:state == 'done'" string="Timesheets">
319 <field name="employee_id"/>
320 <field name="date_from"/>
321 <field name="date_to"/>
322 <field name="department_id"/>
323 <field name="total_attendance" widget="float_time"/>
324 <field name="total_timesheet" widget="float_time"/>
325 <field name="total_difference" widget="float_time"/>
326 <field name="state"/>
331 <record id="hr_timesheet_day_tree" model="ir.ui.view">
332 <field name="name">hr.timesheet.day.tree</field>
333 <field name="model">hr_timesheet_sheet.sheet.day</field>
334 <field name="type">tree</field>
335 <field name="arch" type="xml">
336 <tree colors="blue:total_difference<0.1;red:total_difference>=0.1" string="Period">
338 <field name="total_attendance" widget="float_time" sum="Total Attendances"/>
339 <field name="total_timesheet" widget="float_time" sum="Total Timesheet"/>
340 <field name="total_difference" widget="float_time" sum="Total Difference"/>
345 <!-- Timesheet Button on Employee Form -->
347 context="{'search_default_employee_id': [active_id], 'default_employee_id': active_id}"
348 id="act_hr_employee_2_hr_timesheet" name="Timesheets" res_model="hr_timesheet_sheet.sheet" src_model="hr.employee"/>
350 <record id="hr_timesheet_sheet_employee_extd_form" model="ir.ui.view">
351 <field name="name">hr.timesheet.sheet.employee.extd_form</field>
352 <field name="model">hr.employee</field>
353 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_employee_extd_form"/>
354 <field name="arch" type="xml">
355 <xpath expr="//div[@name='button_box']" position="inside">
356 <button name="%(act_hr_employee_2_hr_timesheet)d" string="Timesheets" type="action"/>