-
- Downloads
[FIX] google_calendar: edit schedule of recurring event
Steps to reproduce: ------------------- We google calendar, create a recurring event with three occurrences. We obtain 3 events in chronological order: - A - B - C Change the title of the event B and apply the changes to the following events. We get: - A: First title - B: Second title - C: Second title Modify the schedule of event C and apply the changes only to this event. We get: - A: First title + First schedule - B: Second title + First schedule - C: Second title + Second schedule Synchronize Google calendar with Odoo. Issue: ------ Event C is "duplicated". Event C will exist with the first schedule and the second schedule. Cause: ------ A recurrent event with `google_id` is equal to `ID_RANGE_TIMESTAMP` can be rescheduled. If this is the case, its `google_id` will be equal to `ID_TIMESTAMP`. We do not manage the deletion of the event that belongs to the old `google id`. Solution: --------- When we detect a recurring event with a modified schedule, we have to delete the event from the old `google_id` (which is the event with the old schedule). For this, it is necessary to find the old `google_id` based on the elements contained in the `id` and the `recurringEventId` of the event. opw-3143680 closes odoo/odoo#121677 X-original-commit: 3f145af0 Signed-off-by:Arnaud Joset (arj) <arj@odoo.com> Signed-off-by:
Lefebvre Thomas (thle) <thle@odoo.com>
Showing
- addons/google_calendar/models/google_sync.py 12 additions, 0 deletionsaddons/google_calendar/models/google_sync.py
- addons/google_calendar/tests/test_sync_google2odoo.py 98 additions, 0 deletionsaddons/google_calendar/tests/test_sync_google2odoo.py
- addons/google_calendar/utils/google_event.py 26 additions, 0 deletionsaddons/google_calendar/utils/google_event.py
Loading
Please register or sign in to comment