TIP: You can type at any time to perform a new search.

Security findings

Repository
odoo/odoo · module folder
Module version
1.6
Category
Human Resources/Time Off
Folder size
14.87 MB
License
LGPL-3
Application
Yes
Auto-installable
No
Website
https://www.odoo.com/app/time-off
Last tracking update
2026-10-05 00:19:42
Authors
Odoo S.A.
Maintainers
Odoo S.A.
Committers
Xavier Morel, Raphael Collet, Thibault Delavallée, Odoo Translation Bot, Christophe Matthieu, Joren Van Onder, Aaron Bohy, Géry Debongnie, Yannick Tivisse, Adrien Dieudonne, Xavier-Do, Victor Feyens, Adrien Dieudonné, Sébastien Theys, Julien Mougenot, David Beguin, Prakash Prajapati, Tiffany Chang (tic), Gorash, Pierre Paridans, Romain Estievenart, Miquel Raïch, Ahmad Khanalizadeh, Didier (did), Florian Charlier, luvi, tsm-odoo, Yash Vaishnav, Victor Piryns (pivi), Thomas Becquevort (thbe), amdi-odoo, Pierre-Yves Dufays, Dylan Kiss (dyki), Chong Wang (cwg), Leloup Loïc (lole), Xavier Bol (xbo), Brieuc-brd, omra-odoo, Zelong Lin, sesn-odoo, Nicolas Viseur (vin), Mélanie, Youssef Bashandy, ravb-odoo, Maryam Kia, reka-odoo, Gabriel (gdpf), Tanguy Quéguineur, Alex Kühn, Chrysanthe (chgo), sami odoo, asno-odoo, Harsh Shah, rmun-odoo, Mathieu Coutant, Yassin Abdelkarim, Khumam Alzagim, Xavier Luyckx (xlu), Yousef Alnashef (alny), rame-odoo, Abdelrahman Mahmoud (amah), ahta, Pierre Pulinckx, Bastien PIERRE, fdardenne, nikj-odoo, Michaël Mattiello, Corentin Heinix (cohe), bona-odoo, Krzysztof Magusiak (krma), Hazem Ibrahim, Maeva De Keyser (MDEK), nsirjacobs, Gurpreet Singh, Giorgio Tocco (gito), kareem, jayp-odoo, josm-odoo, Bertrand Dossogne, thha-odoo, romc-odoo, npm, Ian Cioppa (iacio), Mongy (abmn), Julien Launois (jula), Laetitia (ldau), Patrick Stooks, ksar-odoo, Quentin Colla (qucol), dhka-odoo, Einar Andersen (eian), josv-odoo, path-odoo, Saurabh, Hashem Elmaleeh, assh-odoo, hossamelgendy1, Louis, Ziri, renol-odoo, Omar Khalid, YoussefM890, kuay-odoo, jand-odoo, Merlin Guillaume, rugot-odoo, Eve Lin (evlin), Abdelouahab Laaroussi (abla), Atovange, lebm-odoo, Dilya Anvarbekova, Zachary (zavan), Jurgen Gjini, Federico Falcone, Mahmoudk3m, erle, alan-odoo, Martin Lefèvre (mlef), Madhav Pancholi, Julien Carion, Nikhil Kajavadra, ELCO, karygauss03, Lucas ESTEBAN (lues), Manal El Kaidi (maelk), tshe-odoo, dhbr-odoo, Camila Vives, Feeedeee, chpa-odoo, Oussema Heni, Faruk Avcı, SaraBriki, shmn-odoo, mear-odoo, 3amo-magdy, Mohamed Ayman, Joseph Nechleba (jonec), Rons, Kirra Hyde, adak(ahmed), Devendra Ladhani, hamza, Amr Yasser, Frantisek Binovsky, Brian Nguyen, abshe, Tatiana Skvortsova (taskv), SurryaT10, usseif, Mélanie Peyrat (mepe), FedericoBraidi, Priyanshu Goyal (prgo), Sara Briki, Ahmed Naem (Ahnae), alwhi-odoo, Mohamed (moaln), Mohamed-moali, ESTEBAN Lucas, satp-odoo, ivgm-odoo, Alex Kühn, Julien Piron, Jean Schoenlaub, pusu-odoo, mohammed84farouk, Ali Badran, Simon Dumoulin (sidum), SebVde, BeBel42, vikri-odoo, Nikhil Joshi, sidum, Arturo Yepez, Tony Michel (tomic), Dhananjay Brahmane, yogietama, odoo-thha, aski97
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
hr_holidays_attendance, hr_presence, l10n_fr_hr_holidays, l10n_in_hr_holidays, project_timesheet_holidays, test_discuss_full
Description
Manage time off requests and allocations
========================================

This application controls the time off schedule of your company. It allows employees to request time off. Then, managers can review requests for time off and approve or reject them. This way you can control the overall time off planning for the company or department.

You can configure several kinds of time off (sickness, paid days, ...) and allocate time off to an employee or department quickly using time off allocation. An employee can also make a request for more days off by making a new time off allocation. It will increase the total of available days for that time type (if the request is accepted).

You can keep track of time off in different ways by following reports:

* Time Off Summary
* Time Off by Department
* Time Off Analysis

A synchronization with an internal agenda (Meetings of the CRM module) is also possible in order to automatically create a meeting when a time off request is accepted by setting up a type of meeting in time off Type.

Code Analysis info_outline

