[FIX] Fixed incorrect handling or rrule in base_calendar.

bzr revid: nicolas.vanhoren@openerp.com-20110119104955-v7h63nazhxz5tx23
This commit is contained in:
niv-openerp
2011-01-19 11:49:55 +01:00
parent 896d3cd63c
commit cf561091c8
+9
View File
@@ -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)):