Skip to content

Commit c8610e3

Browse files
author
Antoni Marroig Campomar
committed
[ADD] hr_holidays_public_regional: New module hr_holidays_public_regional
1 parent 67abc1e commit c8610e3

31 files changed

Lines changed: 2032 additions & 0 deletions
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
===========================
2+
HR Holidays Public Regional
3+
===========================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:bf25fc19d33af2c0f86e0fbe57aa1132e1bba1d1834a3ab851ef22f9943f1a09
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr--holidays-lightgray.png?logo=github
20+
:target: https://github.com/OCA/hr-holidays/tree/17.0/hr_holidays_public_regional
21+
:alt: OCA/hr-holidays
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/hr-holidays-17-0/hr-holidays-17-0-hr_holidays_public_regional
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/hr-holidays&target_branch=17.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
| This module allows you to manage public regional holidays by defining
32+
them in dedicated calendars and assigning them to employees.
33+
| When enabled on a leave type, public regional holidays linked to the
34+
employee are automatically excluded from the leave duration
35+
calculation by default.
36+
37+
**Table of contents**
38+
39+
.. contents::
40+
:local:
41+
42+
Configuration
43+
=============
44+
45+
Go to *Time Off -> Configuration -> Time Off Types* and open a Leave
46+
Type
47+
48+
- Check "Exclude Public Regional Holidays" to exclude public holidays.
49+
50+
Usage
51+
=====
52+
53+
For adding public regional holidays:
54+
55+
1. Go to the menu *Leaves > Public Holidays > Public Regional Holidays*.
56+
2. Create your public regional holidays.
57+
58+
For using public regional holidays on leaves:
59+
60+
1. Go to *Time Off > Dashboard*.
61+
2. Select dragging on the calendar the days you want to be on leave, or
62+
go to the form view for selecting start and end dates.
63+
3. Select the proper "Leave Type" that has "Exclude Public Regional
64+
Holidays" checked.
65+
4. If no leave type is yet specified, then default configuration is to
66+
exclude public regional holidays.
67+
5. Go to Employees > Select an employee and assign that public regional
68+
holidays
69+
6. The number of days will be computed excluding public regional
70+
holidays that match the selected employee, including global and state
71+
holidays.
72+
73+
In calendar views in HR holiday app public will be display (likes other
74+
unusual days) according the current user employee regional calendar.
75+
76+
- When an employee requests a leave using a leave type with **“Exclude
77+
Public Regional Holidays”** enabled,
78+
the system automatically subtracts any matching regional holidays
79+
(from the assigned calendar) from the leave duration.
80+
- The calculation is based on the employee’s assigned regional calendar
81+
and only considers holidays within the leave period.
82+
- If no regional calendar is assigned to the employee, the leave
83+
duration will be computed normally.
84+
85+
Bug Tracker
86+
===========
87+
88+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr-holidays/issues>`_.
89+
In case of trouble, please check there if your issue has already been reported.
90+
If you spotted it first, help us to smash it by providing a detailed and welcomed
91+
`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**>`_.
92+
93+
Do not contact contributors directly about support or help with technical issues.
94+
95+
Credits
96+
=======
97+
98+
Authors
99+
-------
100+
101+
* APSL-Nagarro
102+
103+
Contributors
104+
------------
105+
106+
- `APSL-Nagarro <https://www.apsl.tech>`__:
107+
108+
- Miquel Alzanillas <malzanillas@apsl.net>
109+
- Antoni Marroig <amarroig@apsl.net>
110+
111+
Maintainers
112+
-----------
113+
114+
This module is maintained by the OCA.
115+
116+
.. image:: https://odoo-community.org/logo.png
117+
:alt: Odoo Community Association
118+
:target: https://odoo-community.org
119+
120+
OCA, or the Odoo Community Association, is a nonprofit organization whose
121+
mission is to support the collaborative development of Odoo features and
122+
promote its widespread use.
123+
124+
.. |maintainer-peluko00| image:: https://github.com/peluko00.png?size=40px
125+
:target: https://github.com/peluko00
126+
:alt: peluko00
127+
.. |maintainer-miquelalzanillas| image:: https://github.com/miquelalzanillas.png?size=40px
128+
:target: https://github.com/miquelalzanillas
129+
:alt: miquelalzanillas
130+
131+
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
132+
133+
|maintainer-peluko00| |maintainer-miquelalzanillas|
134+
135+
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.
136+
137+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from . import models
2+
from . import wizards
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright 2025 APSL-Nagarro Miquel Alzanillas, Antoni Marroig
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
{
4+
"name": "HR Holidays Public Regional",
5+
"summary": """
6+
Manage regional public holidays by assigning dedicated calendars to employees.
7+
Leaves can optionally exclude regional holidays from their duration calculation.
8+
""",
9+
"version": "17.0.1.0.7",
10+
"category": "Human Resources",
11+
"author": "APSL-Nagarro, Odoo Community Association (OCA)",
12+
"website": "https://github.com/OCA/hr-holidays",
13+
"depends": ["hr_holidays_public"],
14+
"data": [
15+
"data/data.xml",
16+
"security/ir.model.access.csv",
17+
"views/hr_employee.xml",
18+
"views/hr_holidays_public_regional.xml",
19+
"views/hr_leave_type.xml",
20+
"wizards/holidays_public_regional_next_year_wizard.xml",
21+
],
22+
"maintainers": ["peluko00", "miquelalzanillas"],
23+
"license": "AGPL-3",
24+
"installable": True,
25+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo>
3+
<!-- Copyright 2025 Miquel Alzanillas, Antoni Marroig (APSL-Nagarro) <malzanillas@apsl.net> <amarroig@apsl.net>
4+
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
5+
<record id="event_type_holiday_regional" model="calendar.event.type">
6+
<field name="name">Regional Holidays</field>
7+
</record>
8+
</odoo>

0 commit comments

Comments
 (0)