[REVERT] expression: ANY is not work well in sql query. It is raised exception.so changes in query is reverted

bzr revid: hmo@tinyerp.com-20091123071558-sea2rhnfmkr9ag71
This commit is contained in:
Harry (Open ERP) 2009-11-23 12:45:58 +05:30
parent 055ed99069
commit dda5ed6bb1
1 changed files with 2 additions and 2 deletions

View File

@ -57,8 +57,8 @@ class expression(object):
subids = ids[i:i+cr.IN_MAX]
cr.execute('SELECT "%s"' \
' FROM "%s"' \
' WHERE "%s" = ANY (%%s)' % (s, f, w), (subids,))
res.extend([r[0] for r in cr.fetchall()])
' WHERE "%s" in (%s)' % (s, f, w, ','.join(['%s']*len(subids))),
subids)
else:
cr.execute('SELECT distinct("%s")' \
' FROM "%s" where "%s" is not null' % (s, f, s)),