Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 137 additions & 0 deletions hr_holidays_public_regional/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
===========================
HR Holidays Public Regional
===========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:bf25fc19d33af2c0f86e0fbe57aa1132e1bba1d1834a3ab851ef22f9943f1a09
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr--holidays-lightgray.png?logo=github
:target: https://github.com/OCA/hr-holidays/tree/17.0/hr_holidays_public_regional
:alt: OCA/hr-holidays
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/hr-holidays-17-0/hr-holidays-17-0-hr_holidays_public_regional
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/hr-holidays&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

| This module allows you to manage public regional holidays by defining
them in dedicated calendars and assigning them to employees.
| When enabled on a leave type, public regional holidays linked to the
employee are automatically excluded from the leave duration
calculation by default.

**Table of contents**

.. contents::
:local:

Configuration
=============

Go to *Time Off -> Configuration -> Time Off Types* and open a Leave
Type

- Check "Exclude Public Regional Holidays" to exclude public holidays.

Usage
=====

For adding public regional holidays:

1. Go to the menu *Leaves > Public Holidays > Public Regional Holidays*.
2. Create your public regional holidays.

For using public regional holidays on leaves:

1. Go to *Time Off > Dashboard*.
2. Select dragging on the calendar the days you want to be on leave, or
go to the form view for selecting start and end dates.
3. Select the proper "Leave Type" that has "Exclude Public Regional
Holidays" checked.
4. If no leave type is yet specified, then default configuration is to
exclude public regional holidays.
5. Go to Employees > Select an employee and assign that public regional
holidays
6. The number of days will be computed excluding public regional
holidays that match the selected employee, including global and state
holidays.

In calendar views in HR holiday app public will be display (likes other
unusual days) according the current user employee regional calendar.

- When an employee requests a leave using a leave type with **“Exclude
Public Regional Holidays”** enabled,
the system automatically subtracts any matching regional holidays
(from the assigned calendar) from the leave duration.
- The calculation is based on the employee’s assigned regional calendar
and only considers holidays within the leave period.
- If no regional calendar is assigned to the employee, the leave
duration will be computed normally.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr-holidays/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/hr-holidays/issues/new?body=module:%20hr_holidays_public_regional%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* APSL-Nagarro

Contributors
------------

- `APSL-Nagarro <https://www.apsl.tech>`__:

- Miquel Alzanillas <malzanillas@apsl.net>
- Antoni Marroig <amarroig@apsl.net>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-peluko00| image:: https://github.com/peluko00.png?size=40px
:target: https://github.com/peluko00
:alt: peluko00
.. |maintainer-miquelalzanillas| image:: https://github.com/miquelalzanillas.png?size=40px
:target: https://github.com/miquelalzanillas
:alt: miquelalzanillas

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-peluko00| |maintainer-miquelalzanillas|

This module is part of the `OCA/hr-holidays <https://github.com/OCA/hr-holidays/tree/17.0/hr_holidays_public_regional>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions hr_holidays_public_regional/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizards
25 changes: 25 additions & 0 deletions hr_holidays_public_regional/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2025 APSL-Nagarro Miquel Alzanillas, Antoni Marroig
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "HR Holidays Public Regional",
"summary": """
Manage regional public holidays by assigning dedicated calendars to employees.
Leaves can optionally exclude regional holidays from their duration calculation.
""",
"version": "17.0.1.0.0",
"category": "Human Resources",
"author": "APSL-Nagarro, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/hr-holidays",
"depends": ["hr_holidays_public"],
"data": [
"data/data.xml",
"security/ir.model.access.csv",
"views/hr_employee.xml",
"views/hr_holidays_public_regional.xml",
"views/hr_leave_type.xml",
"wizards/holidays_public_regional_next_year_wizard.xml",
],
"maintainers": ["peluko00", "miquelalzanillas"],
"license": "AGPL-3",
"installable": True,
}
8 changes: 8 additions & 0 deletions hr_holidays_public_regional/data/data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Copyright 2025 Miquel Alzanillas, Antoni Marroig (APSL-Nagarro) <malzanillas@apsl.net> <amarroig@apsl.net>
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<record id="event_type_holiday_regional" model="calendar.event.type">
<field name="name">Regional Holidays</field>
</record>
</odoo>
Loading