From 7ec3aa1f03df69bff406e5d582e4da288c7f1af2 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Thu, 19 Aug 2010 17:54:23 +0530 Subject: [PATCH] [FIX]: base_caledar: Fixed the problem when we have recurrent event with at least one exdate, and we remove another occurence of recurrent event, it sets the latest as exdate instead of appending it in exdates list bzr revid: rpa@tinyerp.com-20100819122423-x5gjekno6vl67o55 --- addons/base_calendar/base_calendar.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index a735de4b823..694b89f34ad 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -1559,7 +1559,8 @@ true, it will allow you to hide the event alarm information without removing it. # Remove one of the recurrent event date_new = time.strftime("%Y%m%dT%H%M%S", \ time.strptime(date_new, "%Y%m%d%H%M%S")) - res = self.write(cr, uid, event_id, {'exdate': date_new}) + exdate = (record['exdate'] and (record['exdate'] + ',') or '') + date_new + res = self.write(cr, uid, event_id, {'exdate': exdate}) else: res = super(calendar_event, self).unlink(cr, uid, event_id) self.pool.get('res.alarm').do_alarm_unlink(cr, uid, event_id, self._name)