[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)
This commit is contained in:
Denis Ledoux 2014-12-09 17:13:26 +01:00
parent d4f91b3f98
commit f9ad381c17
1 changed files with 2 additions and 1 deletions

View File

@ -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':