OdooWiki OCA HUB

Leaves: length validation

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

This module allows leave's amount of time validation to handle cases when changes to Resource Calendar (e.g. Global Leaves or Timezone) may change computed length.

auto_awesome What this module does

AI-generated from the code · Odoo 12.0

Adds a 'Validate Length' action on leave requests that checks whether the stored number of days still matches the employee's working calendar, and blocks validation when it is outdated.

This module extends the standard Leave Requests feature in Odoo. It adds a server action called 'Validate Length' that appears on leave records (for example from the list or form view action menu).

When you run it, Odoo recalculates how many working days each selected leave should really last, based on the employee's working calendar and excluding the leave itself. It then compares that recalculated value with the number of days already stored on the leave.

If any selected leave has an outdated length, Odoo stops the action and shows an error message listing the affected leaves, including the leave type, the leave reference (if any), the employee name and the stored number of days. This is useful when changes to a resource calendar, such as global leaves or timezone settings, may have changed the real length of a leave after it was created.

If all selected leaves still match, the action completes without any message. The module only touches the hr.leave model and does not add new fields, menus or reports of its own.

Depends on

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

Text generated by AI (DeepSeek) from reading the Odoo 12.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.

terminal Installation and usage

OCA documentation · Odoo 12.0

To validate length of requested leaves:

  • Go to Leaves > Managers > All > Leaves.
  • Select leaves of interest and perform Action > Validate Length.

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.