4
<record model="ir.ui.view" id="hr_timesheet_sheet_tree">
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="Timesheet Sheet">
10
<field name="user_id"/>
11
<field name="date_from" />
12
<field name="date_to" />
14
<field name="total_attendance"/>
15
<field name="total_difference"/>
22
<record model="ir.ui.view" id="hr_timesheet_sheet_form">
23
<field name="name">hr.timesheet.sheet.form</field>
24
<field name="model">hr_timesheet_sheet.sheet</field>
25
<field name="type">form</field>
26
<field name="arch" type="xml">
27
<form string="Timesheet Sheet">
29
<field name="user_id"/>
30
<field name="date_from" />
31
<field name="date_to" />
33
<notebook colspan="4">
34
<page string="Daily view">
35
<group col="4" colspan="2">
36
<field name="date_current" nolabel="1"/>
37
<button string="<<" name="date_previous" type="object"/>
38
<button string="GO" name="reload"/>
39
<button string=">>" name="date_next" type="object"/>
41
<button string="Sign In" name="sign_in" type="object"/>
42
<button string="Sign Out" name="sign_out" type="object"/>
43
<field name="attendances_ids" colspan="4" nolabel="1">
44
<tree string="Attendances" editable="bottom">
45
<field name="employee_id"/>
47
<field name="action"/>
50
<label string=" " colspan="2"/>
51
<field name="total_attendance_day"/>
52
<field name="timesheet_ids" colspan="4" nolabel="1" domain="[('name','=',date_current)]">
53
<tree string="Timesheet" editable="top">
54
<field name="user_id" required="1"/>
56
<field name="account_id" on_change="on_change_account_id(account_id)" domain="[('type','=','normal')]"/>
58
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" />
59
<field name="product_id" invisible="True"/>
60
<field name="product_uom_id" invisible="True" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" />
61
<field name="amount" invisible="True"/>
62
<field name="general_account_id" invisible="True"/>
63
<field name="to_invoice"/>
66
<field name="total_difference_day"/>
67
<field name="total_timesheet_day"/>
69
<group col="4" colspan="2">
70
<button string="Confirm" name="confirm" states="draft"/>
71
<button string="Cancel" name="cancel" states="draft"/>
72
<button string="Refuse" name="cancel" states="confirm"/>
73
<button string="Accept" name="done" states="confirm"/>
75
</page><page string="Global view">
76
<field name="period_ids" colspan="4" nolabel="1">
77
<tree string="Period" colors="red:total_difference<=0.1;blue:total_difference>=0.1">
79
<field name="total_attendance"/>
80
<field name="total_timesheet"/>
81
<field name="total_difference"/>
84
<field name="total_attendance"/>
85
<field name="total_timesheet"/>
86
<field name="total_difference"/>
93
<record model="ir.actions.act_window" id="act_hr_timesheet_sheet_form">
94
<field name="name">hr.timesheet.sheet.form</field>
95
<field name="type">ir.actions.act_window</field>
96
<field name="res_model">hr_timesheet_sheet.sheet</field>
97
<field name="view_type">form</field>
98
<field name="view_id" ref="hr_timesheet_sheet_form" />
100
<menuitem name="Human Resources/Timesheets/All timesheets"
101
id="menu_act_hr_timesheet_sheet_form"
102
action="act_hr_timesheet_sheet_form" />
104
<record model="ir.actions.act_window" id="act_hr_timesheet_sheet_form_my">
105
<field name="name">hr.timesheet.sheet.form</field>
106
<field name="type">ir.actions.act_window</field>
107
<field name="res_model">hr_timesheet_sheet.sheet</field>
108
<field name="domain">[('user_id','=',uid)]</field>
109
<field name="view_type">form</field>
110
<field name="view_mode">tree,form</field>
112
<menuitem name="Human Resources/Timesheets/My timesheets"
113
id="menu_act_hr_timesheet_sheet_form_my"
114
action="act_hr_timesheet_sheet_form_my" />
116
<record model="ir.actions.act_window" id="act_hr_timesheet_sheet_form_my_confirm">
117
<field name="name">hr.timesheet.sheet.form</field>
118
<field name="type">ir.actions.act_window</field>
119
<field name="res_model">hr_timesheet_sheet.sheet</field>
120
<field name="domain">[('user_id','=',uid),('state','=','draft'),('date_to','<=',time.strftime('%Y-%m-%d'))]</field>
121
<field name="view_type">form</field>
122
<field name="view_mode">tree,form</field>
124
<menuitem name="Human Resources/Timesheets/My timesheets/My timesheets to confirm"
125
id="menu_act_hr_timesheet_sheet_form_my_confirm"
126
action="act_hr_timesheet_sheet_form_my_confirm" />
128
<wizard string="My current timesheet"
130
name="hr_timesheet_sheet.current.open"
131
id="act_hr_timesheet_sheet_form_my_current"/>
132
<menuitem name="Human Resources/Timesheets/My timesheets/My current timesheet"
133
id="menu_act_hr_timesheet_sheet_form_my_current"
134
action="act_hr_timesheet_sheet_form_my_current"
137
<record model="ir.actions.act_window" id="act_hr_timesheet_sheet_form_all_confirm">
138
<field name="name">hr.timesheet.sheet.form</field>
139
<field name="type">ir.actions.act_window</field>
140
<field name="res_model">hr_timesheet_sheet.sheet</field>
141
<field name="domain">[('state','=','draft'),('date_to','<=',time.strftime('%Y-%m-%d'))]</field>
142
<field name="view_type">form</field>
143
<field name="view_mode">tree,form</field>
145
<menuitem name="Human Resources/Timesheets/All timesheets/Timesheets to confirm"
146
id="menu_act_hr_timesheet_sheet_form_all_confirm"
147
action="act_hr_timesheet_sheet_form_all_confirm" />
149
<record model="ir.actions.act_window" id="act_hr_timesheet_sheet_form_all_valid">
150
<field name="name">hr.timesheet.sheet.form</field>
151
<field name="type">ir.actions.act_window</field>
152
<field name="res_model">hr_timesheet_sheet.sheet</field>
153
<field name="domain">[('state','=','confirm')]</field>
154
<field name="view_type">form</field>
155
<field name="view_mode">tree,form</field>
157
<menuitem name="Human Resources/Timesheets/All timesheets/Timesheets to validate"
158
id="menu_act_hr_timesheet_sheet_form_all_valid"
159
action="act_hr_timesheet_sheet_form_all_valid" />