OdooWiki OCA HUB

HR Leave Type Code

hr_leave_type_code folder_open OCA/hr-holidays open_in_new
Human Resources License: AGPL-3

This module adds a code field on leave types.

Additionally, the display name of leave types is calculated as "CODE - Name" if the leave type has a code.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Adds a short code to each leave type and shows it before the leave type name, so leave types are easier to identify and report on.

This module extends the leave types used in the Time Off / Leave application. On each leave type you can now fill in a short code.

  • The code is entered on the leave type form, right under the name.
  • The code is also available in the leave type list view (hidden by default, can be shown) and in the leave type search filters.
  • In the kanban view of leave types, the code is displayed in front of the name, separated by a dash.
  • When a leave type has a code, its display name becomes "CODE - Name" everywhere it is shown; if no code is set, only the name is used.
  • A code must be unique within the same company: Odoo blocks saving a duplicate code for the same company with the message "The code must be unique per company!".

The module only touches the hr.leave.type model and its existing views; it does not change leave requests, balances or approval rules.

Depends on

hr_holidays
Models and fields (1)
  • hr.leave.type · extends an existing modelcode

Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 16.0

Confirmed on 2026-11-03 in branch 16.0 of OCA/hr-holidays.

terminal Installation and usage

OCA documentation · Odoo 16.0
  • Navigate to Time Off > Configuration > Time Off Types.
  • Select a leave
  • Add a code

No verified information in OCA: Installation, Configuration.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.