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_timesheet"/>
16 <field name="total_difference"/>
23 <record model="ir.ui.view" id="hr_timesheet_account_tree">
24 <field name="name">hr.timesheet.account.tree</field>
25 <field name="model">hr_timesheet_sheet.sheet.account</field>
26 <field name="type">tree</field>
27 <field name="arch" type="xml">
28 <tree string="Timesheet by accounts">
29 <field name="sheet_id"/>
38 <record model="ir.ui.view" id="hr_timesheet_sheet_form">
39 <field name="name">hr.timesheet.sheet.form</field>
40 <field name="model">hr_timesheet_sheet.sheet</field>
41 <field name="type">form</field>
42 <field name="arch" type="xml">
43 <form string="Timesheet Sheet">
45 <field name="user_id"/>
46 <field name="date_from" />
47 <field name="date_to" />
49 <notebook colspan="4">
50 <page string="Daily view">
51 <group col="4" colspan="2">
52 <field name="date_current" nolabel="1"/>
53 <button icon="STOCK_MEDIA_PREVIOUS" string="" name="date_previous" type="object"/>
54 <button icon="STOCK_JUMP_TO" string="" name="date_today" type="object"/>
55 <button icon="STOCK_MEDIA_NEXT" string="" name="date_next" type="object"/>
57 <button string="Sign In" name="sign_in" type="object"/>
58 <button string="Sign Out" name="sign_out" type="object"/>
59 <field name="attendances_ids" colspan="4" nolabel="1" context="name=date_current" height="100">
60 <tree string="Attendances">
61 <field name="employee_id"/>
63 <field name="action"/>
66 <field name="state_attendance"/>
67 <field name="total_attendance_day" widget="float_time"/>
68 <field name="timesheet_ids" colspan="4" nolabel="1" domain="[('name','=',date_current)]" context="date=date_current">
69 <tree string="Timesheet" editable="top">
70 <field name="user_id" required="1"/>
72 <field name="account_id" on_change="on_change_account_id(account_id)" domain="[('type','=','normal')]"/>
74 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" widget="float_time"/>
75 <field name="product_id" invisible="True"/>
76 <field name="product_uom_id" invisible="True" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" />
77 <field name="amount" invisible="True"/>
78 <field name="general_account_id" invisible="True"/>
79 <field name="to_invoice"/>
82 <field name="total_difference_day" widget="float_time"/>
83 <field name="total_timesheet_day" widget="float_time"/>
85 <group col="4" colspan="2">
86 <button string="Confirm" name="button_confirm" states="draft" type="object"/>
87 <button string="Cancel" name="cancel" states="done"/>
88 <button string="Refuse" name="cancel" states="confirm"/>
89 <button string="Accept" name="done" states="confirm"/>
91 </page><page string="By day">
92 <field name="period_ids" colspan="4" nolabel="1">
93 <tree string="Period" colors="red:total_difference<=0.1;blue:total_difference>=0.1">
95 <field name="total_attendance" widget="float_time"/>
96 <field name="total_timesheet" widget="float_time"/>
97 <field name="total_difference" widget="float_time"/>
100 <field name="total_attendance" widget="float_time"/>
101 <field name="total_timesheet" widget="float_time"/>
102 <field name="total_difference" widget="float_time"/>
103 </page><page string="By account">
104 <field name="account_ids" colspan="4" nolabel="1">
105 <tree string="Analytic accounts">
107 <field name="total" widget="float_time"/>
116 <record model="ir.actions.act_window" id="act_hr_timesheet_sheet_form">
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="view_type">form</field>
121 <field name="view_id" ref="hr_timesheet_sheet_form" />
123 <menuitem name="Human Resources/Timesheets/All timesheets"
124 id="menu_act_hr_timesheet_sheet_form"
125 action="act_hr_timesheet_sheet_form" />
127 <record model="ir.actions.act_window" id="act_hr_timesheet_sheet_form_my">
128 <field name="name">hr.timesheet.sheet.form</field>
129 <field name="type">ir.actions.act_window</field>
130 <field name="res_model">hr_timesheet_sheet.sheet</field>
131 <field name="domain">[('user_id','=',uid)]</field>
132 <field name="view_type">form</field>
133 <field name="view_mode">tree,form</field>
135 <menuitem name="Human Resources/Timesheets/My timesheets"
136 id="menu_act_hr_timesheet_sheet_form_my"
137 action="act_hr_timesheet_sheet_form_my" />
139 <record model="ir.actions.act_window" id="act_hr_timesheet_sheet_form_my_confirm">
140 <field name="name">hr.timesheet.sheet.form</field>
141 <field name="type">ir.actions.act_window</field>
142 <field name="res_model">hr_timesheet_sheet.sheet</field>
143 <field name="domain">[('user_id','=',uid),('state','=','draft'),('date_to','<=',time.strftime('%Y-%m-%d'))]</field>
144 <field name="view_type">form</field>
145 <field name="view_mode">tree,form</field>
147 <menuitem name="Human Resources/Timesheets/My timesheets/My timesheets to confirm"
148 id="menu_act_hr_timesheet_sheet_form_my_confirm"
149 action="act_hr_timesheet_sheet_form_my_confirm" />
151 <wizard string="My current timesheet"
153 name="hr_timesheet_sheet.current.open"
154 id="act_hr_timesheet_sheet_form_my_current"/>
155 <menuitem name="Human Resources/Timesheets/My timesheets/My current timesheet"
156 id="menu_act_hr_timesheet_sheet_form_my_current"
157 action="act_hr_timesheet_sheet_form_my_current"
160 <record model="ir.actions.act_window" id="act_hr_timesheet_sheet_form_all_confirm">
161 <field name="name">hr.timesheet.sheet.form</field>
162 <field name="type">ir.actions.act_window</field>
163 <field name="res_model">hr_timesheet_sheet.sheet</field>
164 <field name="domain">[('state','=','draft'),('date_to','<=',time.strftime('%Y-%m-%d'))]</field>
165 <field name="view_type">form</field>
166 <field name="view_mode">tree,form</field>
168 <menuitem name="Human Resources/Timesheets/All timesheets/Timesheets to confirm"
169 id="menu_act_hr_timesheet_sheet_form_all_confirm"
170 action="act_hr_timesheet_sheet_form_all_confirm" />
172 <record model="ir.actions.act_window" id="act_hr_timesheet_sheet_form_all_valid">
173 <field name="name">hr.timesheet.sheet.form</field>
174 <field name="type">ir.actions.act_window</field>
175 <field name="res_model">hr_timesheet_sheet.sheet</field>
176 <field name="domain">[('state','=','confirm')]</field>
177 <field name="view_type">form</field>
178 <field name="view_mode">tree,form</field>
180 <menuitem name="Human Resources/Timesheets/All timesheets/Timesheets to validate"
181 id="menu_act_hr_timesheet_sheet_form_all_valid"
182 action="act_hr_timesheet_sheet_form_all_valid" />
188 <record model="ir.ui.view" id="hr_timesheet_sheet_company">
189 <field name="name">res.company.sheet</field>
190 <field name="model">res.company</field>
191 <field name="type">form</field>
192 <field name="inherit_id" ref="base.view_company_form"/>
193 <field name="arch" type="xml">
194 <field name="rml_footer2" position="after">
196 <field name="timesheet_range"/>
197 <field name="timesheet_max_difference"/>
204 hr.analytic.timesheet inheritancy
207 <record model="ir.ui.view" id="hr_timesheet_line_tree">
208 <field name="name">hr.analytic.timesheet.tree</field>
209 <field name="model">hr.analytic.timesheet</field>
210 <field name="type">tree</field>
211 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree"/>
212 <field name="arch" type="xml">
213 <field name="date" position="after">
214 <field name="sheet_id"/>
218 <record model="ir.ui.view" id="hr_timesheet_line_form">
219 <field name="name">hr.analytic.timesheet.form</field>
220 <field name="model">hr.analytic.timesheet</field>
221 <field name="type">form</field>
222 <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_form"/>
223 <field name="arch" type="xml">
224 <field name="date" position="after">
225 <field name="sheet_id"/>
231 hr.attendance inheritancy
234 <record model="ir.ui.view" id="view_attendance_form">
235 <field name="name">hr.attendance.form</field>
236 <field name="model">hr.attendance</field>
237 <field name="type">form</field>
238 <field name="inherit_id" ref="hr.view_attendance_form"/>
239 <field name="arch" type="xml">
240 <field name="action_desc" position="after">
241 <field name="sheet_id"/>
245 <record model="ir.ui.view" id="view_attendance_tree">
246 <field name="name">hr.attendance.tree</field>
247 <field name="model">hr.attendance</field>
248 <field name="type">tree</field>
249 <field name="inherit_id" ref="hr.view_attendance_tree"/>
250 <field name="arch" type="xml">
251 <field name="action_desc" position="after">
252 <field name="sheet_id"/>