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

Conversation

xaviedoanhduy
Copy link

@xaviedoanhduy xaviedoanhduy commented Oct 2, 2024

Change on version 18.0

  • number_of_hours_display fields has been removed in https://github.com/odoo/odoo/pull/156117

On the occasion

  • I also removed some redundant code in tests (no need to call the denpends function)

OCA - port

  • [17.0][FW] hr_holidays_public: port from 14.0: https://github.com/OCA/hr-holidays/pull/144

@xaviedoanhduy xaviedoanhduy marked this pull request as draft October 2, 2024 03:47
@xaviedoanhduy xaviedoanhduy force-pushed the 18.0-mig-hr_holidays_public branch 7 times, most recently from 53fa8b5 to 5234789 Compare October 3, 2024 09:34
@xaviedoanhduy xaviedoanhduy marked this pull request as ready for review October 3, 2024 10:05
@simahawk
Copy link
Member

to be moved to OCA

@simahawk
Copy link
Member

Also, consider implementing OCA#111

Fekete Mihai and others added 16 commits October 14, 2024 15:54
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/
gurneyalex and others added 27 commits October 14, 2024 15:54
decorate hr.holidays.public.line::create with api.model_create_multi
Currently translated at 100.0% (41 of 41 strings)

Translation: hr-holidays-15.0/hr-holidays-15.0-hr_holidays_public
Translate-URL: https://translation.odoo-community.org/projects/hr-holidays-15-0/hr-holidays-15-0-hr_holidays_public/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: hr-holidays-16.0/hr-holidays-16.0-hr_holidays_public
Translate-URL: https://translation.odoo-community.org/projects/hr-holidays-16-0/hr-holidays-16-0-hr_holidays_public/
- Include context keys for avoiding mail operations overhead.
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% (40 of 40 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/
…loyee

Use case:
- Go to Employees to an employee with a different address (country) than our
  own and with specific public holidays for that country.
- Go to the Time-off smart-buttons
- We will have to see there the public holidays according to the employee's address

TT49839
Helper functions to find public holidays did allow to use an hr.employee
to filter country and states based on the employee address.

Since only the address of the employee was used, modifying the functions
to use a res.partner instead of an hr.employee allows more possibilities
such as checking public holidays for customers and suppliers.
@xaviedoanhduy xaviedoanhduy force-pushed the 18.0-mig-hr_holidays_public branch from 5234789 to 8c38d8a Compare October 14, 2024 09:03
@xaviedoanhduy
Copy link
Author

Supersedes: OCA#147

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

Successfully merging this pull request may close these issues.