Odoo 19.0 Community · Persistent

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 nameLabelTypeDetails
active_employeeEmployee Activeboolean

related: employee_id.active

attachment_idsAttachmentsone2many

inverse: res_id

can_approveCan Approveboolean
computed
can_back_to_approveCan Back To Approveboolean
computed
can_cancelCan Cancelboolean
computed
can_refuseCan Refuseboolean
computed
can_validateCan Validateboolean
computed
colorColorinteger

related: holiday_status_id.color

company_idCompanymany2one
computed, stored
dashboard_warning_messageDashboard Warning Messagechar
computed
date_fromStart Datedatetime
computed, stored
date_toEnd Datedatetime
computed, stored
department_idDepartmentmany2one
computed, stored
duration_displayRequestedchar
computed, stored
employee_company_idEmployee Companymany2one

related: employee_id.company_id

employee_idEmployeemany2one
required
employee_overtimeEmployee Overtimefloat
computed

added by HR Attendance Holidays (hr_holidays_attendance)

first_approver_idFirst Approval

This area is automatically filled by the user who validate the time off

many2one
read-only
has_mandatory_dayHas Mandatory Dayboolean
computed
holiday_status_idTime Off Typemany2one
requiredcomputed, stored
holiday_status_requires_allocationHoliday Status Requires Allocationboolean

related: holiday_status_id.requires_allocation

is_hatchedHatchedboolean
computed
is_strikedStrikedboolean
computed
l10n_fr_date_to_changedL10N Fr Date To Changedboolean

added by France - Time Off (l10n_fr_hr_holidays)

last_several_daysAll dayboolean
computed
leave_type_increases_durationLeave Type Increases Durationchar
computed
leave_type_request_unitLeave Type Request Unitselection
read-only

related: holiday_status_id.request_unit

leave_type_support_documentLeave Type Support Documentboolean

related: holiday_status_id.support_document

max_leavesMax Leavesfloat
computed
meeting_idMeetingmany2one
nameDescriptionchar
computed
notesReasonstext
number_of_daysDuration (Days)

Number of days of the time off request. Used in the calculation.

float
computed, stored
number_of_hoursDuration (Hours)

Number of hours of the time off request. Used in the calculation.

float
computed, stored
overtime_deductibleOvertime Deductibleboolean
computed

added by HR Attendance Holidays (hr_holidays_attendance)

private_nameTime Off Descriptionchar
request_date_fromRequest Start Datedate
request_date_from_periodDate Period Startselection

Values: am (Morning), pm (Afternoon)

request_date_toRequest End Datedate
request_date_to_periodDate Period Endselection

Values: am (Morning), pm (Afternoon)

request_hour_fromHour fromfloat
computed, stored
request_hour_toHour tofloat
computed, stored
request_unit_halfHalf-Dayboolean
computed, stored
request_unit_hoursSpecific Timeboolean
computed, stored
resource_calendar_idResource Calendarmany2one
computed, stored
second_approver_idSecond 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
stateStatusselection

Values: confirm (To Approve), refuse (Refused), validate1 (Second Approval), validate (Approved), cancel (Cancelled)

supported_attachment_idsAttach Filemany2many
computed
supported_attachment_ids_countSupported Attachment Ids Countinteger
computed
timesheet_idsAnalytic Linesone2many

inverse: holiday_id

added by Timesheet when on Time Off (project_timesheet_holidays)

tzTzselection
computed

Values computed at runtime

tz_mismatchTz Mismatchboolean
computed
user_idUsermany2one
read-only

related: employee_id.user_id

validation_typeValidation Typeselection

related: holiday_status_id.leave_validation_type

virtual_remaining_leavesAvailable Time Offfloat
computed
activity_calendar_event_idNext Activity Calendar Eventmany2one
computed

inherited from mail.activity.mixin

activity_date_deadlineNext Activity Deadlinedate
read-onlycomputed

inherited from mail.activity.mixin

activity_exception_decorationActivity Exception Decoration

Type of the exception activity on record.

selection
computed

Values: warning (Alert), danger (Error)

inherited from mail.activity.mixin

activity_exception_iconIcon

Icon to indicate an exception activity.

char
computed

inherited from mail.activity.mixin

activity_idsActivitiesone2many

inverse: res_id

inherited from mail.activity.mixin

activity_stateActivity State

Status based on activities Overdue: Due date is already passed Today: Activity date is today Planned: Future activities.

selection
computed

Values: overdue (Overdue), today (Today), planned (Planned)

inherited from mail.activity.mixin

activity_summaryNext Activity Summarychar

related: activity_ids.summary

inherited from mail.activity.mixin

activity_type_iconActivity Type Iconchar

related: activity_ids.icon

inherited from mail.activity.mixin

activity_type_idNext Activity Typemany2one

related: activity_ids.activity_type_id

inherited from mail.activity.mixin

activity_user_idResponsible Usermany2one
read-onlycomputed

inherited from mail.activity.mixin

has_messageHas Messageboolean
computed

inherited from mail.thread

message_attachment_countAttachment Countinteger
computed

inherited from mail.thread

message_follower_idsFollowersone2many

inverse: res_id

inherited from mail.thread

message_has_errorMessage Delivery error

If checked, some messages have a delivery error.

boolean
computed

inherited from mail.thread

message_has_error_counterNumber of errors

Number of messages with delivery error

integer
computed

inherited from mail.thread

message_has_sms_errorSMS Delivery error

If checked, some messages have a delivery error.

boolean
computed

inherited from mail.thread

message_idsMessagesone2many

inverse: res_id

inherited from mail.thread

message_is_followerIs Followerboolean
computed

inherited from mail.thread

message_main_attachment_idMain Attachmentmany2one

inherited from mail.thread.main.attachment

message_needactionAction Needed

If checked, new messages require your attention.

boolean
computed

inherited from mail.thread

message_needaction_counterNumber of Actions

Number of messages requiring action

integer
computed

inherited from mail.thread

message_partner_idsFollowers (Partners)many2many
computed

inherited from mail.thread

my_activity_date_deadlineMy Activity Deadlinedate
read-onlycomputed

inherited from mail.activity.mixin

rating_idsRatingsone2many

inverse: res_id

inherited from mail.thread

website_message_idsWebsite Messages

Website communication history

one2many

inverse: res_id

inherited from mail.thread

create_dateCreated ondatetime
read-onlyautomatic
create_uidCreated bymany2one
read-onlyautomatic
display_nameDisplay Namechar
read-onlycomputedautomatic
idIDinteger
read-onlyautomatic
write_dateLast Updated ondatetime
read-onlyautomatic
write_uidLast Updated bymany2one
read-onlyautomatic

Relations

Models linked from this model

Fields of other models pointing here

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
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}'
Python (requests)
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.