From cf561091c8dcb777c69215771ca01dc650781162 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Wed, 19 Jan 2011 11:49:55 +0100 Subject: [PATCH] [FIX] Fixed incorrect handling or rrule in base_calendar. bzr revid: nicolas.vanhoren@openerp.com-20110119104955-v7h63nazhxz5tx23 --- addons/base_calendar/base_calendar.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 5bc12c69671..7871cca7a3a 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -1416,6 +1416,15 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\ @param context: A standard dictionary for contextual values @return: True """ + #removing useless value + old_vals = self.read(cr, uid, ids[0], ['rrule'], context) + if not old_vals: + old_vals = {} + if not 'rrule' in old_vals: + old_vals["rrule"] = "" + if 'rrule' in vals and not vals['rrule'] and not old_vals['rrule']: + del vals['rrule'] + if context is None: context = {} if isinstance(ids, (str, int, long)):