-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
[15.0][FIX] hr_holidays_public: wrong computation in case resources in different countries #47
Conversation
Can you add a regression test that exercises the problem you have found? |
43e18f8
to
0912bef
Compare
@pedrobaeza currently the test is in a customer-specific module, at a higher level. I'll addapt it for this module soon but I need to hotfix this in prod first ;) |
@gurneyalex please amend the PR without merge commits and add the regression test. |
…erent countries Fix an issue in hr_holidays_public where resource.calendar::_attendance_intervals_batch_exclude_public_holidays would return a wrong result when called with multiple resources working in different countries. The original implementation uses a context key employee_id to find the employee, which only allows this method to be called with a single employee. The fix searches for the employees related to the resources passed in arguments, and default to the context key if there are no provided resources. Also rework the implementation to use a python set rather than a list for faster in test. [FIX] hr_holidays_public: provide defaults to process holidays
ca5a107
to
acf0c22
Compare
This PR has the |
…in different countries
@pedrobaeza done :-) |
Thanks. I still see two commits (one being fixup). Please squash them, as the bot can't do it. |
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LG
@gurneyalex can you please squash your 2 commits into one? ocabot doesn't do it. |
Superseded by #98 |
Fix an issue in hr_holidays_public where
resource.calendar::_attendance_intervals_batch_exclude_public_holidays
would return a wrong result when called with multiple resources working
in different countries.
The original implementation uses a context key employee_id to find the
employee, which only allows this method to be called with a single
employee. The fix searches for the employees related to the resources
passed in arguments, and default to the context key if there are no
provided resources.
Also rework the implementation to use a python set rather than a list
for faster in test.