Time Off
hr_holidays · odoo/odoo
hr_holidays_calendar (14.0) · hr_holidays_contract (19.0) · hr_holidays_homeworking, hr_work_entry_holidays (20.0)-
Security25/25No findings
-
Activity25/25Last human commit 1 month ago
-
Required by25/256 modules depend on it
-
Maturity25/25In 15 Odoo series since 6.1
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE ir_rule r SET domain_force = '["|", ("employee_id", "=", False), ("employee_id.company_id", "in", company_ids)]' FROM ir_model_data d WHERE d.res_id = r.id AND d.model = 'ir.rule' AND d.module = 'hr_holidays' AND d.name = 'hr_leave_allocation_rule_multicompany'` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
hr.leave.employee.type.report— Model 'hr.leave.employee.type.report' has `_auto = False` and its init() (re)creates a SQL VIEW: the standard reporting-model pattern, but its raw SQL isn't checked by the ORM - verify it against renamed/removed tables and columns in the target version. migration-sql-viewhr.leave.report— Model 'hr.leave.report' has `_auto = False` and its init() (re)creates a SQL VIEW: the standard reporting-model pattern, but its raw SQL isn't checked by the ORM - verify it against renamed/removed tables and columns in the target version. migration-sql-viewhr.leave.report.calendar— Model 'hr.leave.report.calendar' has `_auto = False` and its init() (re)creates a SQL VIEW: the standard reporting-model pattern, but its raw SQL isn't checked by the ORM - verify it against renamed/removed tables and columns in the target version. migration-sql-view
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
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 the time type.
Dependencies
- 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
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 83
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
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) | Handler | Auth | Type | Methods | Flags |
|---|---|---|---|---|---|
/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 37
No new fields.
Public methods (0)No public methods.
-
absence_of_todayIntegercompute='_compute_leave_count'string='Absence by Today' -
allocation_to_approve_countIntegercompute='_compute_leave_count'string='Allocation to Approve' -
leave_to_approve_countIntegercompute='_compute_leave_count'string='Time Off to Approve'
-
action_open_allocation_department(self) -
action_open_leave_department(self)
-
allocation_countFloatcompute='_compute_allocation_count'groups='hr.group_hr_user' args: 'Total number of days allocated.' -
allocation_displayCharcompute='_compute_allocation_remaining_display' -
allocation_remaining_displayCharcompute='_compute_allocation_remaining_display' -
allocations_countIntegercompute='_compute_allocation_count'groups='hr.group_hr_user' args: 'Total number of allocations' -
current_leave_stateSelectioncompute='_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_idMany2one → hr.work.entry.typecompute='_compute_current_work_entry_type_id'groups='hr.group_hr_user'string='Current Time Type' args: 'hr.work.entry.type' -
hr_icon_displaySelectionselection_add=[('presence_holiday_absent', 'On leave'), ('presence_holiday_present', 'Present but on leave')] -
hr_responsible_idMany2onedomain=<expr> -
is_absentBooleancompute='_compute_leave_status'search='_search_absent_employee' args: 'Absent Today' -
leave_date_fromDatecompute='_compute_leave_status'groups='hr.group_hr_user' args: 'From Date' -
leave_date_toDatecompute='_compute_leave_status' args: 'To Date' -
leave_idsOne2many → hr.leavegroups='hr.group_hr_user' args: 'hr.leave', 'employee_id' -
leave_manager_idMany2one → res.userscompute='_compute_leave_manager'domain=_get_leave_manager_domainhelp='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=Falsestore=Truestring='Time Off Approver' args: 'res.users' -
member_of_departmentBooleancompute='_compute_member_of_department'search='_search_part_of_department' args: 'Member of Department' -
show_leavesBooleancompute='_compute_show_leaves' args: 'Able to see Remaining Time Off'
-
action_time_off_dashboard(self, scale=None) -
create(self, vals_list)@api.model_create_multiDefault the time off approver to the manager's user and give it the approver group. -
get_allocations_number(self)@api.modelReturn the number of allocations of the contextual employee waiting for approval. :rtype: int -
get_mandatory_days(self, start_date, end_date)Return the colors of the mandatory days of the employee (or of the user's employee). :return: ``{'YYYY-MM-DD': color}`` :rtype: dict -
get_mandatory_days_data(self, date_start, date_end)@api.modelReturn the mandatory days of the contextual employee as calendar events. :return: list of dicts (``id``, ``title``, ``start``, ``end``, ``colorIndex``, ...) :rtype: list -
get_public_holidays_data(self, date_start, date_end)@api.modelReturn the public holidays of the contextual employee as calendar events. :return: list of dicts (``id``, ``title``, ``start``, ``end``, ``isAllDay``, ...) :rtype: list -
get_special_days_data(self, date_start, date_end)@api.modelReturn the mandatory days and public holidays of the contextual employee. Used by the calendar views. :return: ``{'mandatoryDays': [...], 'bankHolidays': [...]}``, see :meth:`get_mandatory_days_data` and :meth:`get_public_holidays_data` :rtype: dict -
get_time_off_dashboard_data(self, target_date=None)@api.modelReturn the data of the time off dashboard of the contextual employee. :param target_date: date of the balances, today by default :return: ``{'has_future_allocation', 'has_accrual_allocation', 'allocation_data', 'allocations_number'}``, ``allocation_data`` being the result of ``hr.work.entry.type.get_allocation_data_request()`` :rtype: dict -
write(self, vals)Keep the time off approver and the pending requests in sync with the employee. The time off approver follows the manager when it was the previous manager's user, the approver group is granted to new approvers and removed from former ones, and a new department is copied on the requests to approve or in the future.
No new fields.
Public methods (1)-
action_register(self)
-
allocation_displayCharcompute='_compute_allocation_display' -
allocation_remaining_displayCharrelated='employee_id.allocation_remaining_display' -
is_absentBooleancompute='_compute_leave_status'search='_search_absent_employee' args: 'Absent Today' -
leave_date_toDatecompute='_compute_leave_status' args: 'To Date' -
leave_manager_idMany2one → res.userscompute='_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=Falsestore=Truestring='Time Off Approver' args: 'res.users' -
show_leavesBooleancompute='_compute_show_leaves' args: 'Able to see Remaining Time Off'
-
action_open_time_off_calendar(self)Open the time off calendar filtered on this employee. -
action_time_off_dashboard(self, scale=None)
-
leave_idMany2one → hr.leaverequired=Truestring='Time Off Request' args: 'hr.leave' -
reasonText
-
action_cancel_leave(self)
-
date_fromDatedefault=<expr>required=Truestring='From' -
empMany2many → hr.employeestring='Employee(s)' args: 'hr.employee', 'summary_emp_rel', 'sum_id', 'emp_id' -
holiday_typeSelectiondefault='Approved'required=Truestring='Select Time Type' args: [('Approved', 'Approved'), ('Confirmed', 'Confirmed'), ('both', 'Both Approved and Confirmed')]
-
print_report(self)
-
active_employeeBooleanrelated='employee_id.active'string='Employee Active' -
allocation_display_warningCharcompute='_compute_allocation_warning' -
allowed_request_durationsJsoncompute='_compute_allowed_request_durations' -
allowed_work_entry_type_idsMany2many → hr.work.entry.typecompute='_compute_allowed_work_entry_type_ids' args: 'hr.work.entry.type' -
attachment_idsOne2many → ir.attachmentstring='Attachments' args: 'ir.attachment', 'res_id' -
attachment_is_visibleBooleancompute='_compute_attachment_is_visible'compute_sudo=True -
can_approveBooleancompute='_compute_can_approve'export_string_translation=False -
can_back_to_approveBooleancompute='_compute_can_back_to_approve'export_string_translation=False -
can_cancelBooleancompute='_compute_can_cancel'export_string_translation=False -
can_refuseBooleancompute='_compute_can_refuse'export_string_translation=False -
can_rescheduleBooleancompute='_compute_can_reschedule'export_string_translation=False -
can_validateBooleancompute='_compute_can_validate'export_string_translation=False -
colorIntegerrelated='work_entry_type_id.color' args: 'Color' -
company_idMany2one → res.companycompute='_compute_company_id'index=Truestore=True args: 'res.company' -
count_asSelectionrelated='work_entry_type_id.count_as' -
dashboard_warning_messageCharcompute='_compute_dashboard_warning_message' -
date_fromDatetimecompute='_compute_date_from_to'index=Truestore=Truetracking=True args: 'Start Date' -
date_toDatetimecompute='_compute_date_from_to'store=Truetracking=True args: 'End Date' -
department_idMany2one → hr.departmentcompute='_compute_department_id'readonly=Falsestore=Truestring='Department' args: 'hr.department' -
duration_displayCharcompute='_compute_duration_display' args: 'Requested' -
employee_company_idMany2onerelated='employee_id.company_id'store=Truestring='Employee Company' -
employee_idMany2one → hr.employeedefault=<expr>domain=<expr>index=Trueondelete='restrict'required=Truestring='Employee'tracking=True args: 'hr.employee' -
first_approver_idMany2one → hr.employeecopy=Falsehelp='This area is automatically filled by the user who validate the time off'readonly=Truestring='First Approval' args: 'hr.employee' -
has_mandatory_dayBooleancompute='_compute_has_mandatory_day' -
is_hatchedBooleancompute='_compute_is_hatched' args: 'Hatched' -
is_strikedBooleancompute='_compute_is_hatched' args: 'Striked' -
is_time_rule_trimmedBooleancopy=Falsedefault=Falsehelp="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_daysBooleancompute='_compute_last_several_days' args: 'All day' -
max_leavesFloatcompute='_compute_leaves' -
meeting_idMany2one → calendar.eventcopy=Falsestring='Meeting' args: 'calendar.event' -
nameCharcompute='_compute_description'compute_sudo=Falsecopy=Falseinverse='_inverse_description'search='_search_description' args: 'Description' -
notesTextreadonly=False args: 'Reasons' -
number_of_daysFloatcompute='_compute_duration'help='Number of days of the time off request. Used in the calculation.'store=Truetracking=True args: 'Duration (Days)' -
number_of_hoursFloatcompute='_compute_duration'help='Number of hours of the time off request. Used in the calculation.'inverse='_inverse_number_of_hours'store=Truetracking=True args: 'Duration (Hours)' -
output_leave_idsOne2many → hr.leaveargs: 'hr.leave', 'source_leave_id' -
private_nameChargroups='hr_holidays.group_hr_holidays_responsible' args: 'Time Off Description' -
request_date_fromDateargs: 'Request Start Date' -
request_date_from_periodSelectiondefault='am'string='Date Period Start' args: [('am', 'Morning'), ('pm', 'Afternoon')] -
request_date_hour_fromDatetimecompute='_compute_request_date_hour_from'inverse='_inverse_request_date_hour_from_to'readonly=Falsesearch='_search_request_date_hour_from' -
request_date_hour_toDatetimecompute='_compute_request_date_hour_to'inverse='_inverse_request_date_hour_from_to'readonly=Falsesearch='_search_request_date_hour_to' -
request_date_toDateargs: 'Request End Date' -
request_date_to_periodSelectiondefault='pm'string='Date Period End' args: [('am', 'Morning'), ('pm', 'Afternoon')] -
request_durationSelectiondefault='full'string='Duration' args: [('full', 'Full Day'), ('am', 'Morning'), ('pm', 'Afternoon'), ('specific', 'Specific')] -
request_hour_fromFloatstring='Hour from' -
request_hour_toFloatstring='Hour to' -
resource_calendar_idMany2one → resource.calendarcompute='_compute_resource_calendar_id'copy=Falsereadonly=Falsestore=True args: 'resource.calendar' -
second_approver_idMany2one → hr.employeecopy=Falsehelp='This area is automatically filled by the user who validate the time off with second level (If time type need second validation)'readonly=Truestring='Second Approval' args: 'hr.employee' -
source_leave_idMany2one → hr.leavecopy=Falseindex=Truestring='Source Leave' args: 'hr.leave' -
stateSelectioncopy=Falsedefault='confirm'readonly=Falsestore=Truestring='Status'tracking=True args: [('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')] -
supported_attachment_idsMany2many → ir.attachmentcompute='_compute_supported_attachment_ids'inverse='_inverse_supported_attachment_ids'string='Attach File' args: 'ir.attachment' -
supported_attachment_ids_countIntegercompute='_compute_supported_attachment_ids' -
time_rule_idMany2one → hr.time.rulecopy=Falseindex=Truestring='Time Rule' args: 'hr.time.rule' -
time_rule_time_rangeCharcompute='_compute_time_rule_time_range'help='HH:MM → HH:MM label shown on rule-split and trimmed leaves.' -
tzSelectioncompute='_compute_tz' args: _tz_get -
tz_mismatchBooleancompute='_compute_tz_mismatch' -
user_idMany2one → res.userscompute_sudo=Trueindex=Truereadonly=Truerelated='employee_id.user_id'related_sudo=Truestore=Truestring='User' args: 'res.users' -
validation_typeSelectionreadonly=Falserelated='work_entry_type_id.leave_validation_type'string='Validation Type' -
virtual_remaining_leavesFloatcompute='_compute_leaves'string='Available Time Off' -
work_entry_type_idMany2one → hr.work.entry.typedomain="[\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=Truerequired=Truestring='Time Type'tracking=True args: 'hr.work.entry.type' -
work_entry_type_increases_durationCharcompute='_compute_work_entry_type_increases_duration' -
work_entry_type_request_unitSelectionreadonly=Truerelated='work_entry_type_id.request_unit' -
work_entry_type_requires_allocationBooleanrelated='work_entry_type_id.requires_allocation' -
work_entry_type_support_documentBooleanrelated='work_entry_type_id.support_document'
-
action_approve(self, check_state=True)Approve the requests. A request goes to ``'validate'`` (see :meth:`_action_validate`) when the user can validate it, otherwise to ``'validate1'`` (first approval of a type validated twice) when the user can approve it. Time off officers can validate in one step. :param bool check_state: ``False`` to skip the rights check: types validated twice go to ``'validate1'``, others are validated :raise UserError: when the user can neither approve nor validate a request -
action_back_to_approval(self)Reset to ``'confirm'`` the requests the user may reset; others are ignored. -
action_cancel(self) -
action_documents(self) -
action_open_employee_calendar(self) -
action_refuse(self)Refuse requests to approve or approved: the resource leaves and meetings are removed. :raise UserError: when a request is not ``'confirm'``, ``'validate1'`` or ``'validate'`` -
activity_update(self)Schedule or close the approval activities according to the state of the requests. -
add_follower(self, employee_id) -
copy_data(self, default=None) -
create(self, vals_list)@api.model_create_multiCreate time off requests, check them and start their approval. Requests whose type is selectable are checked with :meth:`_check_validity` (unless the context has ``skip_check_validity``). Each request is then auto-approved or gets approval activities (:meth:`_process_auto_approve_activities`) and the time rules run on it. With the context key ``leave_fast_create``, the double validation rights, the approval and the time rules are skipped, and the validated requests directly get their resource leave. -
default_get(self, fields)@api.model -
get_unusual_days(self, date_from, date_to=None)@api.modelReturn the unusual days of the employee of the context (or of the user). See :meth:`~odoo.addons.hr.models.hr_employee.HrEmployee._get_unusual_days`. :return: ``{'YYYY-MM-DD': bool}`` :rtype: dict -
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)Move a request to the bounds a calendar view displays. Converts ``date_from``/``date_to`` with :meth:`_get_request_vals_from_date_hours` and writes the request fields. An approved request needing validation goes back to ``'confirm'``. :param date_from: new start, as displayed (``request_date_hour_from``) :param date_to: new end, as displayed (``request_date_hour_to``) -
unlink(self)Delete requests, after reversing their time rule credits and removing their leaves. -
write(self, vals)Write on time off requests, keeping their resource leave in sync. Changing the state checks :meth:`_check_approval_update`. Leaving the ``'validate'`` state removes the resource leave and reverses the time rule allocation credits; changing the dates or the type of a validated request amends its resource leave (:meth:`_amend_resource_leave_dates`). Users who are not officers cannot modify started or cancelled requests.
-
accrual_plan_idMany2one → hr.leave.accrual.plandefault=<expr>index=Trueondelete='cascade'required=True args: 'hr.leave.accrual.plan', 'Accrual Plan' -
accrual_validityBooleancompute='_compute_accrual_validity'export_string_translation=Falsereadonly=Falsestore=True -
accrual_validity_countIntegerdefault='1'export_string_translation=Falsehelp='You can define a period of time where the days carried over will be available' -
accrual_validity_typeSelectiondefault='day'export_string_translation=Falsehelp='This field defines the unit of time after which the accrual ends.'required=True args: [('day', 'Days'), ('month', 'Months')] -
accrued_gain_timeSelectionexport_string_translation=Falserelated='accrual_plan_id.accrued_gain_time' -
action_with_unused_accrualsSelectioncompute='_compute_action_with_unused_accruals'default='lost'export_string_translation=Falsehelp="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=Falserequired=Truestore=True args: [('lost', 'Lost (Reset)'), ('all', 'Carried over')] -
added_valueFloatdefault=1digits=(16, 5)export_string_translation=Falserequired=True -
added_value_typeSelectioncompute='_compute_added_value_type'export_string_translation=Falseinverse='_inverse_added_value_type'precompute=Truereadonly=Falserequired=Truestore=True args: [('day', 'Day(s)'), ('hour', 'Hour(s)')] -
can_be_carryoverBooleanexport_string_translation=Falsereadonly=Truerelated='accrual_plan_id.can_be_carryover' -
can_modify_value_typeBooleancompute='_compute_can_modify_value_type'default=Falseexport_string_translation=False -
cap_accrued_timeBooleanexport_string_translation=Falsehelp='When the field is checked the balance of an allocation using this accrual plan will never exceed the specified amount.' -
cap_accrued_time_yearlyBooleanexport_string_translation=Falsehelp='When the field is checked the total amount accrued each year will be capped at the specified amount'readonly=Falsestore=True -
carryover_optionsSelectioncompute='_compute_carryover_options'default='unlimited'export_string_translation=Falsehelp='You can limit the accrued time carried over for the next period.'readonly=Falserequired=Truestore=True args: [('unlimited', 'Unlimited'), ('limited', 'Up to')] -
first_daySelectiondefault='1'export_string_translation=False args: _get_selection_days -
first_monthSelectiondefault='1'export_string_translation=False args: [('1', 'January'), ('2', 'February'), ('3', 'March'), ('4', 'April'), ('5', 'May'), ('6', 'June')] -
first_month_daySelectioncompute='_compute_first_month_day'default='1'export_string_translation=Falsereadonly=Falsestore=True args: _get_selection_days -
frequencySelectiondefault='daily'required=Truestring='Frequency' args: [('hourly', 'Hourly'), ('daily', 'Daily'), ('weekly', 'Weekly'), ('bimonthly', 'Twice a month'), ('monthly', 'Monthly'), ('biyearly', 'Twice a year'), ('yearly', 'Yearly')] -
is_based_on_worked_timeBooleanexport_string_translation=Falserelated='accrual_plan_id.is_based_on_worked_time' -
max_carriedover_durationIntegerexport_string_translation=Falsehelp='Set a maximum of accruals an allocation keeps at the end of the year.' -
maximum_leaveFloatcompute='_compute_maximum_leave'default=0digits=(16, 2)export_string_translation=Falsehelp='Choose a cap for this accrual.'readonly=Falsestore=True -
maximum_leave_yearlyFloatdigits=(16, 2)export_string_translation=False -
milestone_dateSelectioncompute='_compute_milestone_date'default='creation'export_string_translation=Falseinverse='_inverse_milestone_date'readonly=Falserequired=Truestore=True args: [('creation', 'At allocation creation'), ('after', 'After')] -
second_daySelectiondefault='15'export_string_translation=False args: _get_selection_days -
second_monthSelectiondefault='7'export_string_translation=False args: [('7', 'July'), ('8', 'August'), ('9', 'September'), ('10', 'October'), ('11', 'November'), ('12', 'December')] -
second_month_daySelectioncompute='_compute_second_month_day'default='1'export_string_translation=Falsereadonly=Falsestore=True args: _get_selection_days -
sequenceIntegercompute='_compute_sequence'help='Sequence is generated automatically by start time delta.'store=Truestring='sequence' -
start_countIntegerexport_string_translation=Falsehelp='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_typeSelectiondefault='day'export_string_translation=Falsehelp='This field defines the unit of time after which the accrual starts.'required=True args: [('day', 'Days'), ('month', 'Months'), ('year', 'Years')] -
week_daySelectiondefault='0'required=Truestring='Allocation on' args: [('0', 'Monday'), ('1', 'Tuesday'), ('2', 'Wednesday'), ('3', 'Thursday'), ('4', 'Friday'), ('5', 'Saturday'), ('6', 'Sunday')] -
yearly_daySelectioncompute='_compute_yearly_day'default='1'export_string_translation=Falsereadonly=Falsestore=True args: _get_selection_days -
yearly_gainFloatcompute='_compute_yearly_gain' -
yearly_monthSelectiondefault='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')]
-
action_save_new(self)
-
accrued_gain_timeSelectiondefault='end'export_string_translation=Falserequired=True args: [('start', 'At the start of the accrual period'), ('end', 'At the end of the accrual period')] -
activeBooleandefault=True -
added_value_typeSelectiondefault='day'export_string_translation=Falsestore=True args: [('day', 'Days'), ('hour', 'Hours')] -
allocation_idsOne2many → hr.leave.allocationexport_string_translation=False args: 'hr.leave.allocation', 'accrual_plan_id' -
allowed_work_entry_type_idsMany2many → hr.work.entry.typecompute='_compute_allowed_work_entry_type_ids' args: 'hr.work.entry.type' -
can_be_carryoverBooleanexport_string_translation=False -
carryover_dateSelectiondefault='year_start'export_string_translation=Falserequired=Truestring='Carry-Over Time' args: [('year_start', 'At the start of the year'), ('allocation', 'At the allocation date'), ('other', 'Custom date')] -
carryover_daySelectioncompute='_compute_carryover_day'default='1'export_string_translation=Falsereadonly=Falsestore=True args: _get_selection_days -
carryover_monthSelectiondefault=<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_idMany2one → res.companydomain=<expr>string='Company' args: 'res.company' -
employees_countIntegercompute='_compute_employee_count' args: 'Employees' -
is_based_on_worked_timeBooleancompute='_compute_is_based_on_worked_time'export_string_translation=Falsehelp='Only excludes requests where the time type is set as unpaid kind of.'readonly=Falsestore=True -
level_countIntegercompute='_compute_level_count' args: 'Levels' -
level_idsOne2many → hr.leave.accrual.levelcopy=Truestring='Milestones' args: 'hr.leave.accrual.level', 'accrual_plan_id' -
nameCharrequired=True args: 'Name' -
show_transition_modeBooleancompute='_compute_show_transition_mode'export_string_translation=False -
transition_modeSelectiondefault='immediately'export_string_translation=Falserequired=True args: [('immediately', 'Immediately'), ('end_of_accrual', "After this accrual's period")] -
work_entry_type_idMany2one → hr.work.entry.typedomain='[("id", "in", allowed_work_entry_type_ids)]'help='Time type to be accrued'string='Time Type' args: 'hr.work.entry.type'
-
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
-
accrual_plan_idMany2one → hr.leave.accrual.planindex='btree_not_null'tracking=True args: 'hr.leave.accrual.plan' -
active_employeeBooleanreadonly=Truerelated='employee_id.active' args: 'Active Employee' -
allowed_work_entry_type_idsMany2many → hr.work.entry.typecompute='_compute_allowed_work_entry_type_ids' args: 'hr.work.entry.type' -
approver_idMany2one → hr.employeecopy=Falsehelp='This area is automatically filled by the user who validates the allocation'readonly=Truestring='First Approval' args: 'hr.employee' -
can_approveBooleancompute='_compute_can_approve' args: 'Can Approve' -
can_refuseBooleancompute='_compute_can_refuse' args: 'Can Refuse' -
can_validateBooleancompute='_compute_can_validate' args: 'Can Validate' -
carried_over_days_expiration_dateDateexport_string_translation=False args: 'Carried over days expiration date' -
date_fromDatecopy=Falsedefault=fields.Date.context_todayindex=Truerequired=Truetracking=True args: 'Start Date' -
date_toDatecopy=Falsetracking=True args: 'End Date' -
department_idMany2one → hr.departmentcompute='_compute_department_id'readonly=Falsestore=Truestring='Department' args: 'hr.department' -
duration_displayCharcompute='_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_idMany2onereadonly=Truerelated='employee_id.company_id'store=True -
employee_idMany2one → hr.employeedefault=<expr>domain=_domain_employee_idindex=Trueondelete='restrict'required=Truestring='Employee'tracking=True args: 'hr.employee' -
hide_accrual_plan_idBooleancompute='_compute_hide_accrual_plan_id' -
is_name_customBooleanreadonly=Truestore=False -
is_officerBooleancompute='_compute_is_officer' -
last_accrualDateexport_string_translation=False args: 'Date of the last accrual allocation' -
lastcallDateexport_string_translation=False args: 'Date of the last executed accrual event (accrual, carryover date, expiring carriedover days, ...)' -
leaves_takenFloatcompute='_compute_leaves'string='Time off Taken' -
manager_idMany2one → hr.employeecompute='_compute_manager_id'store=Truestring='Manager' args: 'hr.employee' -
max_leavesFloatcompute='_compute_leaves' -
nameCharcompute='_compute_description'compute_sudo=Falsereadonly=Falsestore=Truestring='Description' -
name_validityCharcompute='_compute_description_validity' args: 'Description with validity' -
nextcallDateexport_string_translation=False args: 'Date of the closest next accrual event (accrual, carryover date, expiring carriedover days, ...)' -
notesTextreadonly=False args: 'Reasons' -
number_of_daysFloatdefault=1help='Duration in days. Reference field to use when necessary.'readonly=Falsetracking=True args: 'Number of Days' -
number_of_days_displayFloatcompute='_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_hoursFloatcompute='_compute_number_of_hours'default_export_compatible=Truehelp='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_daysFloatexport_string_translation=False args: 'The number of days on previous carryover date' -
second_approver_idMany2one → hr.employeecopy=Falsehelp='This area is automatically filled by the user who validates the allocation with second level (If time type need second validation)'readonly=Truestring='Second Approval' args: 'hr.employee' -
stateSelectioncopy=Falsedefault='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=Truestring='Status'tracking=True args: [('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')] -
type_request_unitSelectioncompute='_compute_type_request_unit' args: [('hour', 'Hours'), ('half_day', 'Half-Day'), ('day', 'Day')] -
validation_typeSelectionreadonly=Truerelated='work_entry_type_id.allocation_validation_type'string='Validation Type' -
virtual_remaining_leavesFloatcompute='_compute_leaves'string='Available Time Off' -
work_entry_type_idMany2one → hr.work.entry.typecompute='_compute_work_entry_type_id'domain=_domain_work_entry_type_idindex=Truereadonly=Falserequired=Truestore=Truestring='Time Type' args: 'hr.work.entry.type' -
yearly_accrued_daysFloatexport_string_translation=False args: 'Number of accrued days since the last carryover'
-
action_approve(self)Approve the allocations: validate them, or give the first approval (``'validate1'``). :raise UserError: when the user can neither validate nor approve an allocation -
action_refuse(self)Refuse the allocations. :raise UserError: when an allocation is not ``'confirm'``, ``'validate1'`` or ``'validate'`` -
activity_update(self) -
add_follower(self, employee_id) -
copy(self, default=None) -
create(self, vals_list)@api.model_create_multiCreate allocations in ``'confirm'`` and start their approval. Types without validation are approved at once. :raise UserError: when another state is given -
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)Write on allocations, checking the state transitions. :raise ValidationError: when the change reduces the balance below the time already taken (beyond the negative cap of the type)
-
accrual_plan_idMany2one → hr.leave.accrual.planargs: 'hr.leave.accrual.plan' -
allowed_work_entry_type_idsMany2many → hr.work.entry.typecompute='_compute_allowed_work_entry_type_ids' args: 'hr.work.entry.type' -
company_idMany2one → res.companydefault=<expr>required=True args: 'res.company' -
date_fromDatedefault=fields.Date.context_todayrequired=True args: 'Start Date' -
date_toDateargs: 'End Date' -
durationFloatstring='Allocation' -
employee_idsMany2many → hr.employeedomain=<expr>string='Employees' args: 'hr.employee' -
nameCharcompute='_compute_name'readonly=Falsestore=True args: 'Description' -
notesTextargs: 'Reasons' -
unit_of_measureSelectionrelated='work_entry_type_id.unit_of_measure' -
work_entry_type_idMany2one → hr.work.entry.typedomain=_domain_work_entry_type_idrequired=Truestring='Time Type' args: 'hr.work.entry.type'
-
action_generate_allocations(self)
No new fields.
Public methods (0)No public methods.
-
colorIntegerrelated='work_entry_type_id.color'string='Color' -
descriptionChar -
employee_idMany2one → hr.employeereadonly=Truestring='Employee' args: 'hr.employee' -
leave_idMany2one → hr.leavereadonly=Truestring='Time Off Request' args: 'hr.leave' -
number_of_daysFloatcompute='_compute_leave_duration'readonly=Truestore=True -
number_of_hoursFloatcompute='_compute_leave_duration'readonly=Truestore=True -
stateSelectionargs: [('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')] -
work_entry_type_idMany2one → hr.work.entry.typestring='Time Type' args: 'hr.work.entry.type' -
working_schedule_aligned_date_fromDatetimereadonly=Truestore=True args: 'Date From'
No public methods.
-
active_employeeBooleanreadonly=True -
company_idMany2one → res.companyreadonly=Truestring='Company' args: 'res.company' -
date_fromDatetimereadonly=True args: 'Start Date' -
date_toDatetimereadonly=True args: 'End Date' -
department_idMany2one → hr.departmentreadonly=Truestring='Department' args: 'hr.department' -
employee_idMany2one → hr.employeereadonly=Truestring='Employee' args: 'hr.employee' -
holiday_statusSelectionargs: [('taken', 'Taken'), ('left', 'Left'), ('planned', 'Planned')] -
number_of_daysFloataggregator='sum'readonly=True args: 'Number of Days' -
number_of_hoursFloataggregator='sum'readonly=True args: 'Number of Hours' -
stateSelectionreadonly=Truestring='Status' args: [('cancel', 'Cancelled'), ('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')] -
work_entry_type_idMany2one → hr.work.entry.typereadonly=Truestring='Time Type' args: 'hr.work.entry.type'
-
action_time_off_analysis(self)@api.model -
init(self)
-
allowed_work_entry_type_idsMany2many → hr.work.entry.typecompute='_compute_allowed_work_entry_type_ids' args: 'hr.work.entry.type' -
company_idMany2one → res.companydefault=<expr>required=True args: 'res.company' -
date_fromDatedefault=fields.Date.context_todayrequired=True args: 'Start Date' -
date_from_periodSelectiondefault='am'string='Date Period Start' args: [('am', 'Morning'), ('pm', 'Afternoon')] -
date_toDatedefault=fields.Date.context_todayrequired=True args: 'End Date' -
date_to_periodSelectiondefault='pm'string='Date Period End' args: [('am', 'Morning'), ('pm', 'Afternoon')] -
employee_idsMany2many → hr.employeedomain=<expr>string='Employees' args: 'hr.employee' -
hour_fromFloatstring='Hour from' -
hour_toFloatstring='Hour to' -
nameCharargs: 'Description' -
valid_work_entry_type_idsMany2many → hr.work.entry.typecompute='_compute_valid_work_entry_type_ids' args: 'hr.work.entry.type' -
work_entry_type_idMany2one → hr.work.entry.typedomain="[('id', 'in', valid_work_entry_type_ids)]"required=Truestring='Time Type' args: 'hr.work.entry.type' -
work_entry_type_request_unitSelectionrelated='work_entry_type_id.request_unit'
-
action_generate_time_off(self)
-
colorIntegerdefault=<expr> -
company_idMany2one → res.companydefault=<expr>required=True args: 'res.company' -
department_idsMany2many → hr.departmentstring='Departments' args: 'hr.department' -
end_dateDaterequired=True -
job_idsMany2many → hr.jobstring='Job Position' args: 'hr.job' -
nameCharrequired=True -
resource_calendar_idMany2one → resource.calendardomain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" args: 'resource.calendar', 'Working Hours' -
start_dateDaterequired=True
No public methods.
-
allocation_idMany2one → hr.leave.allocationreadonly=Truestring='Allocation Request' args: 'hr.leave.allocation' -
company_idMany2one → res.companyreadonly=Truestring='Company' args: 'res.company' -
date_fromDatetimereadonly=True args: 'Start Date' -
date_toDatetimereadonly=True args: 'End Date' -
department_idMany2one → hr.departmentreadonly=Truestring='Department' args: 'hr.department' -
leave_idMany2one → hr.leavereadonly=Truestring='Time Off Request' args: 'hr.leave' -
leave_typeSelectionreadonly=Truestring='Request Type' args: [('allocation', 'Allocation'), ('request', 'Time Off')] -
nameCharreadonly=True args: 'Description' -
number_of_daysFloatreadonly=True args: 'Number of Days' -
number_of_hoursFloatreadonly=True args: 'Number of Hours' -
stateSelectionreadonly=Truestring='Status' args: [('cancel', 'Cancelled'), ('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')] -
work_entry_type_idMany2one → hr.work.entry.typereadonly=Truestring='Time Type' args: 'hr.work.entry.type'
-
action_open_record(self) -
init(self)
-
company_idMany2one → res.companyreadonly=True args: 'res.company' -
department_idMany2one → hr.departmentreadonly=True args: 'hr.department' -
descriptionChargroups='hr_holidays.group_hr_holidays_user'readonly=True args: 'Description' -
durationFloatreadonly=Truestring='Duration' -
duration_displayCharreadonly=Truerelated='leave_id.duration_display' -
employee_idMany2one → hr.employeereadonly=Truerequired=True args: 'hr.employee' -
is_absentBooleanrelated='employee_id.is_absent' -
is_hatchedBooleanreadonly=True args: 'Hatched' -
is_managerBooleancompute='_compute_is_manager' args: 'Manager' -
is_strikedBooleanreadonly=True args: 'Striked' -
job_idMany2one → hr.jobreadonly=True args: 'hr.job' -
leave_idMany2one → hr.leavecomodel_name='hr.leave'groups='hr_holidays.group_hr_holidays_user'readonly=True -
leave_manager_idMany2onerelated='employee_id.leave_manager_id' -
member_of_departmentBooleanrelated='employee_id.member_of_department' -
nameCharcompute='_compute_name'readonly=Truestring='Name' -
request_date_fromDatereadonly=Truestring='Request Start Date' -
request_date_hour_fromDatetimecompute='_compute_request_date_hours'compute_sudo=Truesearch='_search_request_date_hour_from' -
request_date_hour_toDatetimecompute='_compute_request_date_hours'compute_sudo=Truesearch='_search_request_date_hour_to' -
request_date_toDatereadonly=Truestring='Request End Date' -
stateSelectionreadonly=True args: [('cancel', 'Cancelled'), ('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')] -
tzSelectionreadonly=Truestring='Timezone' args: _tz_get -
user_idMany2one → res.usersreadonly=True args: 'res.users' -
work_entry_type_idMany2one → hr.work.entry.typegroups='hr_holidays.group_hr_holidays_user'readonly=Truestring='Time Type' args: 'hr.work.entry.type'
-
action_approve(self) -
action_refuse(self) -
get_unusual_days(self, date_from, date_to=None)@api.model -
init(self)
-
allocation_type_idMany2one → hr.work.entry.typedomain="[('requires_allocation', '=', True), ('time_off_selectable', '=', True), ('id', 'in', country_work_entry_type_ids)]"string='Allocate to' args: 'hr.work.entry.type' -
leave_compensation_rateFloatdefault=0.0help='Leave allocated or taken at this rate of the excess or deficit. 100% = 1:1.' args: 'Allocate %' -
work_entry_type_idMany2onedomain="[('id', 'in', country_work_entry_type_ids), ('requires_allocation', '=', False)]"
No public methods.
-
allocation_idMany2one → hr.leave.allocationindex=Trueondelete='cascade'required=True args: 'hr.leave.allocation' -
daysFloathelp='Net days credited to the allocation from this source record.Positive = excess credit added; negative = deficit deduction applied.'required=True -
res_idMany2oneReferenceindex='btree_not_null'model_field='res_model'required=True args: 'Record' -
res_modelCharindex='btree_not_null'required=True args: 'Model'
No public methods.
No new fields.
Public methods (0)No public methods.
-
allocation_from_working_schedule_idMany2one → hr.leave.allocationcopy=Falsegroups='hr.group_hr_user'string='Allocation from working schedule' args: 'hr.leave.allocation' -
hr_responsible_idMany2onedomain=<expr>
-
create(self, vals_list)@api.model_create_multiCreate versions, moving the time off of the employees to the new working schedules. See the class docstring; also creates the allocation of the working schedule's accrual plan (:meth:`_action_trigger_accrual_plan_working_schedule`). -
write(self, vals)Write on versions, moving the time off when the contract dates or the schedule change. Time off spanning versions with different schedules is split, others get the new schedule. Changing the schedule also preserves the hours of allocations in hours and recreates the working schedule's accrual allocation.
-
allocation_countIntegercompute='_compute_allocation_count'string='Allocations' -
allocation_notif_subtype_idMany2one → mail.message.subtypedefault=<expr>string='Allocation Notification Subtype'tracking=True args: 'mail.message.subtype' -
allocation_validation_typeSelectiondefault='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_topBooleandefault=Falsehelp='If checked, users can request another leave on top of the ones of this type.'string='Allow Request on Top'tracking=True -
allows_negativeBooleanhelp='If checked, users request can exceed the allocated days and balance can go in negative.'string='Allow Negative'tracking=True -
colorIntegerhelp='The color selected here will be used in every screen with the time type.'string='Color' -
count_days_asSelectiondefault='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_codeChardepends=['country_id']readonly=Truerelated='country_id.code' -
country_idMany2one → res.countrydefault=<expr>domain=<expr>string='Country'tracking=True args: 'res.country' -
create_calendar_meetingBooleandefault=Truehelp='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_rateBooleancompute='_compute_eligible_for_accrual_rate'help='If checked, this time type will be taken into account for accruals computation.'readonly=Falsestore=Truestring='Eligible for Accrual Rate'tracking=True -
employee_requestsBooleandefault=Falsehelp='Extra Days Requests Allowed: User can request an allocation for himself.\n\n Not Allowed: User cannot request an allocation.'required=Truestring='Allow Employee Requests'tracking=True -
group_days_leaveFloatcompute='_compute_group_days_leave'string='Group Time Off' -
has_valid_allocationBooleancompute='_compute_valid'help='This indicates if it is still possible to use this type of leave'search='_search_valid' -
hide_on_dashboardBooleandefault=Falsehelp='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_durationBooleandefault=Falsehelp='Public holidays should be counted in the leave duration when applying for leaves'tracking=True args: 'Ignore Public Holidays' -
is_usedBooleancompute='_compute_is_used' -
leave_notif_subtype_idMany2one → mail.message.subtypedefault=<expr>string='Time Off Notification Subtype'tracking=True args: 'mail.message.subtype' -
leave_validation_typeSelectiondefault='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_takenFloatcompute='_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_negativeIntegerhelp='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_leavesFloatcompute='_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_unitSelectiondefault='day'help='Define the minimum time off duration in which an employee can take when requesting a leave'required=Truestring='Duration Type'tracking=True args: [('day', 'Full Day'), ('half_day', 'Half-Day'), ('hour', 'Custom Hours')] -
requires_allocationBooleandefault=Truerequired=Truestring='Requires Allocation'tracking=True -
support_documentBooleanhelp='When enabled, employees will see a notice that this leave type requires a supporting document.'string='Supporting Document Expected'tracking=True -
time_off_selectableBooleandefault=Truestring='Selectable in Time Off'tracking=True -
unit_of_measureSelectiondefault='hour'help='Define if the time type will be allocated/accrued in hours or days'required=Truestring='Unit'tracking=True args: [('hour', 'Hours'), ('day', 'Days')] -
unpaidBooleandefault=Falsetracking=True args: 'Is Unpaid' -
virtual_remaining_leavesFloatcompute='_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'
-
action_see_days_allocated(self) -
action_see_group_leaves(self) -
check_allocation_requirement_edit_validity(self)@api.constrains('requires_allocation')Forbid changing ``requires_allocation`` once requests of the type exist. -
get_allocation_data(self, employees, target_date=None, same_year_only=False)Return the balance of the employees for each type of ``self`` on a date. Sums the data of :meth:`~odoo.addons.hr_holidays.models.hr_employee.HrEmployee._get_consumed_leaves` over the allocations valid on ``target_date``. Amounts are in the ``unit_of_measure`` of the type, rounded to 2 digits. Requests listed in the context key ``ignored_leave_ids`` are ignored. :param employees: ``hr.employee`` records :param target_date: ``date``, ``datetime`` or ISO string, today by default :param bool same_year_only: only count the allocations starting in the year of ``target_date`` and the requests starting that year :return: ``{employee: [(type name, data, requires_allocation, type id), ...]}``, where ``data`` holds ``max_leaves``, ``leaves_taken`` and ``remaining_leaves`` (approved), ``virtual_leaves_taken`` and ``virtual_remaining_leaves`` (also to approve), ``leaves_requested``, ``leaves_approved``, ``accrual_bonus``, ``closest_allocation_expire`` (formatted date), ``closest_allocation_remaining``, ``closest_allocation_duration``, ``holds_changes``, ``total_virtual_excess``, ``virtual_excess_data``, ``exceeding_duration`` and type information (``request_unit``, ``unit_of_measure``, ``allows_negative``, ``max_allowed_negative``, ``color``, ...) :rtype: dict -
get_allocation_data_request(self, target_date=None, hidden_allocations=True, same_year_only=False)@api.modelReturn the balances of the contextual employee for every type. With the context key ``from_dashboard``, types without allocated time are left out. :param target_date: date of the balances, today by default :param bool hidden_allocations: include the types hidden on the dashboard :param bool same_year_only: see :meth:`get_allocation_data` :return: list of tuples, see :meth:`get_allocation_data` :rtype: list -
get_work_entry_types_with_valid_allocations(self, date_from, date_to, employee_id)Return the types of ``self`` the employee can request time off of during a period. Types without allocation always; types requiring an allocation when a validated one covers the whole period and is an accrual or has a positive balance (within the negative cap). :param date_from: first day :param date_to: last day :param int employee_id: employee id :rtype: hr.work.entry.type -
has_accrual_allocation(self)@api.modelTell whether the contextual employee has a validated accrual allocation still running. :rtype: bool -
has_future_allocation(self)@api.modelTell whether the contextual employee has a validated allocation starting in the future. :rtype: bool -
requested_display_name(self)
-
line_idsOne2many → load.public.holiday.wizard.linecompute='_compute_line_ids'readonly=Falsestore=Truestring='Public Holidays' args: 'load.public.holiday.wizard.line', 'wizard_id' -
warning_messageHtmlcompute='_compute_warning_message' -
yearIntegerdefault=<expr>required=True
-
action_add_public_holidays(self)
-
allowed_work_entry_type_idsMany2many → hr.work.entry.typecompute='_compute_work_entry_type'store=True args: 'hr.work.entry.type' -
company_idMany2one → res.companyrequired=True args: 'res.company' -
nameCharrequired=True -
start_dateDaterequired=True -
wizard_idMany2one → load.public.holiday.wizardondelete='cascade'required=True args: 'load.public.holiday.wizard' -
work_entry_type_idMany2one → hr.work.entry.typecompute='_compute_work_entry_type'domain="[('id', 'in', allowed_work_entry_type_ids)]"readonly=Falsestore=Truestring='Time Type' args: 'hr.work.entry.type'
No public methods.
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (2)-
create(self, vals_list)@api.model_create_multi -
write(self, vals)
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (1)-
create(self, vals_list)@api.model_create_multi
No new fields.
Public methods (0)No public methods.
-
leave_date_toDatecompute='_compute_leave_date_to'
No public methods.
-
leave_date_toDate
-
create(self, vals_list)@api.model_create_multi
-
associated_leaves_countIntegercompute='_compute_associated_leaves_count' args: 'Time Off Count' -
leave_accrual_plan_idMany2one → hr.leave.accrual.plancomodel_name='hr.leave.accrual.plan'help=''index='btree_not_null'string='Accrual Plan'
-
action_open_public_holidays(self)
-
elligible_for_accrual_rateBooleandefault=Falsehelp='If checked, this time type will be taken into account for accruals computation.'string='Eligible for Accrual Rate' -
holiday_idMany2one → hr.leavestring='Time Off Request' args: 'hr.leave'
-
create(self, vals_list)@api.model_create_multi -
load_public_holidays(self) -
unlink(self) -
write(self, vals)
-
leave_date_toDaterelated='user_id.leave_date_to'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…