From bfa6eaf4424097b060f2fdf6e5ddc6bc1210aeef Mon Sep 17 00:00:00 2001 From: "Bhumika (OpenERP)" Date: Fri, 8 Apr 2011 14:16:57 +0530 Subject: [PATCH] [Fix] sync_google_calendar: Fix the recurent meeting unlike problem bzr revid: sbh@tinyerp.com-20110408084657-776lafodzs8l4use --- addons/sync_google_calendar/sync_google_calendar.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/addons/sync_google_calendar/sync_google_calendar.py b/addons/sync_google_calendar/sync_google_calendar.py index e5328b08f16..12802831be0 100644 --- a/addons/sync_google_calendar/sync_google_calendar.py +++ b/addons/sync_google_calendar/sync_google_calendar.py @@ -20,14 +20,17 @@ ############################################################################## from osv import osv, fields - +import base +from base_calendar import base_calendar class crm_meeting(osv.osv): _inherit = "crm.meeting" def unlink(self, cr, uid, ids, context=None): model_obj = self.pool.get('ir.model.data') - model_ids = model_obj.search(cr, uid, [('res_id','in',ids),('model','=','crm.meeting'),('module','=','sync_google_calendar')], context=context) - model_obj.unlink(cr, uid, model_ids, context=context) + for meeting_id in ids: + id=base_calendar.base_calendar_id2real_id(meeting_id) + model_ids = model_obj.search(cr, uid, [('res_id','in',[id]),('model','=','crm.meeting'),('module','=','sync_google_calendar')], context=context) + model_obj.unlink(cr, uid, model_ids, context=context) return super(crm_meeting, self).unlink(cr, uid, ids, context=context) crm_meeting()