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 #159

Open
wants to merge 95 commits into
base: 18.0
Choose a base branch
from

Conversation

xaviedoanhduy
Copy link
Contributor

note

@victoralmau
Copy link
Member

Now that calendar_public_holiday is already merged, can you delete the commit [DON'T MERGE] Add test-requirements.txt and I'll check it?

Fekete Mihai and others added 28 commits February 13, 2025 22:34
Add correct calculation of holidays in hr_public_holidays, instead of hr_holidays_compute_days.

Remove dependancy of contracts.

Add unlink at onchnage of public holiday lines.

Update code.

Fix flake.

Update code, add calculation in hours, update views.

Update flake.

Update calendar creation with no attendances, otherwise default values were set.

Remove config of show days/hours.

Update flake.

Update readme.

Rename module.

Updated holiday reports.

Update klake and pylint.

Update flaket.

Update hr_holidays_views.xml

Add readonly to show_full_days.

Update code according with comments.

Increase coverage.

update flake8.
Hours part will be in module hr_holidays_hour.
Reduce to the minimum the footprint of this module, adding only public
holidays as leaves in a transparent way by other modules.
This has been totally reworked for decoupling parts, not depending now
on hr_holidays_public, and making transparent its use for compatibility
with other modules.
Currently translated at 52.5% (21 of 40 strings)

Translation: hr-11.0/hr-11.0-hr_holidays_public
Translate-URL: https://translation.odoo-community.org/projects/hr-11-0/hr-11-0-hr_holidays_public/de/
Currently translated at 55.0% (22 of 40 strings)

Translation: hr-12.0/hr-12.0-hr_holidays_public
Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_holidays_public/es/
Currently translated at 95.0% (38 of 40 strings)

Translation: hr-12.0/hr-12.0-hr_holidays_public
Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_holidays_public/fr/
Currently translated at 92.5% (37 of 40 strings)

Translation: hr-12.0/hr-12.0-hr_holidays_public
Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_holidays_public/es/
Currently translated at 92.5% (37 of 40 strings)

Translation: hr-12.0/hr-12.0-hr_holidays_public
Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_holidays_public/de/
Currently translated at 100.0% (40 of 40 strings)

Translation: hr-12.0/hr-12.0-hr_holidays_public
Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_holidays_public/es/
Currently translated at 45.0% (18 of 40 strings)

Translation: hr-12.0/hr-12.0-hr_holidays_public
Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_holidays_public/pt_BR/
Since that PR, `_leave_intervals` is no longer called on days computations, so we
intercept the batch method, but leaving the previous one for retro-compatibility.
OCA-git-bot and others added 6 commits February 13, 2025 22:34
This change hooks into the core public holidays method that returns the
employee's available holidays for a period of time and displays them in
the Time Off dashboard calendar.

Both types of public holidays are compatible and will show up in order.

TT52276
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: hr-holidays-17.0/hr-holidays-17.0-hr_holidays_public
Translate-URL: https://translation.odoo-community.org/projects/hr-holidays-17-0/hr-holidays-17-0-hr_holidays_public/
Currently translated at 100.0% (42 of 42 strings)

Translation: hr-holidays-17.0/hr-holidays-17.0-hr_holidays_public
Translate-URL: https://translation.odoo-community.org/projects/hr-holidays-17-0/hr-holidays-17-0-hr_holidays_public/it/
@xaviedoanhduy xaviedoanhduy force-pushed the 18.0-imp-hr-holidays-public branch from 3cdd58e to 374acb3 Compare February 13, 2025 15:35
Copy link
Member

@victoralmau victoralmau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code and functional review OK.

This change is pending OCA/calendar#142 (comment)

@xaviedoanhduy xaviedoanhduy force-pushed the 18.0-imp-hr-holidays-public branch from 374acb3 to 0b3df3b Compare February 14, 2025 02:51
@victoralmau
Copy link
Member

Comment OCA/calendar#142 (comment) is still pending.

@xaviedoanhduy
Copy link
Contributor Author

Comment OCA/calendar#142 (comment) is still pending.

hi, I added a commit in response to that comment

@victoralmau
Copy link
Member

Comment OCA/calendar#142 (comment) is still pending.

hi, I added a commit in response to that comment

Can you add it in a .csv file to make it more readable? (similar to https://github.com/OCA/calendar/blob/18.0/calendar_public_holiday/security/ir.model.access.csv) I think this change does not need to be in an extra commit, it can be in the migration commit.

@xaviedoanhduy xaviedoanhduy force-pushed the 18.0-imp-hr-holidays-public branch from 9e4c7f4 to a6b4bac Compare February 25, 2025 02:59
@xaviedoanhduy
Copy link
Contributor Author

Can you add it in a .csv file to make it more readable? (similar to https://github.com/OCA/calendar/blob/18.0/calendar_public_holiday/security/ir.model.access.csv) I think this change does not need to be in an extra commit, it can be in the migration commit.

ok, updated

Copy link
Member

@victoralmau victoralmau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code and functional review OK.

Ping @pedrobaeza

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@pedrobaeza
Copy link
Member

/ocabot migration hr_holidays_public

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Feb 26, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Feb 26, 2025
4 tasks
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm missing a menu entry for managing public holidays for HR managers.

@xaviedoanhduy xaviedoanhduy force-pushed the 18.0-imp-hr-holidays-public branch from a6b4bac to d02a400 Compare February 27, 2025 08:32
@xaviedoanhduy
Copy link
Contributor Author

I'm missing a menu entry for managing public holidays for HR managers.

hi, are you confused between Time off and Employees? because i brought it back to the original module where the time off manager has the right
image

@pedrobaeza
Copy link
Member

I'm talking about a menu entry. I see the security access rules, but not UI counterpart for managing the public holidays from inside the Time Off menus.

@xaviedoanhduy xaviedoanhduy force-pushed the 18.0-imp-hr-holidays-public branch from d02a400 to fb38c0f Compare February 27, 2025 09:12
@xaviedoanhduy
Copy link
Contributor Author

added menu in manage public holidays inside the Time Off menus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.