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 name | Label | Type | Details |
|---|---|---|---|
| accrual_count | Accruals count | float | computed |
| accruals_ids | Accruals | one2many | inverse: |
| active | Active If the active field is set to false, it will allow you to hide the time off type without removing it. | boolean | |
| allocation_count | Allocations | integer | computed |
| allocation_notif_subtype_id | Allocation Notification Subtype | many2one | |
| allocation_validation_type | Approval 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: |
| allow_request_on_top | Allow Request on Top If checked, users can request another leave on top of the ones of this type. | boolean | |
| allows_negative | Allow Negative Cap If checked, users request can exceed the allocated days and balance can go in negative. | boolean | |
| color | Color The color selected here will be used in every screen with the time off type. | integer | |
| company_id | Company | many2one | |
| country_code | Country Code | char | read-only related: |
| country_id | Country | many2one | computed, stored |
| create_calendar_meeting | Display 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_rate | Eligible for Accrual Rate If checked, this time off type will be taken into account for accruals computation. | boolean | computed, stored |
| employee_requests | Allow Employee Requests Extra Days Requests Allowed: User can request an allocation for himself. Not Allowed: User cannot request an allocation. | boolean | required |
| group_days_leave | Group Time Off | float | computed |
| has_valid_allocation | Has Valid Allocation This indicates if it is still possible to use this type of leave | boolean | computed |
| hide_on_dashboard | Hide 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_id | Cover Image | many2one | |
| include_public_holidays_in_duration | Ignore Public Holidays Public holidays should be counted in the leave duration when applying for leaves | boolean | |
| is_used | Is Used | boolean | computed |
| leave_notif_subtype_id | Time Off Notification Subtype | many2one | |
| leave_validation_type | Time Off Validation | selection | Values: |
| leaves_taken | Time off Already Taken This value is given by the sum of all time off requests with a negative value. | float | computed |
| max_allowed_negative | Maximum Excess Amount Define the maximum level of negative days this kind of time off can reach. Value must be at least 1. | integer | |
| max_leaves | Maximum Allowed This value is given by the sum of all time off requests with a positive value. | float | computed |
| name | Time Off Type | char | requiredtranslatable |
| overtime_deductible | Deduct Extra Hours Once a time off of this type is approved, extra hours in attendances will be deducted. | boolean | added by HR Attendance Holidays ( |
| request_unit | Duration Type | selection | required Values: |
| requires_allocation | Requires allocation | boolean | required |
| responsible_ids | Notify HR Choose the Time Off Officers who will be notified to approve allocation or Time Off Request. If empty, nobody will be notified | many2many | |
| sequence | Sequence The type with the smallest sequence is the default value in time off request | integer | |
| support_document | Supporting Document | boolean | |
| time_type | Kind 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: |
| unpaid | Is Unpaid | boolean | |
| virtual_remaining_leaves | Virtual Remaining Time Off Maximum Time Off Allowed - Time Off Already Taken - Time Off Waiting Approval | float | computed |
| work_entry_type_id | Work Entry Type | many2one | added by Time Off in Payslips ( |
| 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
- hr.leave.accrual.plan: accruals_ids
- hr.work.entry.type: work_entry_type_id
- ir.attachment: icon_id
- mail.message.subtype: allocation_notif_subtype_id, leave_notif_subtype_id
- res.company: company_id
- res.country: country_id
- res.users: responsible_ids
Fields of other models pointing here
- hr.employee: current_leave_id
- hr.leave: holiday_status_id
- hr.leave.accrual.plan: time_off_type_id
- hr.leave.allocation: holiday_status_id
- hr.leave.allocation.generate.multi.wizard: holiday_status_id
- hr.leave.employee.type.report: leave_type
- hr.leave.generate.multi.wizard: holiday_status_id
- hr.leave.report: holiday_status_id
- hr.leave.report.calendar: holiday_status_id
- res.company: l10n_fr_reference_leave_type
- res.config.settings: l10n_fr_reference_leave_type
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.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}'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.