diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2021-04-27 14:28:17 +0000 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2021-04-28 09:31:17 +0000 |
| commit | 7aa233e63a8c82cce8336adb99418a96e061268f (patch) | |
| tree | 73e357865e496d7fa7a917b6d6b02fde0c9721f9 /addons | |
| parent | 28e85cdbbd499b3fa826c15d4058aa4b83b993c9 (diff) | |
[FIX] microsoft_calendar: permanent event no traceback on open
When synchronizing microsoft calendar events, if the event is permanent
Microsoft says the endDate is "0001-01-01": we save that and this causes
an error when it is being parsed in javascript since we require a date
with higher than 1000 years in require('web.field_utils').parseDate
function.
With this changeset, we do not set endDate if the type of the event is
not endDate (as shown[^1] in the documentation endDate only makes sense
for event of type endDate).
[^1]: https://docs.microsoft.com/en-us/graph/outlook-schedule-recurring-events#recurrence-ranges
opw-2479029
fixes #69481
closes #69944
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/microsoft_calendar/utils/microsoft_event.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/microsoft_calendar/utils/microsoft_event.py b/addons/microsoft_calendar/utils/microsoft_event.py index 2234b1ad6a9..333c4511805 100644 --- a/addons/microsoft_calendar/utils/microsoft_event.py +++ b/addons/microsoft_calendar/utils/microsoft_event.py @@ -178,7 +178,7 @@ class MicrosoftEvent(abc.Set): 'count': range['numberOfOccurrences'], 'day': pattern['dayOfMonth'], 'byday': index_dict.get(pattern['index'], False), - 'until': range['endDate'], + 'until': range['type'] == 'endDate' and range['endDate'], } month_by_dict = { |