Views touched (83)
XML IDNameModelTypeStatus
can_be_carryover_no can_be_carryover_no ir.ui.view qweb New
can_be_carryover_yes can_be_carryover_yes ir.ui.view qweb New
hr_accrual_level_view_form hr.leave.accrual.level.form hr.leave.accrual.level form New
hr_accrual_plan_view_form hr.leave.accrual.plan.form hr.leave.accrual.plan form New
hr_accrual_plan_view_search hr.leave.accrual.plan.search hr.leave.accrual.plan search New
hr_accrual_plan_view_tree hr.leave.accrual.plan.list hr.leave.accrual.plan list New
hr_department_view_kanban hr.department.kanban.inherit hr.department kanban Inherits hr.hr_department_view_kanban
hr_employee_public_form_view_inherit hr.employee.public.leave.form.inherit hr.employee.public form Inherits hr.hr_employee_public_view_form
hr_employee_view_search hr.employee.search.view.inherit hr.employee search Inherits hr.view_employee_filter
hr_holidays_cancel_leave_form hr.holidays.cancel.leave form New
hr_kanban_view_employees_kanban hr.employee.kanban.leaves.status hr.employee kanban Inherits hr.hr_kanban_view_employees
hr_kanban_view_public_employees_kanban hr.employee.public.kanban.leaves.status hr.employee.public kanban Inherits hr.hr_employee_public_view_kanban
hr_leave_allocation_generate_multi_wizard_view_form hr.leave.allocation.generate.multi.wizard form New
hr_leave_allocation_view_activity hr.leave.allocation.view.activity hr.leave.allocation activity New
hr_leave_allocation_view_form hr.leave.allocation.view.form hr.leave.allocation form New
hr_leave_allocation_view_form_dashboard hr.leave.view.form.dashboard hr.leave.allocation form Inherits hr_holidays.hr_leave_allocation_view_form
hr_leave_allocation_view_form_manager hr.leave.allocation.view.form.manager hr.leave.allocation form Inherits hr_holidays.hr_leave_allocation_view_form
hr_leave_allocation_view_form_manager_dashboard hr.leave.allocation.view.form.manager.dashboard hr.leave.allocation form Inherits hr_holidays.hr_leave_allocation_view_form_manager
hr_leave_allocation_view_kanban hr.leave.allocation.view.kanban hr.leave.allocation kanban New
hr_leave_allocation_view_search_manager hr.leave.allocation.view.search.my hr.leave.allocation search Inherits view_hr_leave_allocation_filter
hr_leave_allocation_view_search_my hr.leave.allocation.view.search.my hr.leave.allocation search Inherits view_hr_leave_allocation_filter
hr_leave_allocation_view_tree hr.leave.allocation.view.list hr.leave.allocation list New
hr_leave_allocation_view_tree_my hr.leave.allocation.view.list.my hr.leave.allocation list Inherits hr_leave_allocation_view_tree
hr_leave_employee_report_filter hr.leave.employee.report search New
hr_leave_employee_report_view_graph hr.leave.employee.report graph New
hr_leave_employee_report_view_pivot hr.leave.employee.report pivot New
hr_leave_employee_type_report hr.leave.employee.type.report.view.pivot hr.leave.employee.type.report pivot New
hr_leave_employee_view_dashboard hr.leave.employee.view.dashboard hr.leave calendar New
hr_leave_employee_view_dashboard_month hr.leave.view.dashboard.month hr.leave calendar Inherits hr_holidays.hr_leave_employee_view_dashboard
hr_leave_employee_view_dashboard_week hr.leave.view.dashboard.week hr.leave calendar Inherits hr_holidays.hr_leave_employee_view_dashboard
hr_leave_generate_multi_wizard_view_form hr.leave.generate.multi.wizard form New
hr_leave_mandatory_day_view_form hr.leave.mandatory.day form New
hr_leave_mandatory_day_view_list hr.leave.mandatory.day list New
hr_leave_mandatory_day_view_search hr.leave.mandatory.day search New
hr_leave_report_calendar_view hr.leave.report.calendar.view hr.leave.report.calendar calendar New
hr_leave_report_calendar_view_form hr.leave.report.calendar.view.form hr.leave.report.calendar form New
hr_leave_report_calendar_view_form_with_footer hr.leave.report.calendar.view.form.with.footer hr.leave.report.calendar form Inherits hr_holidays.hr_leave_report_calendar_view_form
hr_leave_report_calendar_view_search hr.leave.report.calendar.view.search hr.leave.report.calendar search New
hr_leave_report_calendar_year_view hr.leave.report.calendar.year.view hr.leave.report.calendar calendar New
hr_leave_report_graph report.hr.holidays.report.leave_all.graph hr.leave.report graph New
hr_leave_report_pivot report.hr.holidays.report.leave_all.pivot hr.leave.report pivot New
hr_leave_report_tree report.hr.holidays.report.leave_all.list hr.leave.report list New
hr_leave_view_activity hr.leave.view.activity hr.leave activity New
hr_leave_view_calendar_manager hr.leave.view.calendar.manager hr.leave calendar Inherits hr_holidays.hr_leave_view_dashboard
hr_leave_view_dashboard hr.leave.view.dashboard hr.leave calendar New
hr_leave_view_form hr.leave.view.form hr.leave form New
hr_leave_view_form_dashboard hr.leave.view.form.dashboard hr.leave form Inherits hr_holidays.hr_leave_view_form
hr_leave_view_form_dashboard_manager_new_time_off hr.leave.view.form.dashboard.new.time.off hr.leave form Inherits hr_holidays.hr_leave_view_form_dashboard_new_time_off
hr_leave_view_form_dashboard_new_time_off hr.leave.view.form.dashboard.new.time.off hr.leave form Inherits hr_holidays.hr_leave_view_form_dashboard
hr_leave_view_form_dashboard_new_time_off_custom hr.leave.view.form.dashboard.new.time.off.custom hr.leave form Inherits hr_holidays.hr_leave_view_form_dashboard_new_time_off
hr_leave_view_form_manager hr.leave.view.form.manager hr.leave form Inherits hr_leave_view_form
hr_leave_view_kanban hr.leave.view.kanban hr.leave kanban New
hr_leave_view_kanban_my hr.leave.view.kanban.my hr.leave kanban Inherits hr_holidays.hr_leave_view_kanban
hr_leave_view_search_manager hr.holidays.view.search.manager hr.leave search Inherits view_hr_holidays_filter
hr_leave_view_search_my hr.holidays.view.search.my hr.leave search Inherits view_hr_holidays_filter
hr_leave_view_search_report hr.holidays.view.search.report hr.leave search Inherits view_hr_holidays_filter
hr_leave_view_tree hr.holidays.view.list hr.leave list New
hr_leave_view_tree_my hr.holidays.view.list hr.leave list Inherits hr_leave_view_tree
hr_time_rule_view_form_inherit_hr_holidays hr.time.rule.form.inherit.hr.holidays hr.time.rule form Inherits hr_work_entry.hr_time_rule_view_form
hr_time_rule_view_list_inherit_hr_holidays hr.time.rule.list.inherit.hr.holidays hr.time.rule list Inherits hr_work_entry.hr_time_rule_view_list
hr_time_rule_view_search_inherit_hr_holidays hr.time.rule.search.inherit.hr.holidays hr.time.rule search Inherits hr_work_entry.hr_time_rule_view_search
hr_work_entry_type_view_form hr.work.entry.type.form hr.work.entry.type form Inherits hr_work_entry.hr_work_entry_type_view_form
hr_work_entry_type_view_kanban hr.work.entry.type.kanban hr.work.entry.type kanban New
is_based_on_worked_time_no is_based_on_worked_time_no ir.ui.view qweb New
is_based_on_worked_time_yes is_based_on_worked_time_yes ir.ui.view qweb New
load_public_holiday_wizard_view_form load.public.holiday.wizard form New
report_holidayssummary report_holidayssummary ir.ui.view qweb New
resource_calendar_form_inherit resource.calendar.form.inherit resource.calendar form Inherits resource.resource_calendar_form
resource_calendar_leave_form_inherit resource.calendar.leaves.form.inherit resource.calendar.leaves form Inherits resource.resource_calendar_leave_form
resource_calendar_leaves_tree_inherit resource.calendar.leaves.list.inherit resource.calendar.leaves list Inherits resource.resource_calendar_leave_tree
resource_calendar_leaves_view_search_inherit resource.calendar.leaves.search.inherit resource.calendar.leaves search Inherits resource.view_resource_calendar_leaves_search
resource_calendar_view_form_holidays resource.calendar.view.form resource.calendar form Inherits resource.resource_calendar_form
resource_calendar_view_tree resource.calendar.view.list.inherit.hr.holidays resource.calendar list Inherits resource.view_resource_calendar_tree
view_calendar_event_form_inherit view.calendar.event.form.inherit calendar.event form Inherits calendar.view_calendar_event_form
view_employee_form_leave_inherit hr.employee.leave.form.inherit hr.employee form Inherits hr.view_employee_form
view_employee_tree_inherit_leave hr.employee.list.leave hr.employee list Inherits hr.view_employee_tree
view_evaluation_report_graph hr.holidays.graph hr.leave graph New
view_hr_holidays_filter hr.holidays.filter hr.leave search New
view_hr_holidays_filter_report hr.holidays.filter hr.leave.report search New
view_hr_holidays_summary_employee hr.holidays.summary.employee.form hr.holidays.summary.employee form New
view_hr_leave_allocation_filter hr.holidays.filter_allocations hr.leave.allocation search New
view_search_hr_holidays_employee_type_report hr.holidays.filter hr.leave.employee.type.report search New
view_work_entry_type_normal_tree hr.work.entry.type.view.tree.inherit.hr_holidays hr.work.entry.type tree Inherits hr_work_entry.hr_work_entry_type_view_tree
HTTP endpoints (5)
Route(s)HandlerAuthTypeMethodsFlags
/allocation/refuse HrHolidaysController.hr_holidays_allocation_refuse user http GET
/allocation/validate HrHolidaysController.hr_holidays_allocation_validate user http GET
/leave/approve HrHolidaysController.hr_holidays_request_approve user http GET
/leave/refuse HrHolidaysController.hr_holidays_request_refuse user http GET
/leave/validate HrHolidaysController.hr_holidays_request_validate user http GET
Models touched (36)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (3)
  • absence_of_today Integer
    compute='_compute_leave_count' string='Absence by Today'
  • allocation_to_approve_count Integer
    compute='_compute_leave_count' string='Allocation to Approve'
  • leave_to_approve_count Integer
    compute='_compute_leave_count' string='Time Off to Approve'
