5 <record id="view_evaluation_report_graph" model="ir.ui.view">
6 <field name="name">hr.holidays.graph</field>
7 <field name="model">hr.holidays</field>
8 <field name="arch" type="xml">
9 <graph string="Appraisal Analysis" type="pivot" stacked="True">
10 <field name="employee_id" type="row"/>
11 <field name="holiday_status_id" type="row"/>
12 <field name="date_from" type="col"/>
13 <field name="number_of_days" type="measure"/>
18 <record id="view_hr_holidays_filter" model="ir.ui.view">
19 <field name="name">hr.holidays.filter</field>
20 <field name="model">hr.holidays</field>
21 <field name="arch" type="xml">
22 <search string="Search Leave">
24 <filter domain="[('state','=','draft')]" string="To Confirm"/>
25 <filter domain="[('state','in',('confirm','validate1'))]" string="To Approve" name="approve"/>
26 <filter domain="[('state','=','validate')]" string="Validated" name="validated"/>
28 <filter string="New Mail" name="message_unread" domain="[('message_unread','=',True)]"/>
30 <filter string="Approved Leaves" name="validated" domain="[('state','=','validate')]"/>
32 <filter string="To Report in Payslip" name="gray" domain="[('payslip_status', '=', False)]" groups="base.group_hr_manager"/>
34 <filter name="year" string="Year" domain="[('holiday_status_id.active','=',True)]" help="Filters only on allocations and requests that belong to an holiday type that is 'active' (active field is True)"/>
36 <filter string="My Requests" name="my_leaves" domain="[('employee_id.user_id','=', uid)]" help="My Leave Requests"/>
38 <filter string="My Department Leaves" help="My Department Leaves" domain="[('department_id.manager_id','=',uid)]"/>
39 <field name="employee_id"/>
40 <field name="department_id"/>
41 <field name="holiday_status_id"/>
42 <group expand="0" string="Group By">
43 <filter name="group_name" string="Description" context="{'group_by':'name'}"/>
44 <filter name="group_employee" string="Employee" context="{'group_by':'employee_id'}"/>
45 <filter name="group_category" string="Category" context="{'group_by':'category_id'}"/>
46 <filter string="Manager" context="{'group_by':'manager_id'}"/>
47 <filter name="group_type" string="Type" context="{'group_by':'holiday_status_id'}"/>
49 <filter name="group_date_from" string="Start Month" context="{'group_by':'date_from:month'}"/>
55 <!-- Holidays: Leave Request -->
57 <record id="view_holiday_new_calendar" model="ir.ui.view">
58 <field name="name">Leave Request</field>
59 <field name="model">hr.holidays</field>
60 <field name="arch" type="xml">
61 <calendar string="Leave Request" color="employee_id"
62 date_start="date_from" date_stop="date_to"
63 quick_add="False" avatar_model="hr.employee">
64 <field name="employee_id"/>
65 <field name="holiday_status_id"/>
70 <!-- Holidays: Allocation Request -->
71 <record model="ir.ui.view" id="edit_holiday_new">
72 <field name="name">Leave Request</field>
73 <field name="model">hr.holidays</field>
74 <field name="arch" type="xml">
75 <form string="Leave Request">
76 <field name="can_reset" invisible="1"/>
77 <field name="type" invisible="1"/>
79 <button string="Confirm" name="confirm" states="draft" type="workflow" class="oe_highlight"/>
80 <button string="Approve" name="validate" states="confirm" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
81 <button string="Validate" name="second_validate" states="validate1" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
82 <button string="Refuse" name="refuse" states="confirm,validate,validate1" type="workflow" groups="base.group_hr_user"/>
83 <button string="Reset to Draft" name="reset" type="workflow"
84 attrs="{'invisible': ['|', ('can_reset', '=', False), ('state', 'not in', ['confirm', 'refuse'])]}"/>
85 <field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}'/>
90 <field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')], 'required': [('type', '=', 'add')]}"/>
91 <field name="holiday_status_id" context="{'employee_id':employee_id}"/>
92 <label for="number_of_days_temp" string="Duration"/>
94 <group col="3" attrs="{'invisible': [('type', '=', 'add')]}">
95 <field name="date_from" nolabel="1" on_change="onchange_date_from(date_to, date_from)" attrs="{'required':[('type', '=', 'remove')]}" class="oe_inline"/><label string="-" class="oe_inline"/>
96 <field name="date_to" nolabel="1" on_change="onchange_date_to(date_to, date_from)" attrs="{'required':[('type', '=', 'remove')]}" class="oe_inline"/>
99 <field name="number_of_days_temp" class="oe_inline"/> days
104 <field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('type', '=', 'remove'),('state','!=','draft')]}" string="Mode" groups="base.group_hr_user" context="{'employee_id':employee_id}" />
105 <field name="employee_id" attrs="{'required':[('holiday_type','=','employee')],'invisible':[('holiday_type','=','category')]}" on_change="onchange_employee(employee_id)" groups="base.group_hr_user"/>
106 <field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly': [('type', '=', 'remove'),('state','!=','draft'), ('state','!=','confirm')], 'invisible':[('holiday_type','=','employee')]}"/>
107 <field name="department_id" attrs="{'readonly':['|', ('type','=','add'),('holiday_type','=','category')],'invisible':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
108 <field name="payslip_status" groups="base.group_hr_manager" attrs="{'invisible':[('type','=','add')]}"/>
110 <field name="notes" nolabel="1" colspan="4" placeholder="Add a reason..." attrs="{'invisible': [('type', '=', 'remove')]}"/>
111 <div groups="base.group_hr_manager" attrs="{'invisible':[('type','=','add')]}">
112 <separator string="Comment by Manager"/>
113 <field name="report_note" placeholder="e.g. Report to the next month..."/>
117 <div class="oe_chatter">
118 <field name="message_follower_ids" widget="mail_followers"/>
119 <field name="message_ids" widget="mail_thread"/>
125 <record model="ir.ui.view" id="view_holiday_allocation_tree">
126 <field name="name">hr.holidays.allocation.tree</field>
127 <field name="model">hr.holidays</field>
128 <field name="arch" type="xml">
129 <tree colors="red:state == 'refuse';blue:state == 'draft';black:state in ('confirm','validate','validate1')" string="Allocation Requests"
130 fonts="bold: message_unread == True">
131 <field name="employee_id"/>
132 <field name="holiday_type"/>
133 <field name="category_id"/>
134 <field name="department_id" invisible="1"/>
135 <field name="holiday_status_id"/>
137 <field name="number_of_days" string="Allocated Days" sum="Remaining Days"/>
138 <field name="manager_id" invisible="1"/>
139 <field name="user_id" invisible="1"/>
140 <field name="date_from" invisible="1"/>
141 <field name="message_unread" invisible="1"/>
142 <field name="state"/>
146 <record model="ir.ui.view" id="view_holiday_allocation_tree_customize">
147 <field name="name">hr.holidays.allocation.tree.customize</field>
148 <field name="model">hr.holidays</field>
149 <field name="arch" type="xml">
150 <tree string="Allocation Requests" editable="top">
151 <field name="employee_id"/>
152 <field name="holiday_type"/>
153 <field name="holiday_status_id"/>
154 <field name="name" readonly="1"/>
155 <field name="date_from" required="1" on_change="onchange_date_from(date_to, date_from)"/>
156 <field name="date_to" required="1" on_change="onchange_date_to(date_to, date_from)"/>
157 <field name="number_of_days_temp" string="Allocated Days" sum="Remaining Days"/>
158 <field name="state"/>
159 <field name="report_note" groups="base.group_hr_manager"/>
160 <field name="payslip_status" invisible="1"/>
161 <button string="To Report in Payslip" name="set_payslip_status"
162 type="object" class="oe_link oe_right" icon="gtk-normal"
163 attrs="{'invisible': [('payslip_status', '=', True)]}" groups="base.group_hr_manager"/>
164 <button string="Reported in last payslips" name="unset_payslip_status"
165 type="object" class="oe_link oe_right" icon="gtk-yes"
166 attrs="{'invisible': [('payslip_status', '=', False)]}" groups="base.group_hr_manager"/>
171 <record model="ir.ui.view" id="view_holiday_simple">
172 <field name="name">hr.holidays.report_tree</field>
173 <field name="model">hr.holidays</field>
174 <field name="priority">20</field>
175 <field name="arch" type="xml">
176 <tree colors="red:state == 'refuse';blue:state == 'draft';black:state in ('confirm','validate','validate1')" string="Leaves Summary">
177 <field name="employee_id"/>
178 <field name="category_id" invisible="1"/>
179 <field name="department_id" invisible="1"/>
182 <field name="number_of_days" string="Number of Days" sum="Remaining Days"/>
183 <field name="date_from"/>
184 <field name="date_to"/>
185 <field name="holiday_status_id"/>
186 <field name="manager_id" invisible="1"/>
187 <field name="user_id" invisible="1"/>
188 <field name="state"/>
193 <record model="ir.ui.view" id="view_holiday_employee">
194 <field name="name">hr.holidays.report_employee_tree</field>
195 <field name="model">hr.holidays</field>
196 <field name="priority">21</field>
197 <field name="arch" type="xml">
198 <tree colors="red:state == 'refuse';blue:state == 'draft';black:state in ('confirm','validate','validate1')" string="Employee's Leave">
199 <field name="employee_id"/>
202 <field name="number_of_days" string="Number of Days" sum="Remaining Days"/>
203 <field name="date_from"/>
204 <field name="date_to"/>
205 <field name="holiday_status_id"/>
206 <field name="state"/>
207 <field name="report_note"/>
208 <field name="payslip_status" invisible="1"/>
209 <button string="To Report in Payslip" name="set_payslip_status"
210 type="object" class="oe_link oe_right"
211 attrs="{'invisible': [('payslip_status', '=', True)]}" groups="base.group_hr_manager"/>
212 <button string="Reported in last payslips" name="unset_payslip_status"
213 type="object" class="oe_link oe_right"
214 attrs="{'invisible': [('payslip_status', '=', False)]}" groups="base.group_hr_manager"/>
219 <record model="ir.ui.view" id="view_holiday">
220 <field name="name">hr.holidays.tree</field>
221 <field name="model">hr.holidays</field>
222 <field name="arch" type="xml">
223 <tree colors="red:state == 'refuse';blue:state == ' draft';black:state in ('confirm','validate','validate1')" string="Leave Requests"
224 fonts="bold: message_unread == True">
225 <field name="employee_id"/>
226 <field name="holiday_type" string="Mode" groups="base.group_no_one"/>
227 <field name="holiday_status_id"/>
229 <field name="date_from"/>
230 <field name="date_to"/>
231 <field name="number_of_days" string="Number of Days" sum="Remaining Days"/>
232 <field name="state"/>
233 <field name="payslip_status" invisible="1"/>
234 <button string="To Report in Payslip" name="set_payslip_status"
235 type="object" class="oe_link oe_right"
236 attrs="{'invisible': [('payslip_status', '=', True)]}" groups="base.group_hr_manager"/>
237 <button string="Reported in last payslips" name="unset_payslip_status"
238 type="object" class="oe_link oe_right"
239 attrs="{'invisible': [('payslip_status', '=', False)]}" groups="base.group_hr_manager"/>
240 <field name="category_id" invisible="1"/>
241 <field name="department_id" invisible="not context.get('set_visible',False)"/>
242 <field name="manager_id" invisible="1"/>
243 <field name="user_id" invisible="1"/>
244 <field name="message_unread" invisible="1"/>
249 <menuitem name="Leaves" parent="hr.menu_hr_root" id="menu_open_ask_holidays" sequence="20"/>
251 <record model="ir.actions.act_window" id="open_ask_holidays">
252 <field name="name">Leave Request</field>
253 <field name="res_model">hr.holidays</field>
254 <field name="view_type">form</field>
255 <field name="view_id" ref="edit_holiday_new"/>
256 <field name="context">{
257 'default_type': 'remove',
258 'search_default_my_leaves':1,
259 'needaction_menu_ref':
261 'hr_holidays.menu_open_company_allocation',
264 <field name="domain">[('type','=','remove'), ('employee_id.user_id','=', uid)]</field>
265 <field name="search_view_id" ref="view_hr_holidays_filter"/>
266 <field name="help" type="html">
267 <p class="oe_view_nocontent_create">
268 Click to create a new leave request.
270 Once you have recorded your leave request, it will be sent
271 to a manager for validation. Be sure to set the right leave
272 type (recuperation, legal holidays, sickness) and the exact
273 number of open days related to your leave.
278 <record model="ir.actions.act_window.view" id="action_open_ask_holidays_tree">
279 <field name="sequence" eval="2"/>
280 <field name="view_mode">tree</field>
281 <field name="view_id" ref="view_holiday"/>
282 <field name="act_window_id" ref="open_ask_holidays"/>
285 <record model="ir.actions.act_window.view" id="action_open_ask_holidays_form">
286 <field name="sequence" eval="3"/>
287 <field name="view_mode">form</field>
288 <field name="view_id" ref="edit_holiday_new"/>
289 <field name="act_window_id" ref="open_ask_holidays"/>
292 <record model="ir.actions.act_window.view" id="action_open_ask_holidays_calendar">
293 <field name="sequence" eval="1"/>
294 <field name="view_mode">calendar</field>
295 <field name="view_id" ref="view_holiday_new_calendar"/>
296 <field name="act_window_id" ref="open_ask_holidays"/>
299 <menuitem parent="menu_open_ask_holidays" id="menu_open_ask_holidays_new" action="open_ask_holidays"/>
301 <record model="ir.actions.act_window" id="request_approve_holidays">
302 <field name="name">Requests to Approve</field>
303 <field name="res_model">hr.holidays</field>
304 <field name="view_type">form</field>
305 <field name="context">{
306 'default_type': 'remove',
307 'search_default_approve':1,
308 'needaction_menu_ref':
310 'hr_holidays.menu_open_ask_holidays_new',
311 'hr_holidays.menu_open_company_allocation',
312 'hr_holidays.menu_open_employee_leave',
315 <field name="domain">[('type','=','remove')]</field>
316 <field name="view_id" ref="edit_holiday_new"/>
317 <field name="search_view_id" ref="view_hr_holidays_filter"/>
320 <record model="ir.actions.act_window.view" id="action_request_approve_holidays_tree">
321 <field name="sequence" eval="1"/>
322 <field name="view_mode">tree</field>
323 <field name="view_id" ref="view_holiday"/>
324 <field name="act_window_id" ref="request_approve_holidays"/>
327 <record model="ir.actions.act_window.view" id="action_request_approve_holidays_form">
328 <field name="sequence" eval="2"/>
329 <field name="view_mode">form</field>
330 <field name="view_id" ref="edit_holiday_new"/>
331 <field name="act_window_id" ref="request_approve_holidays"/>
334 <menuitem name="Leave Requests to Approve" parent="menu_open_ask_holidays" id="menu_request_approve_holidays" action="request_approve_holidays" groups="base.group_hr_user"/>
336 <record model="ir.actions.act_window" id="open_allocation_holidays">
337 <field name="name">Allocation Requests</field>
338 <field name="res_model">hr.holidays</field>
339 <field name="view_type">form</field>
340 <field name="context">{
341 'default_type':'add',
342 'search_default_my_leaves':1,
343 'needaction_menu_ref':
345 'hr_holidays.menu_open_company_allocation',
348 <field name="domain">[('type','=','add'), ('employee_id.user_id','=', uid)]</field>
349 <field name="view_id" ref="edit_holiday_new"/>
350 <field name="search_view_id" ref="view_hr_holidays_filter"/>
353 <record model="ir.actions.act_window.view" id="action_open_allocation_holidays_tree">
354 <field name="sequence" eval="1"/>
355 <field name="view_mode">tree</field>
356 <field name="view_id" ref="view_holiday_allocation_tree"/>
357 <field name="act_window_id" ref="open_allocation_holidays"/>
360 <record model="ir.actions.act_window.view" id="action_open_allocation_holidays_form">
361 <field name="sequence" eval="2"/>
362 <field name="view_mode">form</field>
363 <field name="view_id" ref="edit_holiday_new"/>
364 <field name="act_window_id" ref="open_allocation_holidays"/>
367 <menuitem parent="menu_open_ask_holidays" id="menu_open_allocation_holidays" action="open_allocation_holidays"/>
369 <record model="ir.actions.act_window" id="request_approve_allocation">
370 <field name="name">Allocation Requests to Approve</field>
371 <field name="res_model">hr.holidays</field>
372 <field name="view_type">form</field>
373 <field name="context">{
374 'default_type': 'add',
375 'search_default_approve':1,
376 'needaction_menu_ref':
378 'hr_holidays.menu_open_allocation_holidays',
379 'hr_holidays.menu_open_company_allocation'
382 <field name="domain">[('type','=','add')]</field>
383 <field name="view_id" ref="edit_holiday_new"/>
384 <field name="search_view_id" ref="view_hr_holidays_filter"/>
387 <record model="ir.actions.act_window.view" id="action_request_approve_allocation_tree">
388 <field name="sequence" eval="1"/>
389 <field name="view_mode">tree</field>
390 <field name="view_id" ref="view_holiday_allocation_tree"/>
391 <field name="act_window_id" ref="request_approve_allocation"/>
394 <record model="ir.actions.act_window.view" id="action_request_approve_allocation_form">
395 <field name="sequence" eval="2"/>
396 <field name="view_mode">form</field>
397 <field name="view_id" ref="edit_holiday_new"/>
398 <field name="act_window_id" ref="request_approve_allocation"/>
401 <menuitem parent="menu_open_ask_holidays" id="menu_request_approve_allocation" action="request_approve_allocation" groups="base.group_hr_manager"/>
403 <record model="ir.actions.act_window" id="open_company_allocation">
404 <field name="name">Leaves Summary</field>
405 <field name="res_model">hr.holidays</field>
406 <field name="view_type">form</field>
407 <field name="view_mode">tree,form</field>
408 <field name="view_id" eval="view_holiday_simple"/>
409 <field name="context">{
410 'search_default_group_type': 1,
411 'search_default_year': 1 ,
412 'needaction_menu_ref':
414 'hr_holidays.menu_open_ask_holidays_new',
415 'hr_holidays.menu_request_approve_holidays',
416 'hr_holidays.menu_open_allocation_holidays',
417 'hr_holidays.menu_request_approve_allocation',
418 'hr_holidays.menu_open_employee_leave',
421 <field name="domain">[('holiday_type','=','employee')]</field>
422 <field name="search_view_id" ref="view_hr_holidays_filter"/>
425 <menuitem name="Leaves Summary" parent="menu_open_ask_holidays" id="menu_open_company_allocation" action="open_company_allocation" sequence="40"/>
427 <record model="ir.actions.act_window" id="open_employee_leaves">
428 <field name="name">Employee's Leaves</field>
429 <field name="res_model">hr.holidays</field>
430 <field name="view_type">form</field>
431 <field name="view_mode">tree,form</field>
432 <field name="view_id" eval="view_holiday_employee"/>
433 <field name="context">{'default_type': 'remove', 'search_default_gray': 1, 'search_default_year': 1, 'search_default_group_employee': 1}</field>
434 <field name="domain">[('type','=','remove')]</field>
435 <field name="search_view_id" ref="view_hr_holidays_filter"/>
438 <menuitem name="Employee's Leaves" parent="menu_open_ask_holidays" id="menu_open_employee_leave" groups="base.group_hr_manager,base.group_hr_user" action="open_employee_leaves" sequence="41"/>
440 <!-- Holidays status -->
441 <record id="view_holidays_status_filter" model="ir.ui.view">
442 <field name="name">hr.holidays.status.filter</field>
443 <field name="model">hr.holidays.status</field>
444 <field name="arch" type="xml">
445 <search string="Search Leave Type">
446 <field name="name" string="Leave Types"/>
447 <field name="categ_id"/>
452 <record model="ir.ui.view" id="edit_holiday_status_form">
453 <field name="name">hr.holidays.status.form</field>
454 <field name="model">hr.holidays.status</field>
455 <field name="arch" type="xml">
456 <form string="Leave Type">
459 <field name="categ_id"/>
462 <page string="Details">
464 <group name="selection" string="Validation">
465 <field name="double_validation"/>
466 <field name="limit"/>
468 <group name="second" string="Misc">
469 <field name="color_name"/>
470 <field name="active"/>
479 <record model="ir.ui.view" id="view_holiday_status_tree">
480 <field name="name">hr.holidays.status.tree</field>
481 <field name="model">hr.holidays.status</field>
482 <field name="arch" type="xml">
483 <tree string="Leave Type">
485 <field name="max_leaves"/>
486 <field name="leaves_taken"/>
487 <field name="remaining_leaves"/>
492 <record model="ir.ui.view" id="view_holiday_status_normal_tree">
493 <field name="name">hr.holidays.status.normal.tree</field>
494 <field name="model">hr.holidays.status</field>
495 <field name="priority">35</field>
496 <field name="arch" type="xml">
497 <tree string="Leave Type">
499 <field name="limit"/>
504 <record id="view_hr_holidays_status_search" model="ir.ui.view">
505 <field name="name">hr.holidays.status.search</field>
506 <field name="model">hr.holidays.status</field>
507 <field name="arch" type="xml">
508 <search string="Leave Type">
509 <field name="name" string="Leave Types"/>
510 <field name="categ_id"/>
515 <record id="open_view_holiday_status" model="ir.actions.act_window">
516 <field name="name">Leave Types</field>
517 <field name="type">ir.actions.act_window</field>
518 <field name="res_model">hr.holidays.status</field>
519 <field name="view_type">form</field>
520 <field name="view_mode">tree,form</field>
521 <field name="view_id" eval="view_holiday_status_normal_tree"/>
522 <field name="search_view_id" ref="view_hr_holidays_status_search"/>
525 <menuitem sequence="3" id="hr.menu_open_view_attendance_reason_config" parent="hr.menu_hr_configuration" name="Leaves" groups="base.group_hr_manager"/>
526 <menuitem name="Leave Types" action="open_view_holiday_status" id="menu_open_view_holiday_status" parent="hr.menu_hr_configuration_employees" sequence="4" groups="base.group_hr_manager"/>
528 <!-- Holiday on resource leave -->
529 <record id="resource_calendar_leave_form_inherit" model="ir.ui.view">
530 <field name="name">resource.calendar.leaves.form.inherit</field>
531 <field name="model">resource.calendar.leaves</field>
532 <field name="inherit_id" ref="resource.resource_calendar_leave_form"/>
533 <field name="arch" type="xml">
534 <field name="name" position="after">
535 <field name="holiday_id"/>
541 <record id="act_hr_employee_holiday_request" model="ir.actions.act_window">
542 <field name="name">Leaves</field>
543 <field name="type">ir.actions.act_window</field>
544 <field name="res_model">hr.holidays</field>
545 <field name="src_model">hr.employee</field>
546 <field name="view_type">form</field>
547 <field name="view_mode">tree,form</field>
548 <field name="context">{'search_default_employee_id': [active_id], 'default_employee_id': active_id}</field>
549 <field name="domain">[('type','=','remove')]</field>
550 <field name="view_id" eval="view_holiday"/>
553 <record id="act_hr_employee_holiday_request_approved" model="ir.actions.act_window">
554 <field name="name">Leaves to be reported in Payslip</field>
555 <field name="type">ir.actions.act_window</field>
556 <field name="res_model">hr.holidays</field>
557 <field name="src_model">hr.employee</field>
558 <field name="view_type">form</field>
559 <field name="view_mode">tree,form</field>
560 <field name="context">{'search_default_employee_id': [active_id], 'search_default_validated': True, 'search_default_gray': True}</field>
561 <field name="domain">[('date_from','>=', context_today().strftime("%Y-%m-1")), ('date_from','<', ((context_today() + relativedelta(months=1)).strftime('%Y-%m-1')) )]</field>
562 <field name="view_id" eval="view_holiday_allocation_tree_customize"/>
565 <!-- Assing leave -->
566 <record id="hr_holidays_leaves_assign_tree_view" model="ir.ui.view">
567 <field name="name">hr.employee.leave.tree</field>
568 <field name="model">hr.employee</field>
569 <field name="priority" eval="20"/>
570 <field name="arch" type="xml">
571 <tree string="Assign Leaves" editable="bottom">
572 <field name="name" string="Employee"/>
573 <field name="remaining_leaves" string="Remaining Legal Leaves"/>
578 <record model="ir.actions.act_window" id="hr_holidays_leaves_assign_legal">
579 <field name="name">Allocate Leaves for Employees</field>
580 <field name="type">ir.actions.act_window</field>
581 <field name="res_model">hr.employee</field>
582 <field name="view_type">form</field>
583 <field name="view_mode">tree,form</field>
584 <field name="view_id" ref="hr_holidays_leaves_assign_tree_view"/>
585 <field name="help" type="html">
587 You can assign remaining Legal Leaves for each employee, Odoo
588 will automatically create and validate allocation requests.
593 <!-- Hr employee inherit Legal Leaves -->
594 <record id="view_employee_form_leave_inherit" model="ir.ui.view">
595 <field name="name">hr.employee.leave.form.inherit</field>
596 <field name="model">hr.employee</field>
597 <field name="inherit_id" ref="hr.view_employee_form"/>
598 <field name="arch" type="xml">
599 <xpath expr="//group[@name='active_group']" position="before">
600 <group string="Leaves">
601 <label for="remaining_leaves"/>
603 <field name="remaining_leaves" class="oe_inline"/> days
607 <xpath expr="//div[@name='button_box']" position="inside">
608 <button name="%(act_hr_employee_holiday_request_approved)d"
610 class="oe_stat_button"
612 groups="base.group_hr_user">
613 <field name="approved_leaves_count" widget="statinfo"/>
615 <button name="%(act_hr_employee_holiday_request)d"
617 class="oe_stat_button"
619 groups="base.group_hr_user">
620 <field name="leaves_count" widget="statinfo"/>
626 <record model="ir.ui.view" id="hr_kanban_view_employees_kanban">
627 <field name="name">HR - Employees Kanban with leave status</field>
628 <field name="model">hr.employee</field>
629 <field name="inherit_id" ref="hr.hr_kanban_view_employees"/>
630 <field name="arch" type="xml">
631 <xpath expr="//templates" position="before">
632 <field name="current_leave_id"/>
633 <field name="current_leave_state"/>
634 <field name="leave_date_from"/>
635 <field name="leave_date_to"/>
637 <xpath expr="//div[@class='oe_employee_details']/ul/li[@id='last_login']" position="inside">
638 <span t-if="record.current_leave_id.raw_value" style="font-size: 100%%"
639 t-att-class="record.current_leave_state.raw_value=='validate'?'oe_kanban_button oe_kanban_color_3':'oe_kanban_button oe_kanban_color_2'"
640 t-att-title="record.leave_date_from.raw_value.toString('ddd dS MMM') + ' - ' + record.leave_date_to.raw_value.toString('ddd dS MMM')">
641 <field name="current_leave_id"/>
648 id="act_hr_leave_request_to_meeting"
649 name="Leave Meetings"
650 src_model="hr.holidays"
651 res_model="calendar.event"
652 view_mode="tree,form,calendar,gantt"