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"/>
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 <group colspan="4" col="6">
160 <field name="total_attendance" widget="float_time"/>
161 <field name="total_timesheet" widget="float_time"/>
162 <field name="total_difference" widget="float_time"/>
166 <field name="state"/>
167 <group col="4" colspan="2">
168 <button name="button_confirm" states="draft" string="Confirm" type="object" icon="gtk-execute"/>
169 <button name="action_set_to_draft" states="done" string="Set to Draft" type="object" icon="gtk-convert"/>
170 <button name="cancel" states="confirm" string="Refuse" type="workflow" icon="gtk-stop"/>
171 <button name="done" states="confirm" string="Accept" type="workflow" icon="gtk-apply"/>
177 <record id="view_hr_timesheet_sheet_filter" model="ir.ui.view">
178 <field name="name">hr_timesheet_sheet.sheet.filter</field>
179 <field name="model">hr_timesheet_sheet.sheet</field>
180 <field name="type">search</field>
181 <field name="arch" type="xml">
182 <search string="Search Timesheet">
183 <group col="10" colspan="4">
184 <filter icon="terp-partner" domain="[('user_id','=',uid)]" help="My" />
185 <separator orientation="vertical"/>
186 <filter icon="terp-crm" string="In Progress" domain="[('state','in',('draft', 'new'))]" help="Unvalidated Timesheets"/>
187 <filter icon="terp-crm" string="To Validate" domain="[('state','=','confirmed')]" help="Confirmed Timesheets"/>
188 <separator orientation="vertical"/>
189 <field name="user_id" select="1" widget="selection"/>
190 <field name="date_from"/>
191 <field name="department_id" widget="selection">
192 <filter icon="terp-crm"
193 domain="[('department_id','=',context.get('department_id',False))]"
194 help="My Departments Timesheet"/>
198 <group expand="1" string="Group By..." colspan="4" col="20">
199 <filter string="Users" icon="terp-project" domain="[]" context="{'group_by':'user_id'}"/>
200 <filter string="Department" icon="terp-project" domain="[]" context="{'group_by':'department_id'}"/>
206 <record id="act_hr_timesheet_sheet_form" model="ir.actions.act_window">
207 <field name="name">Timesheets</field>
208 <field name="type">ir.actions.act_window</field>
209 <field name="res_model">hr_timesheet_sheet.sheet</field>
210 <field name="view_type">form</field>
211 <field name="view_id" eval="False"/>
212 <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
214 <!--Time Tracking menu in project Management-->
215 <menuitem icon="terp-project" id="base.menu_main_pm" name="Project Management" sequence="1"/>
217 id="base.menu_project_management_time_tracking"
219 parent="base.menu_main_pm" sequence="3"/>
220 <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"
221 groups="hr.group_hr_manager" sequence="5"/>
222 <!--<menuitem id="next_id_60" name="Timesheets" parent="hr.menu_hr_root"/>-->
223 <menuitem action="act_hr_timesheet_sheet_form" id="menu_act_hr_timesheet_sheet_form" parent="hr_attendance.menu_hr_time_tracking"
224 groups="hr.group_hr_manager"/>
230 <record id="hr_timesheet_sheet_company" model="ir.ui.view">
231 <field name="name">res.company.sheet</field>
232 <field name="model">res.company</field>
233 <field name="type">form</field>
234 <field name="inherit_id" ref="base.view_company_form"/>
235 <field name="arch" type="xml">
236 <page string="Configuration" position="inside">
237 <separator string="Timesheets" colspan="4"/>
238 <field name="timesheet_range"/>
239 <field name="timesheet_max_difference"/>
246 hr.analytic.timesheet inheritancy
249 <record id="hr_timesheet_line_form" model="ir.ui.view">
250 <field name="name">hr.analytic.timesheet.form</field>
251 <field name="model">hr.analytic.timesheet</field>
252 <field name="type">form</field>
253 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/>
254 <field name="arch" type="xml">
255 <field name="date" position="after">
256 <field name="sheet_id" />
261 hr.attendance inheritancy
264 <record model="ir.ui.view" id="view_hr_attendance_filter">
265 <field name="name">view_hr_attendance_filter</field>
266 <field name="model">hr.attendance</field>
267 <field name="type">search</field>
268 <field name="inherit_id" ref="hr_attendance.view_hr_attendance_filter" />
269 <field name="arch" type="xml">
270 <field name="action" position="after">
271 <field name="sheet_id" select="1" />
276 <record id="view_attendance_form" model="ir.ui.view">
277 <field name="name">hr.attendance.form</field>
278 <field name="model">hr.attendance</field>
279 <field name="type">form</field>
280 <field name="inherit_id" ref="hr_attendance.view_attendance_form"/>
281 <field name="arch" type="xml">
282 <field name="action_desc" position="after">
283 <field name="sheet_id" select="2"/>
287 <record id="view_attendance_tree" model="ir.ui.view">
288 <field name="name">hr.attendance.tree</field>
289 <field name="model">hr.attendance</field>
290 <field name="type">tree</field>
291 <field name="inherit_id" ref="hr_attendance.view_attendance_tree"/>
292 <field name="arch" type="xml">
293 <field name="action" position="after">
294 <field name="sheet_id"/>
298 <record id="view_attendance_tree_who" model="ir.ui.view">
299 <field name="name">hr.attendance.tree</field>
300 <field name="model">hr.attendance</field>
301 <field name="type">tree</field>
302 <field name="inherit_id" ref="hr_attendance.view_attendance_who"/>
303 <field name="arch" type="xml">
304 <field name="action" position="after">
305 <field name="sheet_id"/>
310 <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"/>
311 <!-- <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"/> -->
314 <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"/>
316 <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"/>
318 <record id="hr_timesheet_sheet_tree_simplified" model="ir.ui.view">
319 <field name="name">hr.timesheet.sheet.tree.simplified</field>
320 <field name="model">hr_timesheet_sheet.sheet</field>
321 <field name="type">tree</field>
322 <field eval="20" name="priority"/>
323 <field name="arch" type="xml">
324 <tree string="Timesheets">
325 <field name="date_from"/>
326 <field name="user_id"/>
328 <field name="total_attendance"/>
329 <field name="total_timesheet"/>
330 <field name="state"/>