[FIX]: crm: Fixed problem of removing alarm from meeting

bzr revid: rpa@openerp.co.in-20100108115459-aahmawqnd5hls919
This commit is contained in:
rpa (Open ERP)
2010-01-08 17:24:59 +05:30
parent 3a75c7dd83
commit 6eb8a64285
+4 -2
View File
@@ -153,7 +153,8 @@ class crm_meeting(osv.osv):
'user_id' : uid
}
alarm_id = alarm_obj.create(cr, uid, vals)
cr.execute('Update crm_meeting set caldav_alarm_id=%s where id=%s' % (alarm_id, meeting.id))
cr.execute('Update crm_meeting set caldav_alarm_id=%s \
where id=%s' % (alarm_id, meeting.id))
cr.commit()
return True
@@ -165,7 +166,8 @@ class crm_meeting(osv.osv):
alarm_ids = alarm_obj.search(cr, uid, [('model_id','=',model_id), ('res_id','=',meeting.id)])
if alarm_ids and len(alarm_ids):
alarm_obj.unlink(cr, uid, alarm_ids)
cr.execute('Update crm_meeting set caldav_alarm_id=NULL where id=%s' % (meeting.id))
cr.execute('Update crm_meeting set caldav_alarm_id=NULL, \
alarm_id=NULL where id=%s' % (meeting.id))
cr.commit()
return True