Public methods (2)
  • action_open_allocation_department(self)
  • action_open_leave_department(self)

New fields (15)
  • allocation_count Float
    compute='_compute_allocation_count' groups='hr.group_hr_user' args: 'Total number of days allocated.'
  • allocation_display Char
    compute='_compute_allocation_remaining_display'
  • allocation_remaining_display Char
    compute='_compute_allocation_remaining_display'
  • allocations_count Integer
    compute='_compute_allocation_count' groups='hr.group_hr_user' args: 'Total number of allocations'
  • current_leave_state Selection
    compute='_compute_leave_status' groups='hr.group_hr_user' selection=[('confirm', 'Waiting Approval'), ('refuse', 'Refused'), ('validate1', 'Waiting Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')] string='Current Time Off Status'
  • current_work_entry_type_id Many2one → hr.work.entry.type
    compute='_compute_current_work_entry_type_id' groups='hr.group_hr_user' string='Current Time Type' args: 'hr.work.entry.type'
  • hr_icon_display Selection
    selection_add=[('presence_holiday_absent', 'On leave'), ('presence_holiday_present', 'Present but on leave')]
  • hr_responsible_id Many2one
    domain=<expr>
  • is_absent Boolean
    compute='_compute_leave_status' search='_search_absent_employee' args: 'Absent Today'
  • leave_date_from Date
    compute='_compute_leave_status' groups='hr.group_hr_user' args: 'From Date'
  • leave_date_to Date
    compute='_compute_leave_status' args: 'To Date'
  • leave_ids One2many → hr.leave
    groups='hr.group_hr_user' args: 'hr.leave', 'employee_id'
  • leave_manager_id Many2one → res.users
    compute='_compute_leave_manager' domain=_get_leave_manager_domain help='Select the user responsible for approving "Time Off" of this employee.\nIf empty, the approval is done by an Administrator or Approver (determined in settings/users).' readonly=False store=True string='Time Off Approver' args: 'res.users'
  • member_of_department Boolean
    compute='_compute_member_of_department' search='_search_part_of_department' args: 'Member of Department'
  • show_leaves Boolean
    compute='_compute_show_leaves' args: 'Able to see Remaining Time Off'
Public methods (9)
  • action_time_off_dashboard(self, scale=None)
  • create(self, vals_list)
    @api.model_create_multi
  • get_allocations_number(self)
    @api.model
  • get_mandatory_days(self, start_date, end_date)
  • get_mandatory_days_data(self, date_start, date_end)
    @api.model
  • get_public_holidays_data(self, date_start, date_end)
    @api.model
  • get_special_days_data(self, date_start, date_end)
    @api.model
  • get_time_off_dashboard_data(self, target_date=None)
    @api.model
  • write(self, vals)

New fields (0)

No new fields.

Public methods (1)
  • action_register(self)

New fields (6)
  • allocation_display Char
    compute='_compute_allocation_display'
  • allocation_remaining_display Char
    related='employee_id.allocation_remaining_display'
  • is_absent Boolean
    compute='_compute_leave_status' search='_search_absent_employee' args: 'Absent Today'
  • leave_date_to Date
    compute='_compute_leave_status' args: 'To Date'
  • leave_manager_id Many2one → res.users
    compute='_compute_leave_manager' domain="[('share', '=', False), ('company_ids', 'in', company_id)]" help='Select the user responsible for approving "Time Off" of this employee.\nIf empty, the approval is done by an Administrator or Approver (determined in settings/users).' readonly=False store=True string='Time Off Approver' args: 'res.users'
  • show_leaves Boolean
    compute='_compute_show_leaves' args: 'Able to see Remaining Time Off'
Public methods (2)
  • action_open_time_off_calendar(self)
    Open the time off calendar filtered on this employee.
  • action_time_off_dashboard(self, scale=None)

New fields (2)
  • leave_id Many2one → hr.leave
    required=True string='Time Off Request' args: 'hr.leave'
  • reason Text
Public methods (1)
  • action_cancel_leave(self)

New fields (3)
  • date_from Date
    default=<expr> required=True string='From'
  • emp Many2many → hr.employee
    string='Employee(s)' args: 'hr.employee', 'summary_emp_rel', 'sum_id', 'emp_id'
  • holiday_type Selection
    default='Approved' required=True string='Select Time Type' args: [('Approved', 'Approved'), ('Confirmed', 'Confirmed'), ('both', 'Both Approved and Confirmed')]
Public methods (1)
  • print_report(self)

