1 <?xml version="1.0" encoding="utf-8"?>
4 <record id="hr_timesheet_sheet_graph" model="ir.ui.view">
5 <field name="name">hr.timesheet.sheet.graph</field>
6 <field name="model">hr_timesheet_sheet.sheet</field>
7 <field name="type">graph</field>
8 <field name="arch" type="xml">
9 <graph string="Timesheets" type="bar">
11 <field name="total_attendance" operator="+"/>
12 <field name="total_timesheet" operator="+"/>
16 <record id="hr_timesheet_account_form" model="ir.ui.view">
17 <field name="name">hr.timesheet.account.form</field>
18 <field name="model">hr_timesheet_sheet.sheet.account</field>
19 <field name="type">form</field>
20 <field name="arch" type="xml">
21 <form string="Timesheet by Accounts">
22 <field name="sheet_id" select="1"/>
23 <field name="name" select="1" groups="analytic.group_analytic_accounting"/>
24 <field name="total" sum="Total"/>
25 <field name="invoice_rate"/>
30 <record id="hr_timesheet_account_tree" model="ir.ui.view">
31 <field name="name">hr.timesheet.account.tree</field>
32 <field name="model">hr_timesheet_sheet.sheet.account</field>
33 <field name="type">tree</field>
34 <field name="arch" type="xml">
35 <tree string="Timesheet by Accounts">
36 <field name="sheet_id"/>
37 <field name="name" groups="analytic.group_analytic_accounting"/>
38 <field name="total" sum="Total"/>
39 <field name="invoice_rate"/>
44 <record id="hr_timesheet_sheet_form" model="ir.ui.view">
45 <field name="name">hr.timesheet.sheet.form</field>
46 <field name="model">hr_timesheet_sheet.sheet</field>
47 <field name="type">form</field>
48 <field name="arch" type="xml">
49 <form string="Timesheet">
50 <group colspan="4" col="6">
52 <field name="company_id" select="1" groups="base.group_multi_company"/>
53 <field name="department_id" groups="base.group_extended"/>
55 <field name="employee_id"/>
56 <field name="user_id" invisible="1"/>
57 <field name="date_from"/>
58 <field name="date_to"/>
60 <notebook colspan="4">
61 <page string="Daily View">
62 <group col="6" colspan="4">
63 <button name="button_dummy" string="Go to:" type="object" icon="terp-gtk-jump-to-ltr"/>
64 <field name="date_current" nolabel="1"/>
66 <button icon="terp-gtk-go-back-ltr" name="date_previous" string="" type="object"/>
67 <button name="date_today" string="Today" type="object" icon="terp-go-today"/>
68 <button icon="terp-gtk-go-back-rtl" name="date_next" string="" type="object"/>
71 <field colspan="3" context="{'name':date_current,'user_id':user_id}" height="100" name="attendances_ids" nolabel="1">
72 <tree string="Attendances" editable="bottom">
74 <field name="action"/>
75 <field invisible="1" name="employee_id"/>
78 <group col="1" colspan="1">
79 <button name="sign_in" string="Sign In" type="object" icon="terp-gtk-jump-to-ltr"/>
80 <button name="sign_out" string="Sign Out" type="object" icon="terp-gtk-jump-to-rtl"/>
82 <field name="state_attendance"/>
83 <field name="total_attendance_day" widget="float_time"/>
84 <field colspan="4" context="{'date':date_current,'user_id':user_id}" domain="[('name','=',date_current)]" name="timesheet_ids" nolabel="1">
85 <tree editable="top" string="Timesheet">
86 <field invisible="1" name="date"/>
87 <field domain="[('type','=','normal'), ('state', '<>', 'close')]" name="account_id" on_change="on_change_account_id(account_id)"/>
89 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
90 <field name="to_invoice"/>
91 <field invisible="1" name="journal_id"/>
92 <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)"/>
93 <field invisible="1" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
94 <field invisible="1" name="amount"/>
95 <field invisible="1" name="general_account_id"/>
96 <field invisible="1" name="user_id" required="1"/>
98 <form string="Timesheet">
100 <field domain="[('type','=','normal'), ('state', '<>', 'close')]" name="account_id" on_change="on_change_account_id(account_id)"/>
102 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
103 <field name="to_invoice"/>
104 <field name="journal_id"/>
105 <field name="product_id" domain="[('type','=','service')]" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
106 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
107 <field name="amount"/>
108 <field name="general_account_id"/>
109 <field name="user_id" required="1"/>
112 <field name="total_difference_day" widget="float_time"/>
113 <field name="total_timesheet_day" widget="float_time"/>
115 <page string="By Day">
116 <field colspan="4" name="period_ids" nolabel="1">
117 <tree colors="red:total_difference<0.1;blue:total_difference>=0.1" string="Period">
119 <field name="total_attendance" widget="float_time"/>
120 <field name="total_timesheet" widget="float_time"/>
121 <field name="total_difference" widget="float_time"/>
124 <group colspan="4" col="6">
125 <field name="total_attendance" widget="float_time"/>
126 <field name="total_timesheet" widget="float_time"/>
127 <field name="total_difference" widget="float_time"/>
131 <group col="6" colspan="4">
132 <field name="state"/>
133 <button name="button_confirm" states="draft" string="Confirm" type="object" icon="terp-check"/>
134 <button name="action_set_to_draft" states="done" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
135 <button name="cancel" states="confirm" string="Refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_user"/>
136 <button name="done" states="confirm" string="Approve" type="workflow" icon="terp-camera_test" groups="base.group_hr_user"/>
142 <record id="view_hr_timesheet_sheet_filter" model="ir.ui.view">
143 <field name="name">hr_timesheet_sheet.sheet.filter</field>
144 <field name="model">hr_timesheet_sheet.sheet</field>
145 <field name="type">search</field>
146 <field name="arch" type="xml">
147 <search string="Search Timesheet">
148 <group col="10" colspan="4">
149 <filter icon="terp-document-new" string="In Draft" domain="[('state','in',('draft', 'new'))]" help="Unvalidated Timesheets"/>
150 <filter icon="terp-camera_test" string="To Approve" domain="[('state','=','confirm')]" help="Confirmed Timesheets"/>
151 <separator orientation="vertical"/>
152 <field name="employee_id" select="1"/>
153 <field name="date_from"/>
154 <field name="department_id" widget="selection">
155 <filter icon="terp-personal+"
156 domain="[('department_id','=',context.get('department_id',False))]"
157 help="My Departments Timesheet"/>
161 <group expand="0" string="Group By...">
162 <filter string="Employees" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
163 <filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id'}"/>
169 <record id="act_hr_timesheet_sheet_form" model="ir.actions.act_window">
170 <field name="name">Timesheets</field>
171 <field name="type">ir.actions.act_window</field>
172 <field name="res_model">hr_timesheet_sheet.sheet</field>
173 <field name="view_type">form</field>
174 <field name="view_id" eval="False"/>
175 <field name="context">{'search_default_my_timesheet':1, }</field>
176 <field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
177 <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>
180 <menuitem action="act_hr_timesheet_sheet_form" id="menu_act_hr_timesheet_sheet_form" parent="hr_attendance.menu_hr_time_tracking"
181 sequence="2" groups="base.group_hr_user,base.group_hr_manager"/>
187 <record id="hr_timesheet_sheet_company" model="ir.ui.view">
188 <field name="name">res.company.sheet</field>
189 <field name="model">res.company</field>
190 <field name="type">form</field>
191 <field name="inherit_id" ref="base.view_company_form"/>
192 <field name="arch" type="xml">
193 <page string="Configuration" position="inside">
194 <separator string="Timesheets" colspan="4"/>
195 <field name="timesheet_range"/>
196 <field name="timesheet_max_difference"/>
203 hr.analytic.timesheet inheritancy
206 <record id="hr_timesheet_line_form" model="ir.ui.view">
207 <field name="name">hr.analytic.timesheet.form</field>
208 <field name="model">hr.analytic.timesheet</field>
209 <field name="type">form</field>
210 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/>
211 <field name="arch" type="xml">
212 <field name="date" position="after">
213 <field name="sheet_id" />
218 hr.attendance inheritancy
221 <record model="ir.ui.view" id="view_hr_attendance_filter">
222 <field name="name">view_hr_attendance_filter</field>
223 <field name="model">hr.attendance</field>
224 <field name="type">search</field>
225 <field name="inherit_id" ref="hr_attendance.view_hr_attendance_filter" />
226 <field name="arch" type="xml">
227 <field name="action" position="after">
228 <field name="sheet_id" select="1" />
233 <record id="view_attendance_form" model="ir.ui.view">
234 <field name="name">hr.attendance.form</field>
235 <field name="model">hr.attendance</field>
236 <field name="type">form</field>
237 <field name="inherit_id" ref="hr_attendance.view_attendance_form"/>
238 <field name="arch" type="xml">
239 <field name="action_desc" position="after">
240 <field name="sheet_id"/>
244 <record id="view_attendance_tree" model="ir.ui.view">
245 <field name="name">hr.attendance.tree</field>
246 <field name="model">hr.attendance</field>
247 <field name="type">tree</field>
248 <field name="inherit_id" ref="hr_attendance.view_attendance_tree"/>
249 <field name="arch" type="xml">
250 <field name="action" position="after">
251 <field name="sheet_id"/>
255 <record id="view_attendance_tree_who" model="ir.ui.view">
256 <field name="name">hr.attendance.tree</field>
257 <field name="model">hr.attendance</field>
258 <field name="type">tree</field>
259 <field name="inherit_id" ref="hr_attendance.view_attendance_who"/>
260 <field name="arch" type="xml">
261 <field name="action" position="after">
262 <field name="sheet_id"/>
268 context="{'search_default_sheet_id': [active_id]}"
269 id="act_hr_timesheet_sheet_sheet_by_day"
270 name="Timesheet by Account"
271 res_model="hr_timesheet_sheet.sheet.account"
272 src_model="hr_timesheet_sheet.sheet"/>
275 context="{'search_default_sheet_id': [active_id]}"
276 id="act_hr_timesheet_sheet_sheet_2_hr_analytic_timesheet"
277 name="Timesheet Lines"
278 res_model="hr.analytic.timesheet"
279 src_model="hr_timesheet_sheet.sheet"/>
283 context="{'search_default_sheet_id': [active_id]}"
284 id="act_hr_timesheet_sheet_sheet_2_hr_attendance"
286 res_model="hr.attendance"
287 src_model="hr_timesheet_sheet.sheet"/>
289 <record id="hr_timesheet_sheet_tree_simplified" model="ir.ui.view">
290 <field name="name">hr.timesheet.sheet.tree</field>
291 <field name="model">hr_timesheet_sheet.sheet</field>
292 <field name="type">tree</field>
293 <field eval="10" name="priority"/>
294 <field name="arch" type="xml">
295 <tree colors="blue:state in ('draft');black:state in ('confirm','new');gray:state in('done')" string="Timesheets">
296 <field name="employee_id"/>
297 <field name="date_from"/>
298 <field name="date_to"/>
299 <field name="department_id"/>
300 <field name="total_attendance"/>
301 <field name="total_timesheet"/>
302 <field name="total_difference"/>
303 <field name="state"/>
307 <record id="view_hr_timesheet_sheet_graph" model="ir.ui.view">
308 <field name="name">hr.timesheet.sheet.sheet.graph</field>
309 <field name="model">hr_timesheet_sheet.sheet</field>
310 <field name="type">graph</field>
311 <field name="arch" type="xml">
312 <graph orientation="horizontal" string="Available Attendance" type="bar">
314 <field name="total_attendance" operator="+"/>
318 <!-- Timesheet Button on Employee Form -->
320 context="{'search_default_employee_id': [active_id]}"
321 id="act_hr_employee_2_hr_timesheet" name="Timesheets" res_model="hr_timesheet_sheet.sheet" src_model="hr.employee"/>