[19.0][MIG] hr_holidays_natural_period: Migration to version 19.0#240
Open
cristina-hidalgo-tecnativa wants to merge 31 commits intoOCA:19.0from
Open
[19.0][MIG] hr_holidays_natural_period: Migration to version 19.0#240cristina-hidalgo-tecnativa wants to merge 31 commits intoOCA:19.0from
cristina-hidalgo-tecnativa wants to merge 31 commits intoOCA:19.0from
Conversation
…ve types [UPD] Update hr_holidays_natural_period.pot [UPD] README.rst
…ployee is not set yet hr_holidays_natural_period 13.0.1.0.1
… employee set yet hr_holidays_natural_period 13.0.1.0.2
…ion. Previously, the _exist_interval_in_date () function always returned False, which always created a new interval. Although this was totally incorrect, it was detected in a real use case when there were working days and holidays in the date range causing incorrect overtime. TT33779 hr_holidays_natural_period 13.0.1.0.3
TT37026 [UPD] Update hr_holidays_natural_period.pot [UPD] README.rst
Currently translated at 100.0% (6 of 6 strings) Translation: hr-holidays-16.0/hr-holidays-16.0-hr_holidays_natural_period Translate-URL: https://translation.odoo-community.org/projects/hr-holidays-16-0/hr-holidays-16-0-hr_holidays_natural_period/es/ [UPD] README.rst
…reation It is necessary to recalculate the duration value in the create() method when it is done by UX. Fixes OCA#105
[UPD] Update hr_holidays_natural_period.pot [BOT] post-merge updates Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: hr-holidays-17.0/hr-holidays-17.0-hr_holidays_natural_period Translate-URL: https://translation.odoo-community.org/projects/hr-holidays-17-0/hr-holidays-17-0-hr_holidays_natural_period/
Currently translated at 100.0% (9 of 9 strings) Translation: hr-holidays-17.0/hr-holidays-17.0-hr_holidays_natural_period Translate-URL: https://translation.odoo-community.org/projects/hr-holidays-17-0/hr-holidays-17-0-hr_holidays_natural_period/it/
…n some use cases. Example use case: - Calendar Monday 16:00-21:00 - Calendar Tuesday-Friday: 09:00-14:00 - Absence from Monday to Sunday in natural day - Number of days: 7 This is due to the rrule we are using to generate the missing intervals for the non working days to simulate the natural period. Previously, we use the starting and ending time, resulting that the daily rrule was omitting the initial or ending day, as the theoretical hour is after the ending datetime. For the example above, the rrule will generate the entries from Monday at 16:00, so when the time for the Sunday rule comes, as Sun 16:00 is bigger than Sun 14:00, which was the ending datetime, no iteration is done for Sunday. The solution is to put the rrule with the min time for the starting limit, and the maximum for the ending one. It has been checked that there's no problem with timezones due to this patch. TT55243 [BOT] post-merge updates
…st_unit [BOT] post-merge updates
46c329b to
a9fabb0
Compare
6f3b977 to
93b23b6
Compare
Currently translated at 100.0% (9 of 9 strings) Translation: hr-holidays-18.0/hr-holidays-18.0-hr_holidays_natural_period Translate-URL: https://translation.odoo-community.org/projects/hr-holidays-18-0/hr-holidays-18-0-hr_holidays_natural_period/it/
…atural_day is selected TT56402
Currently translated at 100.0% (10 of 10 strings) Translation: hr-holidays-18.0/hr-holidays-18.0-hr_holidays_natural_period Translate-URL: https://translation.odoo-community.org/projects/hr-holidays-18-0/hr-holidays-18-0-hr_holidays_natural_period/it/
When opening an employee that has leaves with natural days, and having a lot of leaves of this type for all the employees, there's a serious performance problem, because changing the request unit recomputes all the leaves of that type. Using the trick from #60256 of updating just the cache with the desired value for the computations, avoid heavy recomputations. TT60256
93b23b6 to
32268a8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
contains(@class, 'o_row')tohasclass('o_row')_natural_period_intervals_batchto handle edge case whereold_request_unit='day'comes without proper context@Tecnativa TT60290
@christian-ramos-tecnativa