[FIX] google_calendar: fail during first sync
If an event exists on Google but was not synced yet in Odoo, the synchronisation would fail. When self.OE.found is False, self.OE.event is not defined and trying to access it would fail (it's a python object, not a recordset) Check the ownership after making sure the event is present in Odoo. Fixes #7034
This commit is contained in:
parent
ec18bf6f44
commit
fd2518eecb
|
@ -84,8 +84,8 @@ class SyncEvent(object):
|
|||
|
||||
def compute_OP(self, modeFull=True):
|
||||
#If event are already in Gmail and in OpenERP
|
||||
is_owner = self.OE.event.env.user.id == self.OE.event.user_id.id
|
||||
if self.OE.found and self.GG.found:
|
||||
is_owner = self.OE.event.env.user.id == self.OE.event.user_id.id
|
||||
#If the event has been deleted from one side, we delete on other side !
|
||||
if self.OE.status != self.GG.status and is_owner:
|
||||
self.OP = Delete((self.OE.status and "OE") or (self.GG.status and "GG"),
|
||||
|
|
Loading…
Reference in New Issue