OdooWiki OCA HUB

Payroll Public Holidays

payroll_hr_public_holidays folder_open OCA/payroll open_in_new
Payroll License: AGPL-3

Allows to link hr_holidays_public module with payroll.

With this module installed, public holidats will automatically be fetched and displayed in worked days table for payslip computation. This is useful to countries that need to make salary rules with public holidays data.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Adds public holidays as a worked-days line on payslips, so salary rules can use public holiday days and hours in payroll computation.

When payslips are generated, this module automatically looks up the public holidays that fall inside the payslip period and adds them as an extra worked-days line.

  • The line is labelled "Public Holidays Leaves" and uses the code PHOL.
  • It records the number of public holiday days and the corresponding hours.
  • Hours are calculated using the employee's working calendar hours per day; if the employee has no working calendar, 8 hours per day is used as the default.
  • The public holidays are taken from the public holiday calendar for the employee's contact, and only holidays within the payslip dates are counted.
  • The line is only added when at least one public holiday day is found.
  • The payslip period is adjusted so it never starts before the contract start date.

This affects the hr.payslip model and its worked-days computation. There are no new menus or screens; the result appears in the worked days table of the payslip, where payroll rules can pick up the PHOL code. This is useful for countries whose salary rules need public holiday data.

Depends on

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

Text generated by AI (DeepSeek) from reading the Odoo 18.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: 3 confirmed, 6 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 18.0
  • Set public holidays via the Public Holidays menu provided by calendar_public_holiday (model calendar.public.holiday). This is the source read by this module to produce the PHOL line on payslips.
  • Do not use the Public Holidays menu provided by Odoo standard hr_holidays: it stores entries on resource.calendar.leaves which are not picked up here and produce a generic line on the payslip instead of a PHOL line.
  • Create a payslip: public holidays from calendar.public.holiday are fetched automatically into the worked days table with code PHOL.

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.