From b6fc91d243898bfff7e0b28972f89e0741752c96 Mon Sep 17 00:00:00 2001 From: Adrien Widart Date: Mon, 19 Apr 2021 08:32:27 +0000 Subject: [PATCH] [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#69735 X-original-commit: 48cc3ed28e51ce34c1740f9b394d971234e0bdbe Signed-off-by: Arnaud Joset --- addons/google_calendar/utils/google_calendar.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/google_calendar/utils/google_calendar.py b/addons/google_calendar/utils/google_calendar.py index b02019cb846..f1abb8cb4be 100644 --- a/addons/google_calendar/utils/google_calendar.py +++ b/addons/google_calendar/utils/google_calendar.py @@ -67,7 +67,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 @@ -76,13 +76,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: