[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
This commit is contained in:
rpa (Open ERP)
2010-08-19 17:54:23 +05:30
parent f1b6b52bfc
commit 7ec3aa1f03
+2 -1
View File
@@ -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)