diff options
| author | Lucas Lefèvre <lul@odoo.com> | 2020-05-27 11:44:38 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2020-06-24 12:35:11 +0000 |
| commit | 103feca347321f36627c556569fa5377e7980fb9 (patch) | |
| tree | 1d859954eacad0d04c325a1e9582fad2b72bb98c /doc/_extensions/autojsdoc/parser/parser.py | |
| parent | 852594473dafefa592c5bf94ecda1066edcdb18e (diff) | |
[FIX] resource: Find intervals in the resource timezone
With a user with timezone "Europe/Brussels", add a
slot on the gantt view where the preceding day is a working day.
The default starting time will be the previous day.
Reason: the default starting time is midnight, adjusted to
the closest attendance interval in the employee's calendar.
However, midnight in "Europe/Brussels" is actually 10pm UTC
the previous day.
The method adjusting the datetime to the closest attendance only
checks within the corresponding day.
Two ways to fix this:
1) the business code calling `_adjust_to_calendar` should
timezone the datetimes itself. To avoid similar bugs in the future,
the method should be modified to only accept timezoned datetimes.
2) Change `_adjust_to_calendar` to convert datetimes it was given
to the resource's timezone and consider the dates in those converted
datetimes.
Option 2 is chosen because it seems to take care of the problem at a lower
level which allows the business code to not think about those timezone details.
While this is technically an API change (in a stable release), the method was
introduced recently by b058ca1 as a fix for an already broken method.
closes odoo/odoo#53582
X-original-commit: c6cecac60360a1d8b0c62ee155a818a3a28505e1
Related: odoo/enterprise#11399
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'doc/_extensions/autojsdoc/parser/parser.py')
0 files changed, 0 insertions, 0 deletions