New fields (63)
  • active_employee Boolean
    related='employee_id.active' string='Employee Active'
  • allocation_display_warning Char
    compute='_compute_allocation_warning'
  • allowed_request_durations Json
    compute='_compute_allowed_request_durations'
  • allowed_work_entry_type_ids Many2many → hr.work.entry.type
    compute='_compute_allowed_work_entry_type_ids' args: 'hr.work.entry.type'
  • attachment_ids One2many → ir.attachment
    string='Attachments' args: 'ir.attachment', 'res_id'
  • attachment_is_visible Boolean
    compute='_compute_attachment_is_visible' compute_sudo=True
  • can_approve Boolean
    compute='_compute_can_approve' export_string_translation=False
  • can_back_to_approve Boolean
    compute='_compute_can_back_to_approve' export_string_translation=False
  • can_cancel Boolean
    compute='_compute_can_cancel' export_string_translation=False
  • can_refuse Boolean
    compute='_compute_can_refuse' export_string_translation=False
  • can_reschedule Boolean
    compute='_compute_can_reschedule' export_string_translation=False
  • can_validate Boolean
    compute='_compute_can_validate' export_string_translation=False
  • color Integer
    related='work_entry_type_id.color' args: 'Color'
  • company_id Many2one → res.company
    compute='_compute_company_id' index=True store=True args: 'res.company'
  • count_as Selection
    related='work_entry_type_id.count_as'
  • dashboard_warning_message Char
    compute='_compute_dashboard_warning_message'
  • date_from Datetime
    compute='_compute_date_from_to' index=True store=True tracking=True args: 'Start Date'
  • date_to Datetime
    compute='_compute_date_from_to' store=True tracking=True args: 'End Date'
  • department_id Many2one → hr.department
    compute='_compute_department_id' readonly=False store=True string='Department' args: 'hr.department'
  • duration_display Char
    compute='_compute_duration_display' args: 'Requested'
  • employee_company_id Many2one
    related='employee_id.company_id' store=True string='Employee Company'
  • employee_id Many2one → hr.employee
    default=<expr> domain=<expr> index=True ondelete='restrict' required=True string='Employee' tracking=True args: 'hr.employee'
  • first_approver_id Many2one → hr.employee
    copy=False help='This area is automatically filled by the user who validate the time off' readonly=True string='First Approval' args: 'hr.employee'
  • has_mandatory_day Boolean
    compute='_compute_has_mandatory_day'
  • is_hatched Boolean
    compute='_compute_is_hatched' args: 'Hatched'
  • is_striked Boolean
    compute='_compute_is_hatched' args: 'Striked'
  • is_time_rule_trimmed Boolean
    copy=False default=False help="Set when a time rule trims this leave's end to sub-day precision. Prevents _compute_date_from_to from snapping the end back to the schedule boundary." string='Trimmed by Time Rule'
  • last_several_days Boolean
    compute='_compute_last_several_days' args: 'All day'
  • max_leaves Float
    compute='_compute_leaves'
  • meeting_id Many2one → calendar.event
    copy=False string='Meeting' args: 'calendar.event'
  • name Char
    compute='_compute_description' compute_sudo=False copy=False inverse='_inverse_description' search='_search_description' args: 'Description'
  • notes Text
    readonly=False args: 'Reasons'
  • number_of_days Float
    compute='_compute_duration' help='Number of days of the time off request. Used in the calculation.' store=True tracking=True args: 'Duration (Days)'
  • number_of_hours Float
    compute='_compute_duration' help='Number of hours of the time off request. Used in the calculation.' inverse='_inverse_number_of_hours' store=True tracking=True args: 'Duration (Hours)'
  • output_leave_ids One2many → hr.leave
    args: 'hr.leave', 'source_leave_id'
  • private_name Char
    groups='hr_holidays.group_hr_holidays_responsible' args: 'Time Off Description'
  • request_date_from Date
    args: 'Request Start Date'
  • request_date_from_period Selection
    default='am' string='Date Period Start' args: [('am', 'Morning'), ('pm', 'Afternoon')]
  • request_date_hour_from Datetime
    compute='_compute_request_date_hour_from' inverse='_inverse_request_date_hour_from_to' readonly=False search='_search_request_date_hour_from'
  • request_date_hour_to Datetime
    compute='_compute_request_date_hour_to' inverse='_inverse_request_date_hour_from_to' readonly=False search='_search_request_date_hour_to'
  • request_date_to Date
    args: 'Request End Date'
  • request_date_to_period Selection
    default='pm' string='Date Period End' args: [('am', 'Morning'), ('pm', 'Afternoon')]
  • request_duration Selection
    default='full' string='Duration' args: [('full', 'Full Day'), ('am', 'Morning'), ('pm', 'Afternoon'), ('specific', 'Specific')]
  • request_hour_from Float
    string='Hour from'
  • request_hour_to Float
    string='Hour to'
  • resource_calendar_id Many2one → resource.calendar
    compute='_compute_resource_calendar_id' copy=False readonly=False store=True args: 'resource.calendar'
  • second_approver_id Many2one → hr.employee
    copy=False help='This area is automatically filled by the user who validate the time off with second level (If time type need second validation)' readonly=True string='Second Approval' args: 'hr.employee'
  • source_leave_id Many2one → hr.leave
    copy=False index=True string='Source Leave' args: 'hr.leave'
  • state Selection
    copy=False default='confirm' readonly=False store=True string='Status' tracking=True args: [('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')]
  • supported_attachment_ids Many2many → ir.attachment
    compute='_compute_supported_attachment_ids' inverse='_inverse_supported_attachment_ids' string='Attach File' args: 'ir.attachment'
  • supported_attachment_ids_count Integer
    compute='_compute_supported_attachment_ids'
  • time_rule_id Many2one → hr.time.rule
    copy=False index=True string='Time Rule' args: 'hr.time.rule'
  • time_rule_time_range Char
    compute='_compute_time_rule_time_range' help='HH:MM → HH:MM label shown on rule-split and trimmed leaves.'
  • tz Selection
    compute='_compute_tz' args: _tz_get
  • tz_mismatch Boolean
    compute='_compute_tz_mismatch'
  • user_id Many2one → res.users
    compute_sudo=True index=True readonly=True related='employee_id.user_id' related_sudo=True store=True string='User' args: 'res.users'
  • validation_type Selection
    readonly=False related='work_entry_type_id.leave_validation_type' string='Validation Type'
  • virtual_remaining_leaves Float
    compute='_compute_leaves' string='Available Time Off'
  • work_entry_type_id Many2one → hr.work.entry.type
    domain="[\n [('id', 'in', allowed_work_entry_type_ids)],\n ('time_off_selectable', '=', True),\n '|',\n ('requires_allocation', '=', False),\n ('has_valid_allocation', '=', True),\n ]" index=True required=True string='Time Type' tracking=True args: 'hr.work.entry.type'
  • work_entry_type_increases_duration Char
    compute='_compute_work_entry_type_increases_duration'
  • work_entry_type_request_unit Selection
    readonly=True related='work_entry_type_id.request_unit'
  • work_entry_type_requires_allocation Boolean
    related='work_entry_type_id.requires_allocation'
  • work_entry_type_support_document Boolean
    related='work_entry_type_id.support_document'
Public methods (18)
  • action_approve(self, check_state=True)
  • action_back_to_approval(self)
  • action_cancel(self)
  • action_documents(self)
  • action_open_employee_calendar(self)
  • action_refuse(self)
  • activity_update(self)
  • add_follower(self, employee_id)
  • copy_data(self, default=None)
  • create(self, vals_list)
    @api.model_create_multi
  • default_get(self, fields)
    @api.model
  • get_unusual_days(self, date_from, date_to=None)
    @api.model
  • message_subscribe(self, partner_ids=None, subtype_ids=None)
  • onchange(self, values, field_names, fields_spec)
  • open_pending_requests(self)
    @api.model
  • reschedule_from_calendar(self, date_from, date_to)
    Reschedule a leave from the endpoints a calendar displays, request_date_hour_from/to. An approved request is reset to "To Approve".
  • unlink(self)
  • write(self, vals)

