hr.leave: fields, relations and API
The hr.leave model ("Time Off") is a persistent model declared by the Time Off module, then extended by 4 other modules. It exposes 86 fields, 55 of them declared directly on the model; 7 fields from other models point to it. Below you will find every field with its technical name, type, label and relations, followed by an Odoo 19 JSON-2 API call.
Model identity
- Technical name
hr.leave- Label
- Time Off
- Type
- Persistent (models.Model)
- SQL table
hr_leave- Origin module
- Time Off (
hr_holidays) - Extended by
- hr_holidays_attendance, hr_work_entry_holidays, l10n_fr_hr_holidays, project_timesheet_holidays
- Default order (_order)
date_from desc- Inherits from (mixins)
- mail.thread.main.attachmentmail.activity.mixin
Model fields
55 own fields, 25 inherited from mixins and 6 automatic ORM fields. Click a name to get a direct link to that field.
86 of 86 fields shown
| Technical name | Label | Type | Details |
|---|---|---|---|
| active_employee | Employee Active | boolean | related: |
| attachment_ids | Attachments | one2many | inverse: |
| can_approve | Can Approve | boolean | computed |
| can_back_to_approve | Can Back To Approve | boolean | computed |
| can_cancel | Can Cancel | boolean | computed |
| can_refuse | Can Refuse | boolean | computed |
| can_validate | Can Validate | boolean | computed |
| color | Color | integer | related: |
| company_id | Company | many2one | computed, stored |
| dashboard_warning_message | Dashboard Warning Message | char | computed |
| date_from | Start Date | datetime | computed, stored |
| date_to | End Date | datetime | computed, stored |
| department_id | Department | many2one | computed, stored |
| duration_display | Requested | char | computed, stored |
| employee_company_id | Employee Company | many2one | related: |
| employee_id | Employee | many2one | required |
| employee_overtime | Employee Overtime | float | computed added by HR Attendance Holidays ( |
| first_approver_id | First Approval This area is automatically filled by the user who validate the time off | many2one | read-only |
| has_mandatory_day | Has Mandatory Day | boolean | computed |
| holiday_status_id | Time Off Type | many2one | requiredcomputed, stored |
| holiday_status_requires_allocation | Holiday Status Requires Allocation | boolean | related: |
| is_hatched | Hatched | boolean | computed |
| is_striked | Striked | boolean | computed |
| l10n_fr_date_to_changed | L10N Fr Date To Changed | boolean | added by France - Time Off ( |
| last_several_days | All day | boolean | computed |
| leave_type_increases_duration | Leave Type Increases Duration | char | computed |
| leave_type_request_unit | Leave Type Request Unit | selection | read-only related: |
| leave_type_support_document | Leave Type Support Document | boolean | related: |
| max_leaves | Max Leaves | float | computed |
| meeting_id | Meeting | many2one | |
| name | Description | char | computed |
| notes | Reasons | text | |
| number_of_days | Duration (Days) Number of days of the time off request. Used in the calculation. | float | computed, stored |
| number_of_hours | Duration (Hours) Number of hours of the time off request. Used in the calculation. | float | computed, stored |
| overtime_deductible | Overtime Deductible | boolean | computed added by HR Attendance Holidays ( |
| private_name | Time Off Description | char | |
| request_date_from | Request Start Date | date | |
| request_date_from_period | Date Period Start | selection | Values: |
| request_date_to | Request End Date | date | |
| request_date_to_period | Date Period End | selection | Values: |
| request_hour_from | Hour from | float | computed, stored |
| request_hour_to | Hour to | float | computed, stored |
| request_unit_half | Half-Day | boolean | computed, stored |
| request_unit_hours | Specific Time | boolean | computed, stored |
| resource_calendar_id | Resource Calendar | many2one | computed, stored |
| second_approver_id | Second Approval This area is automatically filled by the user who validate the time off with second level (If time off type need second validation) | many2one | read-only |
| state | Status | selection | Values: |
| supported_attachment_ids | Attach File | many2many | computed |
| supported_attachment_ids_count | Supported Attachment Ids Count | integer | computed |
| timesheet_ids | Analytic Lines | one2many | inverse: added by Timesheet when on Time Off ( |
| tz | Tz | selection | computed Values computed at runtime |
| tz_mismatch | Tz Mismatch | boolean | computed |
| user_id | User | many2one | read-only related: |
| validation_type | Validation Type | selection | related: |
| virtual_remaining_leaves | Available Time Off | float | computed |
| activity_calendar_event_id | Next Activity Calendar Event | many2one | computed inherited from mail.activity.mixin |
| activity_date_deadline | Next Activity Deadline | date | read-onlycomputed inherited from mail.activity.mixin |
| activity_exception_decoration | Activity Exception Decoration Type of the exception activity on record. | selection | computed Values: inherited from mail.activity.mixin |
| activity_exception_icon | Icon Icon to indicate an exception activity. | char | computed inherited from mail.activity.mixin |
| activity_ids | Activities | one2many | inverse: inherited from mail.activity.mixin |
| activity_state | Activity State Status based on activities Overdue: Due date is already passed Today: Activity date is today Planned: Future activities. | selection | computed Values: inherited from mail.activity.mixin |
| activity_summary | Next Activity Summary | char | related: inherited from mail.activity.mixin |
| activity_type_icon | Activity Type Icon | char | related: inherited from mail.activity.mixin |
| activity_type_id | Next Activity Type | many2one | related: inherited from mail.activity.mixin |
| activity_user_id | Responsible User | many2one | read-onlycomputed inherited from mail.activity.mixin |
| has_message | Has Message | boolean | computed inherited from mail.thread |
| message_attachment_count | Attachment Count | integer | computed inherited from mail.thread |
| message_follower_ids | Followers | one2many | inverse: inherited from mail.thread |
| message_has_error | Message Delivery error If checked, some messages have a delivery error. | boolean | computed inherited from mail.thread |
| message_has_error_counter | Number of errors Number of messages with delivery error | integer | computed inherited from mail.thread |
| message_has_sms_error | SMS Delivery error If checked, some messages have a delivery error. | boolean | computed inherited from mail.thread |
| message_ids | Messages | one2many | inverse: inherited from mail.thread |
| message_is_follower | Is Follower | boolean | computed inherited from mail.thread |
| message_main_attachment_id | Main Attachment | many2one | inherited from mail.thread.main.attachment |
| message_needaction | Action Needed If checked, new messages require your attention. | boolean | computed inherited from mail.thread |
| message_needaction_counter | Number of Actions Number of messages requiring action | integer | computed inherited from mail.thread |
| message_partner_ids | Followers (Partners) | many2many | computed inherited from mail.thread |
| my_activity_date_deadline | My Activity Deadline | date | read-onlycomputed inherited from mail.activity.mixin |
| rating_ids | Ratings | one2many | inverse: inherited from mail.thread |
| website_message_ids | Website Messages Website communication history | one2many | inverse: inherited from mail.thread |
| create_date | Created on | datetime | read-onlyautomatic |
| create_uid | Created by | many2one | read-onlyautomatic |
| display_name | Display Name | char | read-onlycomputedautomatic |
| id | ID | integer | read-onlyautomatic |
| write_date | Last Updated on | datetime | read-onlyautomatic |
| write_uid | Last Updated by | many2one | read-onlyautomatic |
Relations
Models linked from this model
- account.analytic.line: timesheet_ids
- calendar.event: meeting_id
- hr.department: department_id
- hr.employee: employee_id, first_approver_id, second_approver_id
- hr.leave.type: holiday_status_id
- ir.attachment: attachment_ids, supported_attachment_ids
- res.company: company_id, employee_company_id
- res.users: user_id
- resource.calendar: resource_calendar_id
Fields of other models pointing here
- account.analytic.line: holiday_id
- hr.holidays.cancel.leave: leave_id
- hr.leave.attendance.report: leave_ids
- hr.leave.report: leave_id
- hr.leave.report.calendar: leave_id
- hr.work.entry: leave_id
- resource.calendar.leaves: holiday_id
Reading this model through the API
Odoo 19 JSON-2 API call reading the first five records with real fields of the model. Replace the instance, database and API key with your own.
curl -X POST "https://your-instance.odoo.com/json/2/hr.leave/search_read" \
-H "Authorization: bearer $ODOO_API_KEY" \
-H "X-Odoo-Database: your-db" \
-H "Content-Type: application/json" \
-d '{"domain":[],"fields":["name","employee_id","holiday_status_id","state","company_id"],"limit":5}'import requests
BASE_URL = "https://your-instance.odoo.com/json/2"
headers = {"Authorization": f"bearer {API_KEY}", "X-Odoo-Database": "your-db"}
res = requests.post(
f"{BASE_URL}/hr.leave/search_read",
headers=headers,
json={"domain": [], "fields": ["name","employee_id","holiday_status_id","state","company_id"], "limit": 5},
)
res.raise_for_status()
print(res.json())- External API access requires Odoo's Custom plan.
- XML-RPC and JSON-RPC will be removed in Odoo 22 (fall 2028): use JSON-2.
- The access rights and record rules of the key's user apply.
Cite this tool
Writing a tutorial, internal documentation or a forum answer? Copy this link to send your readers to the up-to-date reference.
<a href="https://aidoo.ai/en/outils/explorateur-modeles-odoo/hr-leave">hr.leave (Odoo 19.0)</a>Sources
Data verified on September 23, 2026 · Odoo 19.0 Community
Have an Odoo project, or want to put your ERP to work with AI? Let's talk
Implementation, custom module development, connecting Claude or ChatGPT to your data: tell us about your context and we will reply within 24 business hours.