Odoo 19.0 Community · Persistent

hr.leave.type: fields, relations and API

The hr.leave.type model ("Time Off Type") is a persistent model declared by the Time Off module, then extended by 2 other modules. It exposes 43 fields, 37 of them declared directly on the model; 11 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.type
Label
Time Off Type
Type
Persistent (models.Model)
SQL table
hr_leave_type
Origin module
Time Off (hr_holidays)
Extended by
hr_holidays_attendance, hr_work_entry_holidays
Default order (_order)
sequence

Model fields

37 own fields, 0 inherited from mixins and 6 automatic ORM fields. Click a name to get a direct link to that field.

43 of 43 fields shown

Technical nameLabelTypeDetails
accrual_countAccruals countfloat
computed
accruals_idsAccrualsone2many

inverse: time_off_type_id

activeActive

If the active field is set to false, it will allow you to hide the time off type without removing it.

boolean
allocation_countAllocationsinteger
computed
allocation_notif_subtype_idAllocation Notification Subtypemany2one
allocation_validation_typeApproval

Select the level of approval needed in case of request by employee # - No validation needed: The employee's request is automatically approved. # - Approved by Time Off Officer: The employee's request need to be manually approved # by the Time Off Officer, Employee's Approver or both.

selection

Values: no_validation (None needed), hr (By Time Off Officer), manager (By Employee's Approver), both (By Employee's Approver and Time Off Officer)

allow_request_on_topAllow Request on Top

If checked, users can request another leave on top of the ones of this type.

boolean
allows_negativeAllow Negative Cap

If checked, users request can exceed the allocated days and balance can go in negative.

boolean
colorColor

The color selected here will be used in every screen with the time off type.

integer
company_idCompanymany2one
country_codeCountry Codechar
read-only

related: country_id.code

country_idCountrymany2one
computed, stored
create_calendar_meetingDisplay Time Off in Calendar

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.

boolean
elligible_for_accrual_rateEligible for Accrual Rate

If checked, this time off type will be taken into account for accruals computation.

boolean
computed, stored
employee_requestsAllow Employee Requests

Extra Days Requests Allowed: User can request an allocation for himself. Not Allowed: User cannot request an allocation.

boolean
required
group_days_leaveGroup Time Offfloat
computed
has_valid_allocationHas Valid Allocation

This indicates if it is still possible to use this type of leave

boolean
computed
hide_on_dashboardHide On Dashboard

Non-visible allocations can still be selected when taking a leave, but will simply not be displayed on the leave dashboard.

boolean
icon_idCover Imagemany2one
include_public_holidays_in_durationIgnore Public Holidays

Public holidays should be counted in the leave duration when applying for leaves

boolean
is_usedIs Usedboolean
computed
leave_notif_subtype_idTime Off Notification Subtypemany2one
leave_validation_typeTime Off Validationselection

Values: no_validation (None needed), hr (By Time Off Officer), manager (By Employee's Approver), both (By Employee's Approver and Time Off Officer)

leaves_takenTime off Already Taken

This value is given by the sum of all time off requests with a negative value.

float
computed
max_allowed_negativeMaximum Excess Amount

Define the maximum level of negative days this kind of time off can reach. Value must be at least 1.

integer
max_leavesMaximum Allowed

This value is given by the sum of all time off requests with a positive value.

float
computed
nameTime Off Typechar
requiredtranslatable
overtime_deductibleDeduct Extra Hours

Once a time off of this type is approved, extra hours in attendances will be deducted.

boolean

added by HR Attendance Holidays (hr_holidays_attendance)

request_unitDuration Typeselection
required

Values: day (Day), half_day (Half-Day), hour (Hours)

requires_allocationRequires allocationboolean
required
responsible_idsNotify HR

Choose the Time Off Officers who will be notified to approve allocation or Time Off Request. If empty, nobody will be notified

many2many
sequenceSequence

The type with the smallest sequence is the default value in time off request

integer
support_documentSupporting Documentboolean
time_typeKind of Time Off

The distinction between working time (ex. Attendance) and absence (ex. Training) will be used in the computation of Accrual's plan rate.

selection

Values: other (Worked Time), leave (Absence)

unpaidIs Unpaidboolean
virtual_remaining_leavesVirtual Remaining Time Off

Maximum Time Off Allowed - Time Off Already Taken - Time Off Waiting Approval

float
computed
work_entry_type_idWork Entry Typemany2one

added by Time Off in Payslips (hr_work_entry_holidays)

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.type/search_read" \
  -H "Authorization: bearer $ODOO_API_KEY" \
  -H "X-Odoo-Database: your-db" \
  -H "Content-Type: application/json" \
  -d '{"domain":[],"fields":["name","employee_requests","request_unit","requires_allocation","allocation_notif_subtype_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.type/search_read",
    headers=headers,
    json={"domain": [], "fields": ["name","employee_requests","request_unit","requires_allocation","allocation_notif_subtype_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-type">hr.leave.type (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.