diff options
| author | Adrien Widart <awt@odoo.com> | 2021-04-19 08:32:27 +0000 |
|---|---|---|
| committer | Adrien Widart <awt@odoo.com> | 2021-04-22 07:33:30 +0000 |
| commit | 48cc3ed28e51ce34c1740f9b394d971234e0bdbe (patch) | |
| tree | d6c40b390247f245c69d24c83ec4ce4fd78df253 /addons/google_calendar | |
| parent | 0d7c9db6d17e3268ae01a5b2d79b513c5b24a34f (diff) | |
[FIX] google_calendar: force notification sending
Suppose both Google Calendar and Odoo Calendar are synced. Google will
not send any invitation to attendees when the user creates an event from
Odoo.
This fix requires Google to notify attendees when an event is created,
modified or cancelled.
OPW-2501413
closes odoo/odoo#69444
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
Diffstat (limited to 'addons/google_calendar')
| -rw-r--r-- | addons/google_calendar/utils/google_calendar.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/google_calendar/utils/google_calendar.py b/addons/google_calendar/utils/google_calendar.py index 20f30d33a7f..7d4467e328d 100644 --- a/addons/google_calendar/utils/google_calendar.py +++ b/addons/google_calendar/utils/google_calendar.py @@ -58,7 +58,7 @@ class GoogleCalendarService(): @requires_auth_token def insert(self, values, token=None, timeout=TIMEOUT): - url = "/calendar/v3/calendars/primary/events" + url = "/calendar/v3/calendars/primary/events?sendUpdates=all" headers = {'Content-type': 'application/json', 'Authorization': 'Bearer %s' % token} if not values.get('id'): values['id'] = uuid4().hex @@ -67,13 +67,13 @@ class GoogleCalendarService(): @requires_auth_token def patch(self, event_id, values, token=None, timeout=TIMEOUT): - url = "/calendar/v3/calendars/primary/events/%s" % event_id + url = "/calendar/v3/calendars/primary/events/%s?sendUpdates=all" % event_id headers = {'Content-type': 'application/json', 'Authorization': 'Bearer %s' % token} self.google_service._do_request(url, json.dumps(values), headers, method='PUT', timeout=timeout) @requires_auth_token def delete(self, event_id, token=None, timeout=TIMEOUT): - url = "/calendar/v3/calendars/primary/events/%s" % event_id + url = "/calendar/v3/calendars/primary/events/%s?sendUpdates=all" % event_id headers = {'Content-type': 'application/json'} params = {'access_token': token} try: |
