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 colors="blue:state == 'draft';grey:state == 'done'">
11 <field name="user_id"/>
12 <field name="date_from"/>
13 <field name="date_to"/>
15 <field name="department_id"/>
16 <field name="total_attendance" groups="hr_attendance.group_hr_attendance"/>
17 <field name="total_timesheet"/>
18 <field name="total_difference" groups="hr_attendance.group_hr_attendance"/>
23 <record id="hr_timesheet_sheet_graph" model="ir.ui.view">
24 <field name="name">hr.timesheet.sheet.graph</field>
25 <field name="model">hr_timesheet_sheet.sheet</field>
26 <field name="type">graph</field>
27 <field name="arch" type="xml">
28 <graph string="Timesheets" type="bar">
30 <field name="total_attendance" operator="+"/>
31 <field name="total_timesheet" operator="+"/>
35 <record id="hr_timesheet_account_form" model="ir.ui.view">
36 <field name="name">hr.timesheet.account.form</field>
37 <field name="model">hr_timesheet_sheet.sheet.account</field>
38 <field name="type">form</field>
39 <field name="arch" type="xml">
40 <form string="Timesheet by Accounts">
41 <field name="sheet_id" select="1"/>
42 <field name="name" select="1"/>
43 <field name="total" sum="Total"/>
44 <field name="invoice_rate"/>
49 <record id="hr_timesheet_account_tree" model="ir.ui.view">
50 <field name="name">hr.timesheet.account.tree</field>
51 <field name="model">hr_timesheet_sheet.sheet.account</field>
52 <field name="type">tree</field>
53 <field name="arch" type="xml">
54 <tree string="Timesheet by Accounts">
55 <field name="sheet_id"/>
57 <field name="total" sum="Total"/>
58 <field name="invoice_rate"/>
63 <record id="hr_timesheet_day_form" model="ir.ui.view">
64 <field name="name">hr.timesheet.day.form</field>
65 <field name="model">hr_timesheet_sheet.sheet.day</field>
66 <field name="type">form</field>
67 <field name="arch" type="xml">
68 <form string="Timesheet by Days">
69 <field name="sheet_id" select="1"/>
70 <field name="name" select="1"/>
71 <field name="total_timesheet"/>
72 <field name="total_attendance" groups="hr_attendance.group_hr_attendance"/>
73 <field name="total_difference" groups="hr_attendance.group_hr_attendance"/>
78 <record id="hr_timesheet_day_tree" model="ir.ui.view">
79 <field name="name">hr.timesheet.day.tree</field>
80 <field name="model">hr_timesheet_sheet.sheet.day</field>
81 <field name="type">tree</field>
82 <field name="arch" type="xml">
83 <tree colors="red:total_difference<0.1;blue:total_difference>=0.1" string="Timesheet by Days">
84 <field name="sheet_id"/>
86 <field name="total_timesheet" sum="Total Timesheet"/>
87 <field name="total_attendance" sum="Total Attendance" groups="hr_attendance.group_hr_attendance"/>
88 <field name="total_difference" sum="Total Difference" groups="hr_attendance.group_hr_attendance"/>
93 <record id="hr_timesheet_sheet_form" model="ir.ui.view">
94 <field name="name">hr.timesheet.sheet.form</field>
95 <field name="model">hr_timesheet_sheet.sheet</field>
96 <field name="type">form</field>
97 <field name="arch" type="xml">
98 <form string="Timesheet">
99 <group colspan="4" col="6">
101 <field name="company_id" select="1" groups="base.group_multi_company"/>
102 <field name="department_id" groups="base.group_extended"/>
104 <field name="user_id"/>
105 <field name="date_from"/>
106 <field name="date_to"/>
108 <notebook colspan="4">
109 <page string="Daily View">
110 <group col="6" colspan="4">
111 <button name="button_dummy" string="Go to:" type="object" icon="terp-gtk-jump-to-ltr"/>
112 <field name="date_current" nolabel="1"/>
114 <button icon="terp-gtk-go-back-ltr" name="date_previous" string="" type="object"/>
115 <button name="date_today" string="Today" type="object" icon="terp-go-today"/>
116 <button icon="terp-gtk-go-back-rtl" name="date_next" string="" type="object"/>
119 <field colspan="3" context="name=date_current,user_id=user_id" height="100" name="attendances_ids" nolabel="1" groups="hr_attendance.group_hr_attendance">
120 <tree string="Attendances" editable="bottom">
122 <field name="action"/>
123 <field invisible="1" name="employee_id"/>
126 <group col="1" colspan="1" groups="hr_attendance.group_hr_attendance">
127 <button name="sign_in" string="Sign In" type="object" icon="terp-gtk-jump-to-ltr"/>
128 <button name="sign_out" string="Sign Out" type="object" icon="terp-gtk-jump-to-rtl"/>
130 <field name="state_attendance" groups="hr_attendance.group_hr_attendance"/>
131 <field name="total_attendance_day" widget="float_time" groups="hr_attendance.group_hr_attendance"/>
132 <field colspan="4" context="date=date_current,user_id=user_id" domain="[('name','=',date_current)]" name="timesheet_ids" nolabel="1">
133 <tree editable="top" string="Timesheet">
134 <field invisible="1" name="date"/>
135 <field domain="[('type','=','normal'), ('state', '<>', 'close')]" name="account_id" on_change="on_change_account_id(account_id)"/>
137 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" widget="float_time"/>
138 <field name="to_invoice"/>
139 <field invisible="1" name="journal_id"/>
140 <field invisible="1" name="product_id"/>
141 <field invisible="1" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
142 <field invisible="1" name="amount"/>
143 <field invisible="1" name="general_account_id"/>
144 <field invisible="1" name="user_id" required="1"/>
146 <form string="Timesheet">
148 <field domain="[('type','=','normal'), ('state', '<>', 'close')]" name="account_id" on_change="on_change_account_id(account_id)"/>
150 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" widget="float_time"/>
151 <field name="to_invoice"/>
152 <field name="journal_id"/>
153 <field name="product_id"/>
154 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
155 <field name="amount"/>
156 <field name="general_account_id"/>
157 <field name="user_id" required="1"/>
160 <field name="total_difference_day" widget="float_time"/>
161 <field name="total_timesheet_day" widget="float_time"/>
163 <page string="By Day">
164 <field colspan="4" name="period_ids" nolabel="1">
165 <tree colors="red:total_difference<0.1;blue:total_difference>=0.1" string="Period">
167 <field name="total_attendance" widget="float_time" groups="hr_attendance.group_hr_attendance"/>
168 <field name="total_timesheet" widget="float_time"/>
169 <field name="total_difference" widget="float_time" groups="hr_attendance.group_hr_attendance"/>
172 <group colspan="4" col="6">
173 <field name="total_attendance" widget="float_time"/>
174 <field name="total_timesheet" widget="float_time"/>
175 <field name="total_difference" widget="float_time"/>
179 <field name="state"/>
180 <group col="4" colspan="2">
181 <button name="button_confirm" states="draft" string="Confirm" type="object" icon="terp-gtk-jump-to-rtl"/>
182 <button name="action_set_to_draft" states="done" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
183 <button name="cancel" states="confirm" string="Refuse" type="workflow" icon="terp-gtk-stop"/>
184 <button name="done" states="confirm" string="Accept" type="workflow" icon="terp-camera_test"/>
190 <record id="view_hr_timesheet_sheet_filter" model="ir.ui.view">
191 <field name="name">hr_timesheet_sheet.sheet.filter</field>
192 <field name="model">hr_timesheet_sheet.sheet</field>
193 <field name="type">search</field>
194 <field name="arch" type="xml">
195 <search string="Search Timesheet">
196 <group col="10" colspan="4">
197 <filter icon="terp-document-new" string="In Draft" domain="[('state','in',('draft', 'new'))]" help="Unvalidated Timesheets"/>
198 <filter icon="terp-gtk-go-back-rtl" string="To Approve" domain="[('state','=','confirm')]" help="Confirmed Timesheets"/>
199 <separator orientation="vertical"/>
200 <field name="user_id" select="1"/>
201 <field name="date_from"/>
202 <field name="department_id" widget="selection">
203 <filter icon="terp-personal+"
204 domain="[('department_id','=',context.get('department_id',False))]"
205 help="My Departments Timesheet"/>
209 <group expand="0" string="Group By...">
210 <filter string="Users" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
211 <filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
217 <record id="act_hr_timesheet_sheet_form" model="ir.actions.act_window">
218 <field name="name">Timesheets</field>
219 <field name="type">ir.actions.act_window</field>
220 <field name="res_model">hr_timesheet_sheet.sheet</field>
221 <field name="view_type">form</field>
222 <field name="view_id" eval="False"/>
223 <field name="context">{'search_default_my_timesheet':1, 'search_default_user_id':uid }</field>
224 <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
227 <!--Time Tracking menu in project Management-->
228 <menuitem icon="terp-project" id="base.menu_main_pm" name="Project" sequence="10"/>
230 id="base.menu_project_management_time_tracking"
232 parent="base.menu_main_pm" sequence="5"/>
233 <menuitem action="hr_timesheet_sheet.act_hr_timesheet_sheet_form" id="menu_act_project_management_timesheet_sheet_form" parent="base.menu_project_management_time_tracking"
234 groups="hr.group_hr_manager" sequence="5"/>
235 <!--<menuitem id="next_id_60" name="Timesheets" parent="hr.menu_hr_root"/>-->
236 <menuitem action="act_hr_timesheet_sheet_form" id="menu_act_hr_timesheet_sheet_form" parent="hr_attendance.menu_hr_time_tracking"
237 groups="hr.group_hr_manager" sequence="1"/>
243 <record id="hr_timesheet_sheet_company" model="ir.ui.view">
244 <field name="name">res.company.sheet</field>
245 <field name="model">res.company</field>
246 <field name="type">form</field>
247 <field name="inherit_id" ref="base.view_company_form"/>
248 <field name="arch" type="xml">
249 <page string="Configuration" position="inside">
250 <separator string="Timesheets" colspan="4"/>
251 <field name="timesheet_range"/>
252 <field name="timesheet_max_difference"/>
259 hr.analytic.timesheet inheritancy
262 <record id="hr_timesheet_line_form" model="ir.ui.view">
263 <field name="name">hr.analytic.timesheet.form</field>
264 <field name="model">hr.analytic.timesheet</field>
265 <field name="type">form</field>
266 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/>
267 <field name="arch" type="xml">
268 <field name="date" position="after">
269 <field name="sheet_id" />
274 hr.attendance inheritancy
277 <record model="ir.ui.view" id="view_hr_attendance_filter">
278 <field name="name">view_hr_attendance_filter</field>
279 <field name="model">hr.attendance</field>
280 <field name="type">search</field>
281 <field name="inherit_id" ref="hr_attendance.view_hr_attendance_filter" />
282 <field name="arch" type="xml">
283 <field name="action" position="after">
284 <field name="sheet_id" select="1" />
289 <record id="view_attendance_form" model="ir.ui.view">
290 <field name="name">hr.attendance.form</field>
291 <field name="model">hr.attendance</field>
292 <field name="type">form</field>
293 <field name="inherit_id" ref="hr_attendance.view_attendance_form"/>
294 <field name="arch" type="xml">
295 <field name="action_desc" position="after">
296 <field name="sheet_id"/>
300 <record id="view_attendance_tree" model="ir.ui.view">
301 <field name="name">hr.attendance.tree</field>
302 <field name="model">hr.attendance</field>
303 <field name="type">tree</field>
304 <field name="inherit_id" ref="hr_attendance.view_attendance_tree"/>
305 <field name="arch" type="xml">
306 <field name="action" position="after">
307 <field name="sheet_id"/>
311 <record id="view_attendance_tree_who" model="ir.ui.view">
312 <field name="name">hr.attendance.tree</field>
313 <field name="model">hr.attendance</field>
314 <field name="type">tree</field>
315 <field name="inherit_id" ref="hr_attendance.view_attendance_who"/>
316 <field name="arch" type="xml">
317 <field name="action" position="after">
318 <field name="sheet_id"/>
323 <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"/>
324 <!-- <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"/> -->
327 <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"/>
329 <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"/>
331 <record id="hr_timesheet_sheet_tree_simplified" model="ir.ui.view">
332 <field name="name">hr.timesheet.sheet.tree.simplified</field>
333 <field name="model">hr_timesheet_sheet.sheet</field>
334 <field name="type">tree</field>
335 <field eval="20" name="priority"/>
336 <field name="arch" type="xml">
337 <tree string="Timesheets">
338 <field name="date_from"/>
339 <field name="user_id"/>
341 <field name="total_attendance"/>
342 <field name="total_timesheet"/>
343 <field name="state"/>
348 <!-- Timesheet Button on Employee Form -->
349 <act_window domain="[('user_id', '=', user_id)]" id="act_hr_employee_2_hr_timesheet" name="Timesheets" res_model="hr_timesheet_sheet.sheet" src_model="hr.employee"/>