From f9ad381c17686f4e2f3d08ed1410e6e54a1c28ee Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 9 Dec 2014 17:13:26 +0100 Subject: [PATCH] [FIX] google_calendar: deleted excluded recurring event Do not try to delete an excluded recurrent event added in Google, but not yet syncrhonised in Odoo (immediately deleted for instance) --- addons/google_calendar/google_calendar.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/google_calendar/google_calendar.py b/addons/google_calendar/google_calendar.py index 39eb1c6b327..b65d1b337a9 100644 --- a/addons/google_calendar/google_calendar.py +++ b/addons/google_calendar/google_calendar.py @@ -820,7 +820,8 @@ class google_calendar(osv.AbstractModel): res = self.update_from_google(cr, uid, parent_event, event.GG.event, "copy", context) else: parent_oe_id = event_to_synchronize[base_event][0][1].OE.event_id - calendar_event.unlink(cr, uid, "%s-%s" % (parent_oe_id, new_google_event_id), can_be_deleted=True, context=context) + if parent_oe_id: + calendar_event.unlink(cr, uid, "%s-%s" % (parent_oe_id, new_google_event_id), can_be_deleted=True, context=context) elif isinstance(actToDo, Delete): if actSrc == 'GG':