From 24ac246c22d258ed4fd637bd36f758dc7e5d69c1 Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Thu, 20 Jan 2011 17:19:06 +0530 Subject: [PATCH] [FIX] crm_meeting: clear recurrent options after un-checked recurrecy option in meeting bzr revid: hmo@tinyerp.com-20110120114906-59tfk6jixobion2h --- addons/base_calendar/base_calendar.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 034eadb0344..2ef94648c6d 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -1442,7 +1442,6 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ if not edit_all: - #if len(str(event_id).split('-')) > 1: data = self.read(cr, uid, event_id, ['date', 'date_deadline', \ 'rrule', 'duration']) if data.get('rrule'): @@ -1460,8 +1459,16 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ new_ids.append(real_event_id) if not recurrency: + #clear all recurrent property + clear_vals = { + 'recurrent_uid': False, + 'recurrent_id': False, + 'rrule_type': 'none', + 'rrule': '' + } + super(calendar_event, self).write(cr, uid, [real_event_id], clear_vals, context=context) # unlink all replica of that event after removing recurrency option - self.unlink_events(cr, uid, [event_id], context=context) + self.unlink_events(cr, uid, [real_event_id], context=context) if vals.get('vtimezone', '').startswith('/freeassociation.sourceforge.net/tzfile/'): vals['vtimezone'] = vals['vtimezone'][40:]