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

bzr revid: rpa@tinyerp.com-20091208095125-gi0pf25nrljjiru9
This commit is contained in:
rpa (Open ERP)
2009-12-08 15:21:25 +05:30
parent 2291ec22b2
commit 0e57dab522
+2
View File
@@ -311,6 +311,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 = []