New fields (32)
  • accrual_plan_id Many2one → hr.leave.accrual.plan
    default=<expr> index=True ondelete='cascade' required=True args: 'hr.leave.accrual.plan', 'Accrual Plan'
  • accrual_validity Boolean
    compute='_compute_accrual_validity' export_string_translation=False readonly=False store=True
  • accrual_validity_count Integer
    default='1' export_string_translation=False help='You can define a period of time where the days carried over will be available'
  • accrual_validity_type Selection
    default='day' export_string_translation=False help='This field defines the unit of time after which the accrual ends.' required=True args: [('day', 'Days'), ('month', 'Months')]
  • accrued_gain_time Selection
    export_string_translation=False related='accrual_plan_id.accrued_gain_time'
  • action_with_unused_accruals Selection
    compute='_compute_action_with_unused_accruals' default='lost' export_string_translation=False help="When the Carry-Over Time is reached, according to Plan's setting, select what you want to happen with the unused time off: Lost (time will be reset to zero), Carried over (accrued time carried over to the next period.)" readonly=False required=True store=True args: [('lost', 'Lost (Reset)'), ('all', 'Carried over')]
  • added_value Float
    default=1 digits=(16, 5) export_string_translation=False required=True
  • added_value_type Selection
    compute='_compute_added_value_type' export_string_translation=False inverse='_inverse_added_value_type' precompute=True readonly=False required=True store=True args: [('day', 'Day(s)'), ('hour', 'Hour(s)')]
  • can_be_carryover Boolean
    export_string_translation=False readonly=True related='accrual_plan_id.can_be_carryover'
  • can_modify_value_type Boolean
    compute='_compute_can_modify_value_type' default=False export_string_translation=False
  • cap_accrued_time Boolean
    export_string_translation=False help='When the field is checked the balance of an allocation using this accrual plan will never exceed the specified amount.'
  • cap_accrued_time_yearly Boolean
    export_string_translation=False help='When the field is checked the total amount accrued each year will be capped at the specified amount' readonly=False store=True
  • carryover_options Selection
    compute='_compute_carryover_options' default='unlimited' export_string_translation=False help='You can limit the accrued time carried over for the next period.' readonly=False required=True store=True args: [('unlimited', 'Unlimited'), ('limited', 'Up to')]
  • first_day Selection
    default='1' export_string_translation=False args: _get_selection_days
  • first_month Selection
    default='1' export_string_translation=False args: [('1', 'January'), ('2', 'February'), ('3', 'March'), ('4', 'April'), ('5', 'May'), ('6', 'June')]
  • first_month_day Selection
    compute='_compute_first_month_day' default='1' export_string_translation=False readonly=False store=True args: _get_selection_days
  • frequency Selection
    default='daily' required=True string='Frequency' args: [('hourly', 'Hourly'), ('daily', 'Daily'), ('weekly', 'Weekly'), ('bimonthly', 'Twice a month'), ('monthly', 'Monthly'), ('biyearly', 'Twice a year'), ('yearly', 'Yearly')]
  • is_based_on_worked_time Boolean
    export_string_translation=False related='accrual_plan_id.is_based_on_worked_time'
  • max_carriedover_duration Integer
    export_string_translation=False help='Set a maximum of accruals an allocation keeps at the end of the year.'
  • maximum_leave Float
    compute='_compute_maximum_leave' default=0 digits=(16, 2) export_string_translation=False help='Choose a cap for this accrual.' readonly=False store=True
  • maximum_leave_yearly Float
    digits=(16, 2) export_string_translation=False
  • milestone_date Selection
    compute='_compute_milestone_date' default='creation' export_string_translation=False inverse='_inverse_milestone_date' readonly=False required=True store=True args: [('creation', 'At allocation creation'), ('after', 'After')]
  • second_day Selection
    default='15' export_string_translation=False args: _get_selection_days
  • second_month Selection
    default='7' export_string_translation=False args: [('7', 'July'), ('8', 'August'), ('9', 'September'), ('10', 'October'), ('11', 'November'), ('12', 'December')]
  • second_month_day Selection
    compute='_compute_second_month_day' default='1' export_string_translation=False readonly=False store=True args: _get_selection_days
  • sequence Integer
    compute='_compute_sequence' help='Sequence is generated automatically by start time delta.' store=True string='sequence'
  • start_count Integer
    export_string_translation=False help='The accrual starts after a defined period from the allocation start date. This field defines the number of days, months or years after which accrual is used.'
  • start_type Selection
    default='day' export_string_translation=False help='This field defines the unit of time after which the accrual starts.' required=True args: [('day', 'Days'), ('month', 'Months'), ('year', 'Years')]
  • week_day Selection
    default='0' required=True string='Allocation on' args: [('0', 'Monday'), ('1', 'Tuesday'), ('2', 'Wednesday'), ('3', 'Thursday'), ('4', 'Friday'), ('5', 'Saturday'), ('6', 'Sunday')]
  • yearly_day Selection
    compute='_compute_yearly_day' default='1' export_string_translation=False readonly=False store=True args: _get_selection_days
  • yearly_gain Float
    compute='_compute_yearly_gain'
  • yearly_month Selection
    default='1' export_string_translation=False args: [('1', 'January'), ('2', 'February'), ('3', 'March'), ('4', 'April'), ('5', 'May'), ('6', 'June'), ('7', 'July'), ('8', 'August'), ('9', 'September'), ('10', 'October'), ('11', 'November'), ('12', 'December')]
Public methods (1)
  • action_save_new(self)

New fields (18)
  • accrued_gain_time Selection
    default='end' export_string_translation=False required=True args: [('start', 'At the start of the accrual period'), ('end', 'At the end of the accrual period')]
  • active Boolean
    default=True
  • added_value_type Selection
    default='day' export_string_translation=False store=True args: [('day', 'Days'), ('hour', 'Hours')]
  • allocation_ids One2many → hr.leave.allocation
    export_string_translation=False args: 'hr.leave.allocation', 'accrual_plan_id'
  • allowed_work_entry_type_ids Many2many → hr.work.entry.type
    compute='_compute_allowed_work_entry_type_ids' args: 'hr.work.entry.type'
  • can_be_carryover Boolean
    export_string_translation=False
  • carryover_date Selection
    default='year_start' export_string_translation=False required=True string='Carry-Over Time' args: [('year_start', 'At the start of the year'), ('allocation', 'At the allocation date'), ('other', 'Custom date')]
  • carryover_day Selection
    compute='_compute_carryover_day' default='1' export_string_translation=False readonly=False store=True args: _get_selection_days
  • carryover_month Selection
    default=<expr> export_string_translation=False args: [('1', 'January'), ('2', 'February'), ('3', 'March'), ('4', 'April'), ('5', 'May'), ('6', 'June'), ('7', 'July'), ('8', 'August'), ('9', 'September'), ('10', 'October'), ('11', 'November'), ('12', 'December')]
  • company_id Many2one → res.company
    domain=<expr> string='Company' args: 'res.company'
  • employees_count Integer
    compute='_compute_employee_count' args: 'Employees'
  • is_based_on_worked_time Boolean
    compute='_compute_is_based_on_worked_time' export_string_translation=False help='Only excludes requests where the time type is set as unpaid kind of.' readonly=False store=True
  • level_count Integer
    compute='_compute_level_count' args: 'Levels'
  • level_ids One2many → hr.leave.accrual.level
    copy=True string='Milestones' args: 'hr.leave.accrual.level', 'accrual_plan_id'
  • name Char
    required=True args: 'Name'
  • show_transition_mode Boolean
    compute='_compute_show_transition_mode' export_string_translation=False
  • transition_mode Selection
    default='immediately' export_string_translation=False required=True args: [('immediately', 'Immediately'), ('end_of_accrual', "After this accrual's period")]
  • work_entry_type_id Many2one → hr.work.entry.type
    domain='[("id", "in", allowed_work_entry_type_ids)]' help='Time type to be accrued' string='Time Type' args: 'hr.work.entry.type'
Public methods (4)
  • action_create_accrual_plan_level(self)
  • action_open_accrual_plan_employees(self)
  • action_open_accrual_plan_level(self, level_id)
  • create(self, vals_list)
    @api.model_create_multi

