1 <?xml version="1.0" encoding="utf-8"?>
4 <!-- Editable current timesheet used in dashboard-->
5 <record id="hr_timesheet_sheet_tree" model="ir.ui.view">
6 <field name="name">hr.timesheet.sheet.tree</field>
7 <field name="model">hr_timesheet_sheet.sheet</field>
8 <field name="type">tree</field>
9 <field name="arch" type="xml">
10 <tree string="Timesheets" editable="top">
11 <field name="user_id"/>
12 <field name="department_id"/>
13 <field name="date_from"/>
14 <field name="date_to"/>
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"/>
24 <record id="hr_timesheet_account_form" model="ir.ui.view">
25 <field name="name">hr.timesheet.account.form</field>
26 <field name="model">hr_timesheet_sheet.sheet.account</field>
27 <field name="type">form</field>
28 <field name="arch" type="xml">
29 <form string="Timesheet by Accounts">
30 <field name="sheet_id" select="1"/>
31 <field name="name" select="1"/>
32 <field name="total" sum="Total"/>
33 <field name="invoice_rate" select="2"/>
38 <record id="hr_timesheet_account_tree" model="ir.ui.view">
39 <field name="name">hr.timesheet.account.tree</field>
40 <field name="model">hr_timesheet_sheet.sheet.account</field>
41 <field name="type">tree</field>
42 <field name="arch" type="xml">
43 <tree string="Timesheet by Accounts">
44 <field name="sheet_id"/>
46 <field name="total" sum="Total"/>
47 <field name="invoice_rate"/>
52 <record id="hr_timesheet_day_form" model="ir.ui.view">
53 <field name="name">hr.timesheet.day.form</field>
54 <field name="model">hr_timesheet_sheet.sheet.day</field>
55 <field name="type">form</field>
56 <field name="arch" type="xml">
57 <form string="Timesheet by Days">
58 <field name="sheet_id" select="1"/>
59 <field name="name" select="1"/>
60 <field name="total_timesheet"/>
61 <field name="total_attendance" groups="hr_attendance.group_hr_attendance"/>
62 <field name="total_difference" groups="hr_attendance.group_hr_attendance"/>
67 <record id="hr_timesheet_day_tree" model="ir.ui.view">
68 <field name="name">hr.timesheet.day.tree</field>
69 <field name="model">hr_timesheet_sheet.sheet.day</field>
70 <field name="type">tree</field>
71 <field name="arch" type="xml">
72 <tree colors="red:total_difference<0.1;blue:total_difference>=0.1" string="Timesheet by Days">
73 <field name="sheet_id"/>
75 <field name="total_timesheet" sum="Total Timesheet"/>
76 <field name="total_attendance" sum="Total Attendance" groups="hr_attendance.group_hr_attendance"/>
77 <field name="total_difference" sum="Total Difference" groups="hr_attendance.group_hr_attendance"/>
82 <record id="hr_timesheet_sheet_form" model="ir.ui.view">
83 <field name="name">hr.timesheet.sheet.form</field>
84 <field name="model">hr_timesheet_sheet.sheet</field>
85 <field name="type">form</field>
86 <field name="arch" type="xml">
87 <form string="Timesheet">
89 <field name="user_id"/>
90 <field name="date_from"/>
91 <field name="date_to"/>
92 <field name="company_id" select="1" groups="base.group_multi_company"/>
93 <field name="department_id"/>
94 <notebook colspan="4">
95 <page string="Daily View">
96 <group col="6" colspan="4">
97 <button name="button_dummy" string="Go to:" type="object" icon="gtk-redo"/>
98 <field name="date_current" nolabel="1"/>
100 <button icon="gtk-media-previous" name="date_previous" string="" type="object"/>
101 <button name="date_today" string="Today" type="object" icon="gtk-home"/>
102 <button icon="gtk-media-next" name="date_next" string="" type="object"/>
105 <field colspan="3" context="name=date_current,user_id=user_id" height="100" name="attendances_ids" nolabel="1" groups="hr_attendance.group_hr_attendance">
106 <tree string="Attendances">
108 <field name="action"/>
109 <field invisible="1" name="employee_id"/>
112 <group col="1" colspan="1" groups="hr_attendance.group_hr_attendance">
113 <button name="sign_in" string="Sign In" type="object" icon="gtk-go-back"/>
114 <button name="sign_out" string="Sign Out" type="object" icon="gtk-go-forward"/>
117 <field name="state_attendance" groups="hr_attendance.group_hr_attendance"/>
118 <field name="total_attendance_day" widget="float_time" groups="hr_attendance.group_hr_attendance"/>
119 <field colspan="4" context="date=date_current,user_id=user_id" domain="[('name','=',date_current)]" name="timesheet_ids" nolabel="1">
120 <tree editable="top" string="Timesheet">
121 <field invisible="1" name="date"/>
122 <field domain="[('type','=','normal'), ('state', '<>', 'close')]" name="account_id" on_change="on_change_account_id(account_id)"/>
124 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" widget="float_time"/>
125 <field name="to_invoice"/>
126 <field invisible="1" name="journal_id"/>
127 <field invisible="1" name="product_id"/>
128 <field invisible="1" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
129 <field name="amount"/>
130 <field name="general_account_id"/>
131 <field invisible="1" name="user_id" required="1"/>
133 <form string="Timesheet">
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 name="amount"/>
143 <field name="general_account_id"/>
144 <field name="user_id" required="1"/>
147 <field name="total_difference_day" widget="float_time"/>
148 <field name="total_timesheet_day" widget="float_time"/>
150 <page string="By Day">
151 <field colspan="4" name="period_ids" nolabel="1">
152 <tree colors="red:total_difference<0.1;blue:total_difference>=0.1" string="Period">
154 <field name="total_attendance" widget="float_time" groups="hr_attendance.group_hr_attendance"/>
155 <field name="total_timesheet" widget="float_time"/>
156 <field name="total_difference" widget="float_time" groups="hr_attendance.group_hr_attendance"/>
159 <field name="total_attendance" widget="float_time"/>
160 <field name="total_timesheet" widget="float_time"/>
161 <field name="total_difference" widget="float_time"/>
164 <field name="state"/>
165 <group col="4" colspan="2">
166 <button name="button_confirm" states="draft" string="Confirm" type="object" icon="gtk-execute"/>
167 <button name="action_set_to_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert"/>
168 <button name="cancel" states="confirm" string="Refuse" type="workflow" icon="gtk-stop"/>
169 <button name="done" states="confirm" string="Accept" type="workflow" icon="gtk-apply"/>
175 <record id="view_hr_timesheet_sheet_filter" model="ir.ui.view">
176 <field name="name">hr_timesheet_sheet.sheet.filter</field>
177 <field name="model">hr_timesheet_sheet.sheet</field>
178 <field name="type">search</field>
179 <field name="arch" type="xml">
180 <search string="Search Timesheet">
181 <group col="10" colspan="4">
182 <filter icon="terp-crm" string="Unvalidated" domain="[('state','<>','done'),('date_to','<',time.strftime('%%Y-%%m-%%d'))]" help="Unvalidated Timesheets"/>
183 <separator orientation="vertical"/>
185 <filter icon="terp-hr" domain="[('state','=','draft')]" help="Draft Timesheets"/>
186 <filter icon="terp-hr" domain="[('state','=','confirm')]" help="Confirmed Timesheets"/>
188 <field name="name" select="1"/>
189 <field name="user_id" select="1" widget="selection">
190 <filter icon="terp-partner" domain="[('user_id','=',uid)]" help="My Timesheet"/>
192 <field name="department_id" widget="selection">
193 <filter icon="terp-crm"
194 domain="[('department_id','=',context.get('department_id',False))]"
195 help="My Departments Timesheet"/>
199 <group expand="1" string="Group By..." colspan="4" col="20">
200 <filter string="Users" icon="terp-project" domain="[]" context="{'group_by':'user_id'}"/>
201 <filter string="Department" icon="terp-project" domain="[]" context="{'group_by':'department_id'}"/>
207 <record id="act_hr_timesheet_sheet_form" model="ir.actions.act_window">
208 <field name="name">Timesheets</field>
209 <field name="type">ir.actions.act_window</field>
210 <field name="res_model">hr_timesheet_sheet.sheet</field>
211 <field name="view_type">form</field>
212 <field name="view_id" eval="False"/>
213 <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
215 <!--Time Tracking menu in project Management-->
216 <menuitem icon="terp-project" id="base.menu_main_pm" name="Project Management" sequence="1"/>
218 id="base.menu_project_management_time_tracking"
220 parent="base.menu_main_pm" sequence="3"/>
221 <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"
222 groups="hr.group_hr_manager" sequence="5"/>
223 <!--<menuitem id="next_id_60" name="Timesheets" parent="hr.menu_hr_root"/>-->
224 <menuitem action="act_hr_timesheet_sheet_form" id="menu_act_hr_timesheet_sheet_form" parent="hr_attendance.menu_hr_time_tracking"
225 groups="hr.group_hr_manager"/>
231 <record id="hr_timesheet_sheet_company" model="ir.ui.view">
232 <field name="name">res.company.sheet</field>
233 <field name="model">res.company</field>
234 <field name="type">form</field>
235 <field name="inherit_id" ref="base.view_company_form"/>
236 <field name="arch" type="xml">
237 <page string="Configuration" position="inside">
238 <separator string="Timesheets" colspan="4"/>
239 <field name="timesheet_range"/>
240 <field name="timesheet_max_difference"/>
247 hr.analytic.timesheet inheritancy
250 <record id="hr_timesheet_line_form" model="ir.ui.view">
251 <field name="name">hr.analytic.timesheet.form</field>
252 <field name="model">hr.analytic.timesheet</field>
253 <field name="type">form</field>
254 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/>
255 <field name="arch" type="xml">
256 <field name="date" position="after">
257 <field name="sheet_id" />
262 hr.attendance inheritancy
265 <record model="ir.ui.view" id="view_hr_attendance_filter">
266 <field name="name">view_hr_attendance_filter</field>
267 <field name="model">hr.attendance</field>
268 <field name="type">search</field>
269 <field name="inherit_id" ref="hr_attendance.view_hr_attendance_filter" />
270 <field name="arch" type="xml">
271 <field name="action_desc" position="after">
272 <field name="sheet_id" select="1" />
277 <record id="view_attendance_form" model="ir.ui.view">
278 <field name="name">hr.attendance.form</field>
279 <field name="model">hr.attendance</field>
280 <field name="type">form</field>
281 <field name="inherit_id" ref="hr_attendance.view_attendance_form"/>
282 <field name="arch" type="xml">
283 <field name="action_desc" position="after">
284 <field name="sheet_id" select="2"/>
288 <record id="view_attendance_tree" model="ir.ui.view">
289 <field name="name">hr.attendance.tree</field>
290 <field name="model">hr.attendance</field>
291 <field name="type">tree</field>
292 <field name="inherit_id" ref="hr_attendance.view_attendance_tree"/>
293 <field name="arch" type="xml">
294 <field name="action_desc" position="after">
295 <field name="sheet_id"/>
299 <record id="view_attendance_tree_who" model="ir.ui.view">
300 <field name="name">hr.attendance.tree</field>
301 <field name="model">hr.attendance</field>
302 <field name="type">tree</field>
303 <field name="inherit_id" ref="hr_attendance.view_attendance_who"/>
304 <field name="arch" type="xml">
305 <field name="action_desc" position="after">
306 <field name="sheet_id"/>
311 <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"/>
312 <!-- <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"/> -->
315 <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"/>
317 <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"/>
319 <record id="hr_timesheet_sheet_tree_simplified" model="ir.ui.view">
320 <field name="name">hr.timesheet.sheet.tree.simplified</field>
321 <field name="model">hr_timesheet_sheet.sheet</field>
322 <field name="type">tree</field>
323 <field eval="20" name="priority"/>
324 <field name="arch" type="xml">
325 <tree string="Timesheets">
326 <field name="date_from"/>
327 <field name="user_id"/>
329 <field name="total_attendance"/>
330 <field name="total_timesheet"/>
331 <field name="state"/>