summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2014-12-09 17:13:26 +0100
committerDenis Ledoux <dle@odoo.com>2014-12-09 17:13:26 +0100
commitf9ad381c17686f4e2f3d08ed1410e6e54a1c28ee (patch)
tree6f52e387ce7ff737b5d3ca1beafc4036c22700dc /addons
parentd4f91b3f984739c247659078aed7b8fdf8d6563a (diff)
[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)
Diffstat (limited to 'addons')
-rw-r--r--addons/google_calendar/google_calendar.py3
1 files changed, 2 insertions, 1 deletions
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':