[FIX]: crm: Fixed problem in read method when id is blank

bzr revid: rpa@tinyerp.com-20091209044734-1nch6ib6rt9sjokb
This commit is contained in:
rpa (Open ERP)
2009-12-09 10:17:34 +05:30
parent 9269478d58
commit 3fe41d3175
+2
View File
@@ -358,6 +358,8 @@ class crm_case(osv.osv):
ids = map(lambda x:int(str(x).split('-')[0]), ids)
res = super(crm_case, self).read(cr, uid, ids, fields=fields, context=context, load=load)
read_ids = ",".join([str(x) for x in ids])
if not read_ids:
return []
cr.execute('select id,rrule,rdates from crm_case where id in (%s)' % read_ids)
rrules = filter(lambda x: not x['rrule']==None, cr.dictfetchall())
rdates = []