[FIX] Modified base_calendar to make test in project pass.
bzr revid: nicolas.vanhoren@openerp.com-20110119181930-hcafgtyzp4x1v1xl
This commit is contained in:
parent
90fe206e80
commit
d2f4923d3e
|
@ -1417,13 +1417,14 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
|
||||||
@return: True
|
@return: True
|
||||||
"""
|
"""
|
||||||
#removing useless value
|
#removing useless value
|
||||||
old_vals = self.read(cr, uid, ids[0] if type(ids) == list else ids, ['rrule'], context)
|
if type(ids) == int or (type(ids) == list and len(ids) > 0):
|
||||||
if not old_vals:
|
old_vals = self.read(cr, uid, ids[0] if type(ids) == list else ids, ['rrule'], context)
|
||||||
old_vals = {}
|
if not old_vals:
|
||||||
if not 'rrule' in old_vals:
|
old_vals = {}
|
||||||
old_vals["rrule"] = ""
|
if not 'rrule' in old_vals:
|
||||||
if 'rrule' in vals and not vals['rrule'] and not old_vals['rrule']:
|
old_vals["rrule"] = ""
|
||||||
del vals['rrule']
|
if 'rrule' in vals and not vals['rrule'] and not old_vals['rrule']:
|
||||||
|
del vals['rrule']
|
||||||
|
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
|
Loading…
Reference in New Issue