Skip to content
Snippets Groups Projects
Commit aacc8f03 authored by Thomas Lefebvre (thle)'s avatar Thomas Lefebvre (thle)
Browse files

[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: default avatarArnaud Joset (arj) <arj@odoo.com>
Signed-off-by: default avatarLefebvre Thomas (thle) <thle@odoo.com>
parent 78d4a46b
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment