diff options
| author | Harry (Open ERP) <hmo@tinyerp.com> | 2009-11-23 12:45:58 +0530 |
|---|---|---|
| committer | Harry (Open ERP) <hmo@tinyerp.com> | 2009-11-23 12:45:58 +0530 |
| commit | dda5ed6bb1710e4690c1e01fe4265cc7db147068 (patch) | |
| tree | 67d8074dbe45a8e1cdbe761db5286658c208f320 /bin | |
| parent | 055ed990695adf887f9330ef031f096d1fc3be4f (diff) | |
[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
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/osv/expression.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/osv/expression.py b/bin/osv/expression.py index 34e73877c7a..31a02e8f244 100644 --- a/bin/osv/expression.py +++ b/bin/osv/expression.py @@ -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)), |