New fields (37)
  • accrual_plan_id Many2one → hr.leave.accrual.plan
    index='btree_not_null' tracking=True args: 'hr.leave.accrual.plan'
  • active_employee Boolean
    readonly=True related='employee_id.active' args: 'Active Employee'
  • allowed_work_entry_type_ids Many2many → hr.work.entry.type
    compute='_compute_allowed_work_entry_type_ids' args: 'hr.work.entry.type'
  • approver_id Many2one → hr.employee
    copy=False help='This area is automatically filled by the user who validates the allocation' readonly=True string='First Approval' args: 'hr.employee'
  • can_approve Boolean
    compute='_compute_can_approve' args: 'Can Approve'
  • can_refuse Boolean
    compute='_compute_can_refuse' args: 'Can Refuse'
  • can_validate Boolean
    compute='_compute_can_validate' args: 'Can Validate'
  • carried_over_days_expiration_date Date
    export_string_translation=False args: 'Carried over days expiration date'
  • date_from Date
    copy=False default=fields.Date.context_today index=True required=True tracking=True args: 'Start Date'
  • date_to Date
    copy=False tracking=True args: 'End Date'
  • department_id Many2one → hr.department
    compute='_compute_department_id' readonly=False store=True string='Department' args: 'hr.department'
  • duration_display Char
    compute='_compute_duration_display' help='Field allowing to see the allocation duration in days or hours depending on the type_request_unit' args: 'Allocated (Days/Hours)'
  • employee_company_id Many2one
    readonly=True related='employee_id.company_id' store=True
  • employee_id Many2one → hr.employee
    default=<expr> domain=_domain_employee_id index=True ondelete='restrict' required=True string='Employee' tracking=True args: 'hr.employee'
  • hide_accrual_plan_id Boolean
    compute='_compute_hide_accrual_plan_id'
  • is_name_custom Boolean
    readonly=True store=False
  • is_officer Boolean
    compute='_compute_is_officer'
  • last_accrual Date
    export_string_translation=False args: 'Date of the last accrual allocation'
  • lastcall Date
    export_string_translation=False args: 'Date of the last executed accrual event (accrual, carryover date, expiring carriedover days, ...)'
  • leaves_taken Float
    compute='_compute_leaves' string='Time off Taken'
  • manager_id Many2one → hr.employee
    compute='_compute_manager_id' store=True string='Manager' args: 'hr.employee'
  • max_leaves Float
    compute='_compute_leaves'
  • name Char
    compute='_compute_description' compute_sudo=False readonly=False store=True string='Description'
  • name_validity Char
    compute='_compute_description_validity' args: 'Description with validity'
  • nextcall Date
    export_string_translation=False args: 'Date of the closest next accrual event (accrual, carryover date, expiring carriedover days, ...)'
  • notes Text
    readonly=False args: 'Reasons'
  • number_of_days Float
    default=1 help='Duration in days. Reference field to use when necessary.' readonly=False tracking=True args: 'Number of Days'
  • number_of_days_display Float
    compute='_compute_number_of_days_display' help='For an Accrual Allocation, this field contains the theorical amount of time given to the employee, due to a previous start date, on the first run of the plan. This can be manually edited.' inverse='_inverse_number_of_days_display' args: 'Duration (days)'
  • number_of_hours Float
    compute='_compute_number_of_hours' default_export_compatible=True help='For an Accrual Allocation, this field contains the theorical amount of time given to the employee, due to a previous start date, on the first run of the plan. This can be manually edited.' inverse='_inverse_number_of_hours' store=True args: 'Duration (hours)'
  • previous_carryover_number_of_days Float
    export_string_translation=False args: 'The number of days on previous carryover date'
  • second_approver_id Many2one → hr.employee
    copy=False help='This area is automatically filled by the user who validates the allocation with second level (If time type need second validation)' readonly=True string='Second Approval' args: 'hr.employee'
  • state Selection
    copy=False default='confirm' help="The status is 'To Approve', when an allocation request is created.\nThe status is 'Refused', when an allocation request is refused by manager.\nThe status is 'Approved', when an allocation request is approved by manager." readonly=True string='Status' tracking=True args: [('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')]
  • type_request_unit Selection
    compute='_compute_type_request_unit' args: [('hour', 'Hours'), ('half_day', 'Half-Day'), ('day', 'Day')]
  • validation_type Selection
    readonly=True related='work_entry_type_id.allocation_validation_type' string='Validation Type'
  • virtual_remaining_leaves Float
    compute='_compute_leaves' string='Available Time Off'
  • work_entry_type_id Many2one → hr.work.entry.type
    compute='_compute_work_entry_type_id' domain=_domain_work_entry_type_id index=True readonly=False required=True store=True string='Time Type' args: 'hr.work.entry.type'
  • yearly_accrued_days Float
    export_string_translation=False args: 'Number of accrued days since the last carryover'
Public methods (10)
  • action_approve(self)
  • action_refuse(self)
  • activity_update(self)
  • add_follower(self, employee_id)
  • copy(self, default=None)
  • create(self, vals_list)
    @api.model_create_multi
    Override to avoid automatic logging of creation
  • default_get(self, fields)
    @api.model
  • message_subscribe(self, partner_ids=None, subtype_ids=None)
  • onchange(self, values, field_names, fields_spec)
  • write(self, vals)

New fields (11)
  • accrual_plan_id Many2one → hr.leave.accrual.plan
    args: 'hr.leave.accrual.plan'
  • allowed_work_entry_type_ids Many2many → hr.work.entry.type
    compute='_compute_allowed_work_entry_type_ids' args: 'hr.work.entry.type'
  • company_id Many2one → res.company
    default=<expr> required=True args: 'res.company'
  • date_from Date
    default=fields.Date.context_today required=True args: 'Start Date'
  • date_to Date
    args: 'End Date'
  • duration Float
    string='Allocation'
  • employee_ids Many2many → hr.employee
    domain=<expr> string='Employees' args: 'hr.employee'
  • name Char
    compute='_compute_name' readonly=False store=True args: 'Description'
  • notes Text
    args: 'Reasons'
  • unit_of_measure Selection
    related='work_entry_type_id.unit_of_measure'
  • work_entry_type_id Many2one → hr.work.entry.type
    domain=_domain_work_entry_type_id required=True string='Time Type' args: 'hr.work.entry.type'
