Repository
odoo/odoo · module folder
Module version
1.0
Category
Human Resources
Folder size
0.86 MB
License
LGPL-3
Application
No
Auto-installable
Yes
Website
None
Last tracking update
2026-08-15 22:44:19
Authors
Odoo S.A.
Maintainers
Odoo S.A.
Committers
Raphael Collet, Thibault Delavallée, Odoo Translation Bot, Yannick Tivisse, Julien Castiaux, Tiffany Chang (tic), Gorash, William Braeckman, Ahmad Khanalizadeh, Dossogne Bertrand, Gaetan Vanden Bergh (gavb), Dylan Kiss (dyki), Mélanie, Youssef Bashandy, Mathieu Coutant, rame-odoo, Abdelrahman Mahmoud (amah), ahta, Mohammad Abdulmoneim (abdu), bona-odoo, Krzysztof Magusiak (krma), pajo, Bertrand Dossogne, Quentin Colla (qucol), suma-odoo, Ziri, lebm-odoo, Zachary (zavan), Jurgen Gjini, Martin Lefèvre (mlef), Lucas ESTEBAN (lues), 3amo-magdy, Kishan (kiga), Devendra Ladhani, hamza, Ahmed Naem (Ahnae)
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
Description
Convert employee's extra hours to leave allocations.
    

Code Analysis

Views touched (13)
XML IDNameModelTypeStatus
hr_attendance_employee_simple_tree_view hr.attendance.employee.simple.tree.view.inherit.hr_holidays_attendance hr.attendance list Inherits hr_attendance.hr_attendance_employee_simple_tree_view
hr_attendance_holidays_hr_leave_allocation_view_form_inherit hr.leave.allocation form Inherits hr_holidays.hr_leave_allocation_view_form
hr_attendance_overtime_rule_view_form hr.attendance.overtime.rule.form.inherit.hr_work_entry_attendance hr.attendance.overtime.rule form Inherits hr_attendance.hr_attendance_overtime_rule_view_form
hr_employee_view_form_inherit hr.holidays.attendance.employee.view.form.inherit hr.employee form Inherits hr.view_employee_form
hr_leave_accrual_level_view_form hr.leave.accrual.level.form hr.leave.accrual.level form Inherits hr_holidays.hr_accrual_level_view_form
hr_leave_allocation_overtime_manager_view_form hr.leave.allocation form Inherits hr_attendance_holidays_hr_leave_allocation_view_form_inherit
hr_leave_attendance_report_view_form hr.leave.attendance.report.form hr.leave.attendance.report form New
hr_leave_attendance_report_view_list hr.leave.attendance.report.list hr.leave.attendance.report list New
hr_leave_attendance_report_view_pivot hr.leave.attendance.report.pivot hr.leave.attendance.report pivot New
hr_leave_attendance_report_view_search hr.leave.attendance.report.search hr.leave.attendance.report search New
hr_leave_type_view_form hr.leave.type.view.form.inherit hr.leave.type form Inherits hr_holidays.edit_holiday_status_form
hr_leave_view_form hr.leave form Inherits hr_holidays.hr_leave_view_form_manager
view_attendance_overtime_line_list hr.attendance hr.attendance list Inherits hr_attendance.hr_attendance_view_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (11)

New fields (0)

No new fields.

Public methods (1)
  • init(self)

New fields (1)
  • compensable_as_leave Boolean
    args: 'Compensable as Time Off'
Public methods (0)

No public methods.

New fields (1)
  • compensable_as_leave Boolean
    default=False args: 'Give back as time off'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • get_overtime_data_by_employee(self)
    Provide a summary of an employee's overtime. A compensable overtime is an overtime that can be cumulated to be used as time off. Extra hours and overtime is used interchangably.

New fields (2)
  • employee_overtime Float
    compute='_compute_employee_overtime' groups='base.group_user'
  • overtime_deductible Boolean
    compute='_compute_overtime_deductible'
Public methods (4)
  • action_approve(self, check_state=True)
  • action_reset_confirm(self)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (1)
  • frequency Selection
    compute='_compute_frequency' ondelete={'worked_hours': 'cascade'} readonly=False selection_add=[('worked_hours', 'Per Hour Worked')] store=True
Public methods (0)

No public methods.

New fields (2)
  • employee_overtime Float
    compute='_compute_employee_overtime' groups='base.group_user'
  • overtime_deductible Boolean
    compute='_compute_overtime_deductible'
Public methods (4)
  • action_refuse(self)
  • create(self, vals_list)
    @api.model_create_multi
  • default_get(self, fields)
    @api.model
  • write(self, vals)

New fields (13)
  • active Boolean
    related='employee_id.active'
  • attendance_ids Many2many → hr.attendance
    compute='_compute_leave_attendance_fields' string='Attendances' args: 'hr.attendance'
  • date Date
    args: 'Date'
  • department_id Many2one
    related='employee_id.department_id' string='Department'
  • difference_hours Float
    help='Worked Hours - Expected Hours + Approved Time Off' args: 'Difference'
  • employee_id Many2one → hr.employee
    string='Employee' args: 'hr.employee'
  • expected_hours Float
    args: 'Expected Hours'
  • job_id Many2one
    related='employee_id.job_id' string='Job Position'
  • leave_hours Float
    args: 'Approved Time Off'
  • leave_ids Many2many → hr.leave
    compute='_compute_leave_attendance_fields' string='Time Offs' args: 'hr.leave'
  • leave_type_names Char
    compute='_compute_leave_attendance_fields' args: 'Time Off Types'
  • schedule_id Many2one → resource.calendar
    string='Working Schedule' args: 'resource.calendar'
  • worked_hours Float
    args: 'Worked Hours'
Public methods (1)
  • init(self)

New fields (1)
  • overtime_deductible Boolean
    default=False help='Once a time off of this type is approved, extra hours in attendances will be deducted.' args: 'Deduct Extra Hours'
Public methods (1)
  • get_allocation_data(self, employees, target_date=None)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • unlink(self)
  • write(self, vals)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…