Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] hr_holidays_public: Migration to 18.0 #147

Open
wants to merge 76 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
eb615ee
Update hr public holidays code to 11.
Nov 12, 2017
7b61243
[FIX] hr_holidays_public: Review comments
MiquelRForgeFlow Jul 10, 2018
a24e14d
[FIX+IMP] hr_holidays_public: Strip hours part + complete migration
pedrobaeza Sep 2, 2018
555e727
[IMP] hr_holidays_public: Leave only public holidays computation
pedrobaeza Sep 3, 2018
aa7121d
[MIG] hr_holidays_compute_days: Adapt to 11.0 + minimize
pedrobaeza Sep 3, 2018
bb7d7d6
Translated using Weblate (German)
marylla Dec 17, 2018
fa3ff5d
[MIG] hr_holidays_public: Migration to 12.0
alexey-pelykh Dec 22, 2018
6a3a1e8
Translated using Weblate (Spanish)
mvrodriguez Feb 8, 2019
946dd2c
Translated using Weblate (French)
May 23, 2019
05e7c3a
Translated using Weblate (Spanish)
Jun 26, 2019
699ee5e
Translated using Weblate (German)
marylla Jun 28, 2019
eb6cf6b
Translated using Weblate (Spanish)
Jul 23, 2019
753280a
FIX: fix leave number days when requested across years and public hol…
damdam-s Sep 18, 2019
b16afa3
hr_holidays_public 12.0.1.0.1
OCA-git-bot Sep 19, 2019
3a52a71
[12.0][FIX] hr_holiday_public: Fix method return for concatenation
p-tombez Oct 4, 2019
b85f734
[FIX] hr_holiday_public: Delete holidays public
Oct 9, 2019
25a2108
Translated using Weblate (Portuguese (Brazil))
Nov 24, 2019
0cd3d71
[IMP] hr_holidays_public: black, isort
ernestotejeda Dec 26, 2019
2d6ba9d
[MIG] hr_holidays_public: Migration to 13.0
ernestotejeda Dec 26, 2019
694a59f
[FIX] hr_public_holidays: add tz argument in _work_intervals
MiquelRForgeFlow Feb 10, 2020
7ae0560
hr_holidays_public 13.0.1.0.1
OCA-git-bot Feb 10, 2020
8ee8522
[FIX] hr_holidays_public: Adapt to odoo/odoo#51542
pedrobaeza Aug 28, 2020
5bea11c
[UPD] Brainbean Apps => CorporateHub
alexey-pelykh Nov 4, 2020
27cf57e
[IMP] hr_holidays_public: Create global calendar.event
ivantodorovich Jan 21, 2020
cb64815
[IMP] Update categ_ids only if available
ivantodorovich Feb 11, 2020
47400ea
hr_holidays_public 13.0.3.0.0
OCA-git-bot Nov 30, 2020
5ced553
[IMP] hr_holidays_public: black, isort, prettier
dsolanki-initos Dec 30, 2020
9e47007
Add fix #20 to 14.0
fshah-initos Jan 25, 2021
705017d
[14.0][MIG] hr_holidays_public
dsolanki-initos Dec 30, 2020
1e4aa40
Added translation using Weblate (French (France))
Yvesldff Apr 11, 2021
6de6290
Translated using Weblate (French (France))
Yvesldff Apr 11, 2021
b8729dc
[FIX] hr_holidays_public: Fix number_of_days in leaves when contain h…
victoralmau Apr 14, 2021
1a3b735
hr_holidays_public 14.0.1.0.1
OCA-git-bot Apr 21, 2021
cc8ffe4
[FIX] hr_holidays_public: Prevent error in leave form without employe…
victoralmau Apr 22, 2021
01d33ce
hr_holidays_public 14.0.1.0.2
OCA-git-bot Apr 26, 2021
5945f33
Translated using Weblate (French)
Yvesldff May 14, 2021
ecf1753
[14.0] hr_holidays_public: add public holidays as unusual days
petrus-v Sep 29, 2021
ceeffdd
[14.0] hr_holidays_public: filter public holiday by the current logge…
petrus-v Sep 29, 2021
a91418f
Update hr_holidays_public/readme/DESCRIPTION.rst
petrus-v Sep 29, 2021
40ad1a8
[14.0] hr_holidays_public: filter public holiday by the current logge…
petrus-v Sep 29, 2021
1d0d975
fix using wrong variable name + improve coverage
petrus-v Sep 29, 2021
4e32d15
hr_holidays_public 14.0.2.0.0
OCA-git-bot Oct 8, 2021
7dd24a9
Set exclude_public_holidays employee_id context on _compute_number_of…
santostelmo Nov 30, 2021
e00ea17
hr_holidays_public 14.0.2.0.1
OCA-git-bot Nov 30, 2021
8bd771e
[FIX] hr_holidays_public: Being multi-record aware in _compute_number…
pedrobaeza Dec 2, 2021
a4f3bc2
[FIX] hr_holidays_public: Don't copy meeting_id
pedrobaeza Jan 4, 2022
4f34084
[Fix] hr_holiday_public: Exclude public holidays validating leaves
santostelmo Dec 16, 2021
30796b1
hr_holidays_public 14.0.2.0.4
OCA-git-bot Jan 6, 2022
bc15d90
Translated using Weblate (Spanish)
olgamarcocb Feb 2, 2022
ecf3609
Translated using Weblate (Italian)
rbellanova Apr 4, 2022
2a29ac9
[15.0][MIG] hr_holidays_public
pegonzalezspesol Jan 12, 2022
3ed61ff
[IMP] hr_holidays_public: use api.model_create_multi
gurneyalex Jun 14, 2022
5a7c271
hr_holidays_public 15.0.1.0.1
OCA-git-bot Jun 16, 2022
e4266f7
Added translation using Weblate (Catalan)
jabelchi Jun 16, 2022
64bafda
[FIX] hr_holidays_public. Public vacations cannot be saved if variabl…
cesar-tecnativa Jul 27, 2022
de7ad38
hr_holidays_public 15.0.1.1.0
OCA-git-bot Jul 28, 2022
c290ea2
Translated using Weblate (Italian)
mymage Dec 20, 2022
69ee491
[FIX] hr_holidays_public: Run tests with user timezone
sergio-teruel Jan 30, 2023
520f9e4
hr_holidays_public 15.0.1.1.1
OCA-git-bot Jan 31, 2023
7b37b3a
[MIG] hr_holidays_public: Migration to 16.0
yankinmax Feb 20, 2023
efdc5bc
[16.0][FIX] - hr_public_holidays: holidays table is not fully visible…
sbejaoui Mar 30, 2023
38dde1f
hr_holidays_public 16.0.1.1.0
OCA-git-bot Apr 6, 2023
ad5024b
[IMP] hr_holidays_public: Allow inheritance by other modules
victoralmau Jul 11, 2023
4d41254
hr_holidays_public 16.0.1.1.1
OCA-git-bot Jul 25, 2023
33a79c1
[IMP] hr_holidays_public: test performance improvement
josep-tecnativa Oct 19, 2023
79445c2
[IMP] hr_holidays_public: pre-commit auto fixes
thaolt99 Dec 5, 2023
4a4699e
[MIG] hr_holidays_public: Migration to 17.0
thaolt99 Dec 5, 2023
800f370
Translated using Weblate (Italian)
mymage Feb 12, 2024
3ba4e41
[FIX] hr_holidays_public: Line too long
pedrobaeza May 1, 2024
220cd7b
[FIX] hr_holidays_public: fixed action_validate() override
dariodelzozzo Feb 16, 2023
8b24023
[FIX] hr_holidays_public*: Use the context employee or the user's emp…
victoralmau Jul 2, 2024
49217aa
[FIX] hr_holidays_public: Fix tests (not call the action_validate met…
victoralmau Jul 26, 2024
75be0d0
[FIX] hr_holidays_public: Translatable action
ypapouin Mar 22, 2023
1f8011d
*: Fix linters
etobella Oct 28, 2023
c4c66a0
hr_holidays_public: Deprecate use of employee_id in favour of partner_id
grindtildeath Feb 20, 2024
4c9c51b
[MIG] hr_holidays_public: Migration to 18.0
xaviedoanhduy Oct 2, 2024
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
181 changes: 181 additions & 0 deletions hr_holidays_public/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
==================
HR Holidays Public
==================

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

.. |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/18.0/hr_holidays_public
: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-18-0/hr-holidays-18-0-hr_holidays_public
: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=18.0
:alt: Try me on Runboat

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

This module handles public holidays.

The calculation of each leave can exclude rest public holiday, depending
on the leave type configuration.

In HR holiday app, public holiday will be displayed as unusual days
(grey like weekends).

**Table of contents**

.. contents::
:local:

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

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

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

Usage
=====

For adding public holidays:

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

For using public 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 Holidays"
checked.
4. If no leave type is yet specified, then default configuration is to
exclude public holidays.
5. The number of days will be computed excluding public holidays that
match the selected employee, including global, country and state
holidays.
6. If no employee is yet selected, only global holidays will be taken
into account.

In calendar views in HR holiday app public will be display (likes other
unusual days) according the current user employee country/state. If not
set the there is a fallback to the current company country/state to
filter public holidays.

Known issues / Roadmap
======================

In Odoo 12.0, \_leave_intervals() returns Intervals which is a list of
tuples (start_timestamp, end_timestamp, resource.calendar.leaves
record). Since this module does not operate with
resource.calendar.leaves, it's setting third component of a tuple to a
hr.holidays.public.line record. This may or may not be a problem, yet
since this component is also being set to resource.calendar.attendance
records in \_attendance_intervals(), seems it should be ok.

There are no restrictions to block users from modifying or removing
calendar events linked to public holidays. There's a suggestion to
overload write and unlink methods of calendar.event, but it might have
other impacts like users not being able to edit event tags, or even
custom fields.

Regional public holidays are shown in the public calendar. The regions
will be noted in the description of the event, but it'll be shown to all
users. It'd be good to have it show only for users in these regions.

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%0Aversion:%2018.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
-------

* Michael Telahun Makonnen
* Tecnativa
* Fekete Mihai (Forest and Biomass Services Romania)
* Druidoo
*

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

- Michael Telahun Makonnen <[email protected]>
- Fekete Mihai <[email protected]>
- Nikolina Todorova <[email protected]>
- Alexis de Lattre <[email protected]>
- Salton Massally (iDT Labs) <[email protected]>
- Ivan Yelizariev <[email protected]>
- Bassirou Ndaw <[email protected]>
- Dhara Solanki <[email protected]>
- `Tecnativa <https://www.tecnativa.com>`__:

- Pedro M. Baeza

- `CorporateHub <https://corporatehub.eu/>`__

- Alexey Pelykh <[email protected]>

- `Camptocamp <https://www.camptocamp.com>`__:

- Damien Crier <[email protected]>

- `Druidoo <https://www.druidoo.io>`__:

- Iván Todorovich <[email protected]>

- `Pesol <https://www.pesol.es>`__:

- Pedro Evaristo Gonzalez Sanchez <[email protected]>

- `Trobz <https://trobz.com>`__:

- Thao Le <[email protected]>
- Do Anh Duy <[email protected]>

Other credits
-------------

The migration of this module from 16.0 to 17.0 was financially supported
by Camptocamp. The migration of this module from 17.0 to 18.0 was
financially supported by Camptocamp.

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.

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions hr_holidays_public/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
from . import wizards
26 changes: 26 additions & 0 deletions hr_holidays_public/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2015 2011,2013 Michael Telahun Makonnen <[email protected]>
# Copyright 2020 InitOS Gmbh
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "HR Holidays Public",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"category": "Human Resources",
"author": "Michael Telahun Makonnen, "
"Tecnativa, "
"Fekete Mihai (Forest and Biomass Services Romania), "
"Druidoo, "
"Odoo Community Association (OCA),",
"summary": "Manage Public Holidays",
"website": "https://github.com/OCA/hr-holidays",
"depends": ["hr_holidays"],
"data": [
"data/data.xml",
"security/ir.model.access.csv",
"views/hr_holidays_public_view.xml",
"views/hr_leave_type.xml",
"wizards/holidays_public_next_year_wizard.xml",
],
"installable": True,
}
6 changes: 6 additions & 0 deletions hr_holidays_public/data/data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="event_type_holiday" model="calendar.event.type">
<field name="name">Holidays</field>
</record>
</odoo>
Loading
Loading