Public methods (1)
  • action_generate_allocations(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (9)
  • color Integer
    related='work_entry_type_id.color' string='Color'
  • description Char
  • employee_id Many2one → hr.employee
    readonly=True string='Employee' args: 'hr.employee'
  • leave_id Many2one → hr.leave
    readonly=True string='Time Off Request' args: 'hr.leave'
  • number_of_days Float
    compute='_compute_leave_duration' readonly=True store=True
  • number_of_hours Float
    compute='_compute_leave_duration' readonly=True store=True
  • state Selection
    args: [('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')]
  • work_entry_type_id Many2one → hr.work.entry.type
    string='Time Type' args: 'hr.work.entry.type'
  • working_schedule_aligned_date_from Datetime
    readonly=True store=True args: 'Date From'
Public methods (0)

No public methods.

New fields (11)
  • active_employee Boolean
    readonly=True
  • company_id Many2one → res.company
    readonly=True string='Company' args: 'res.company'
  • date_from Datetime
    readonly=True args: 'Start Date'
  • date_to Datetime
    readonly=True args: 'End Date'
  • department_id Many2one → hr.department
    readonly=True string='Department' args: 'hr.department'
  • employee_id Many2one → hr.employee
    readonly=True string='Employee' args: 'hr.employee'
  • holiday_status Selection
    args: [('taken', 'Taken'), ('left', 'Left'), ('planned', 'Planned')]
  • number_of_days Float
    aggregator='sum' readonly=True args: 'Number of Days'
  • number_of_hours Float
    aggregator='sum' readonly=True args: 'Number of Hours'
  • state Selection
    readonly=True string='Status' args: [('cancel', 'Cancelled'), ('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')]
  • work_entry_type_id Many2one → hr.work.entry.type
    readonly=True string='Time Type' args: 'hr.work.entry.type'
Public methods (2)
  • action_time_off_analysis(self)
    @api.model
  • init(self)

New fields (13)
  • allowed_work_entry_type_ids Many2many → hr.work.entry.type
    compute='_compute_allowed_work_entry_type_ids' args: 'hr.work.entry.type'
  • company_id Many2one → res.company
    default=<expr> required=True args: 'res.company'
  • date_from Date
    default=fields.Date.context_today required=True args: 'Start Date'
  • date_from_period Selection
    default='am' string='Date Period Start' args: [('am', 'Morning'), ('pm', 'Afternoon')]
  • date_to Date
    default=fields.Date.context_today required=True args: 'End Date'
  • date_to_period Selection
    default='pm' string='Date Period End' args: [('am', 'Morning'), ('pm', 'Afternoon')]
  • employee_ids Many2many → hr.employee
    domain=<expr> string='Employees' args: 'hr.employee'
  • hour_from Float
    string='Hour from'
  • hour_to Float
    string='Hour to'
  • name Char
    args: 'Description'
  • valid_work_entry_type_ids Many2many → hr.work.entry.type
    compute='_compute_valid_work_entry_type_ids' args: 'hr.work.entry.type'
  • work_entry_type_id Many2one → hr.work.entry.type
    domain="[('id', 'in', valid_work_entry_type_ids)]" required=True string='Time Type' args: 'hr.work.entry.type'
  • work_entry_type_request_unit Selection
    related='work_entry_type_id.request_unit'
Public methods (1)
  • action_generate_time_off(self)

New fields (8)
  • color Integer
    default=<expr>
  • company_id Many2one → res.company
    default=<expr> required=True args: 'res.company'
  • department_ids Many2many → hr.department
    string='Departments' args: 'hr.department'
  • end_date Date
    required=True
  • job_ids Many2many → hr.job
    string='Job Position' args: 'hr.job'
  • name Char
    required=True
  • resource_calendar_id Many2one → resource.calendar
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" args: 'resource.calendar', 'Working Hours'
  • start_date Date
    required=True
Public methods (0)

No public methods.

New fields (12)
  • allocation_id Many2one → hr.leave.allocation
    readonly=True string='Allocation Request' args: 'hr.leave.allocation'
  • company_id Many2one → res.company
    readonly=True string='Company' args: 'res.company'
  • date_from Datetime
    readonly=True args: 'Start Date'
  • date_to Datetime
    readonly=True args: 'End Date'
  • department_id Many2one → hr.department
    readonly=True string='Department' args: 'hr.department'
  • leave_id Many2one → hr.leave
    readonly=True string='Time Off Request' args: 'hr.leave'
  • leave_type Selection
    readonly=True string='Request Type' args: [('allocation', 'Allocation'), ('request', 'Time Off')]
  • name Char
    readonly=True args: 'Description'
  • number_of_days Float
    readonly=True args: 'Number of Days'
  • number_of_hours Float
    readonly=True args: 'Number of Hours'
  • state Selection
    readonly=True string='Status' args: [('cancel', 'Cancelled'), ('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')]
  • work_entry_type_id Many2one → hr.work.entry.type
    readonly=True string='Time Type' args: 'hr.work.entry.type'
Public methods (2)
  • action_open_record(self)
  • init(self)

New fields (23)
  • company_id Many2one → res.company
    readonly=True args: 'res.company'
  • department_id Many2one → hr.department
    readonly=True args: 'hr.department'
  • description Char
    groups='hr_holidays.group_hr_holidays_user' readonly=True args: 'Description'
  • duration Float
    readonly=True string='Duration'
  • duration_display Char
    readonly=True related='leave_id.duration_display'
  • employee_id Many2one → hr.employee
    readonly=True required=True args: 'hr.employee'
  • is_absent Boolean
    related='employee_id.is_absent'
  • is_hatched Boolean
    readonly=True args: 'Hatched'
  • is_manager Boolean
    compute='_compute_is_manager' args: 'Manager'
  • is_striked Boolean
    readonly=True args: 'Striked'
  • job_id Many2one → hr.job
    readonly=True args: 'hr.job'
  • leave_id Many2one → hr.leave
    comodel_name='hr.leave' groups='hr_holidays.group_hr_holidays_user' readonly=True
  • leave_manager_id Many2one
    related='employee_id.leave_manager_id'
  • member_of_department Boolean
    related='employee_id.member_of_department'
  • name Char
    compute='_compute_name' readonly=True string='Name'
  • request_date_from Date
    readonly=True string='Request Start Date'
  • request_date_hour_from Datetime
    compute='_compute_request_date_hours' compute_sudo=True search='_search_request_date_hour_from'
  • request_date_hour_to Datetime
    compute='_compute_request_date_hours' compute_sudo=True search='_search_request_date_hour_to'
  • request_date_to Date
    readonly=True string='Request End Date'
  • state Selection
    readonly=True args: [('cancel', 'Cancelled'), ('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')]
  • tz Selection
    readonly=True string='Timezone' args: _tz_get
  • user_id Many2one → res.users
    readonly=True args: 'res.users'
  • work_entry_type_id Many2one → hr.work.entry.type
    groups='hr_holidays.group_hr_holidays_user' readonly=True string='Time Type' args: 'hr.work.entry.type'
Public methods (4)
  • action_approve(self)
  • action_refuse(self)
  • get_unusual_days(self, date_from, date_to=None)
    @api.model
  • init(self)

New fields (3)
  • allocation_type_id Many2one → hr.work.entry.type
    domain="[('requires_allocation', '=', True), ('time_off_selectable', '=', True), ('id', 'in', country_work_entry_type_ids)]" string='Allocate to' args: 'hr.work.entry.type'
  • leave_compensation_rate Float
    default=0.0 help='Leave allocated or taken at this rate of the excess or deficit. 100% = 1:1.' args: 'Allocate %'
  • work_entry_type_id Many2one
    domain="[('id', 'in', country_work_entry_type_ids), ('requires_allocation', '=', False)]"
Public methods (0)

No public methods.

New fields (4)
  • allocation_id Many2one → hr.leave.allocation
    index=True ondelete='cascade' required=True args: 'hr.leave.allocation'
  • days Float
    help='Net days credited to the allocation from this source record.Positive = excess credit added; negative = deficit deduction applied.' required=True
  • res_id Many2oneReference
    index='btree_not_null' model_field='res_model' required=True args: 'Record'
  • res_model Char
    index='btree_not_null' required=True args: 'Model'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • allocation_from_working_schedule_id Many2one → hr.leave.allocation
    copy=False groups='hr.group_hr_user' string='Allocation from working schedule' args: 'hr.leave.allocation'
  • hr_responsible_id Many2one
    domain=<expr>
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (29)
  • allocation_count Integer
    compute='_compute_allocation_count' string='Allocations'
  • allocation_notif_subtype_id Many2one → mail.message.subtype
    default=<expr> string='Allocation Notification Subtype' tracking=True args: 'mail.message.subtype'
  • allocation_validation_type Selection
    default='hr' help="Select the level of approval needed in case of request by employee\n # - No validation needed: The employee's request is automatically approved.\n # - Approved by Time Off Officer: The employee's request need to be manually approved\n # by the Time Off Officer, Employee's Approver or both." string='Approval' tracking=True args: [('no_validation', 'None'), ('hr', 'By HR Responsible'), ('manager', 'By Time Off Approver'), ('both', 'By HR Responsible and Time Off Approver')]
  • allow_request_on_top Boolean
    default=False help='If checked, users can request another leave on top of the ones of this type.' string='Allow Request on Top' tracking=True
  • allows_negative Boolean
    help='If checked, users request can exceed the allocated days and balance can go in negative.' string='Allow Negative' tracking=True
  • color Integer
    help='The color selected here will be used in every screen with the time type.' string='Color'
  • count_days_as Selection
    default='working' help='If you take a leave on the whole week, worked days will result in a various number based on the working hours of the employee, calendar days will result in 7 in every case.' string='Count Days as' tracking=True args: [('working', 'Working Days'), ('calendar', 'Calendar Days')]
  • country_code Char
    depends=['country_id'] readonly=True related='country_id.code'
  • country_id Many2one → res.country
    default=<expr> domain=<expr> string='Country' tracking=True args: 'res.country'
  • create_calendar_meeting Boolean
    default=True help='If this field is checked, every leave request of this type will have a corresponding entry in the calendar application. There will be no entry if this stays unchecked.' string='Display Time Off in Calendar' tracking=True
  • elligible_for_accrual_rate Boolean
    compute='_compute_eligible_for_accrual_rate' help='If checked, this time type will be taken into account for accruals computation.' readonly=False store=True string='Eligible for Accrual Rate' tracking=True
  • employee_requests Boolean
    default=False help='Extra Days Requests Allowed: User can request an allocation for himself.\n\n Not Allowed: User cannot request an allocation.' required=True string='Allow Employee Requests' tracking=True
  • group_days_leave Float
    compute='_compute_group_days_leave' string='Group Time Off'
  • has_valid_allocation Boolean
    compute='_compute_valid' help='This indicates if it is still possible to use this type of leave' search='_search_valid'
  • hide_on_dashboard Boolean
    default=False help='Non-visible allocations can still be selected when taking a leave, but will simply not be displayed on the leave dashboard.' string='Hide On Dashboard' tracking=True
  • include_public_holidays_in_duration Boolean
    default=False help='Public holidays should be counted in the leave duration when applying for leaves' tracking=True args: 'Ignore Public Holidays'
  • is_used Boolean
    compute='_compute_is_used'
  • leave_notif_subtype_id Many2one → mail.message.subtype
    default=<expr> string='Time Off Notification Subtype' tracking=True args: 'mail.message.subtype'
  • leave_validation_type Selection
    default='hr' string='Time Off Validation' tracking=True args: [('no_validation', 'None'), ('hr', 'By HR Responsible'), ('manager', 'By Time Off Approver'), ('both', 'By HR Responsible and Time Off Approver')]
  • leaves_taken Float
    compute='_compute_leaves' help='This value is given by the sum of all time off requests with a negative value.' string='Time off Already Taken'
  • max_allowed_negative Integer
    help='Define the maximum level of negative days this kind of time off can reach. Value must be at least 1.' string='Maximum Excess Amount' tracking=True
  • max_leaves Float
    compute='_compute_leaves' help='This value is given by the sum of all time off requests with a positive value.' search='_search_max_leaves' string='Maximum Allowed'
  • request_unit Selection
    default='day' help='Define the minimum time off duration in which an employee can take when requesting a leave' required=True string='Duration Type' tracking=True args: [('day', 'Full Day'), ('half_day', 'Half-Day'), ('hour', 'Custom Hours')]
  • requires_allocation Boolean
    default=True required=True string='Requires Allocation' tracking=True
  • support_document Boolean
    help='When enabled, employees will see a notice that this leave type requires a supporting document.' string='Supporting Document Expected' tracking=True
  • time_off_selectable Boolean
    default=True string='Selectable in Time Off' tracking=True
  • unit_of_measure Selection
    default='hour' help='Define if the time type will be allocated/accrued in hours or days' required=True string='Unit' tracking=True args: [('hour', 'Hours'), ('day', 'Days')]
  • unpaid Boolean
    default=False tracking=True args: 'Is Unpaid'
  • virtual_remaining_leaves Float
    compute='_compute_leaves' help='Maximum Time Off Allowed - Time Off Already Taken - Time Off Waiting Approval' search='_search_virtual_remaining_leaves' string='Virtual Remaining Time Off'
Public methods (9)
  • action_see_days_allocated(self)
  • action_see_group_leaves(self)
  • check_allocation_requirement_edit_validity(self)
    @api.constrains('requires_allocation')
  • get_allocation_data(self, employees, target_date=None, same_year_only=False)
  • get_allocation_data_request(self, target_date=None, hidden_allocations=True, same_year_only=False)
    @api.model
  • get_work_entry_types_with_valid_allocations(self, date_from, date_to, employee_id)
  • has_accrual_allocation(self)
    @api.model
  • has_future_allocation(self)
    @api.model
  • requested_display_name(self)

New fields (3)
  • line_ids One2many → load.public.holiday.wizard.line
    compute='_compute_line_ids' readonly=False store=True string='Public Holidays' args: 'load.public.holiday.wizard.line', 'wizard_id'
  • warning_message Html
    compute='_compute_warning_message'
  • year Integer
    default=<expr> required=True
Public methods (1)
  • action_add_public_holidays(self)

New fields (6)
  • allowed_work_entry_type_ids Many2many → hr.work.entry.type
    compute='_compute_work_entry_type' store=True args: 'hr.work.entry.type'
  • company_id Many2one → res.company
    required=True args: 'res.company'
  • name Char
    required=True
  • start_date Date
    required=True
  • wizard_id Many2one → load.public.holiday.wizard
    ondelete='cascade' required=True args: 'load.public.holiday.wizard'
  • work_entry_type_id Many2one → hr.work.entry.type
    compute='_compute_work_entry_type' domain="[('id', 'in', allowed_work_entry_type_ids)]" readonly=False store=True string='Time Type' args: 'hr.work.entry.type'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

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

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • leave_date_to Date
    compute='_compute_leave_date_to'
Public methods (0)

No public methods.

New fields (1)
  • leave_date_to Date
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi

New fields (2)
  • associated_leaves_count Integer
    compute='_compute_associated_leaves_count' args: 'Time Off Count'
  • leave_accrual_plan_id Many2one → hr.leave.accrual.plan
    comodel_name='hr.leave.accrual.plan' help='' index='btree_not_null' string='Accrual Plan'
Public methods (1)
  • action_open_public_holidays(self)

New fields (2)
  • elligible_for_accrual_rate Boolean
    default=False help='If checked, this time type will be taken into account for accruals computation.' string='Eligible for Accrual Rate'
  • holiday_id Many2one → hr.leave
    string='Time Off Request' args: 'hr.leave'
Public methods (4)
  • create(self, vals_list)
    @api.model_create_multi
  • load_public_holidays(self)
  • unlink(self)
  • write(self, vals)

New fields (1)
  • leave_date_to Date
    related='user_id.leave_date_to'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…