[FIX]: base_calendar: Restricted count and inverval of rrule from negative value
bzr revid: rpa@tinyerp.com-20100415091202-9njp5d36ph3uowxr
This commit is contained in:
parent
3d91fc7ea2
commit
f225067578
|
@ -923,6 +923,10 @@ class calendar_event(osv.osv):
|
|||
if datas.get('rrule_type') == 'none':
|
||||
result[event] = False
|
||||
elif datas.get('rrule_type') == 'custom':
|
||||
if datas.get('interval', 0) < 0:
|
||||
raise osv.except_osv('Warning!', 'Interval can not be Negative')
|
||||
if datas.get('count', 0) < 0:
|
||||
raise osv.except_osv('Warning!', 'Count can not be Negative')
|
||||
rrule_custom = self.compute_rule_string(cr, uid, datas,\
|
||||
context=context)
|
||||
result[event] = rrule_custom
|
||||
|
|
Loading…
Reference in New Issue