[FIX] expression: in nodes like (left, 'in', right), apply _symbol_set on all values in right

bzr revid: rco@openerp.com-20131003075351-5quyz6ge1ayczdo9
This commit is contained in:
Raphael Collet 2013-10-03 09:53:51 +02:00
parent 221b01edbf
commit 7358cec8dc
1 changed files with 3 additions and 1 deletions

View File

@ -1114,7 +1114,9 @@ class expression(object):
if left == 'id':
instr = ','.join(['%s'] * len(params))
else:
instr = ','.join([model._columns[left]._symbol_set[0]] * len(params))
ss = model._columns[left]._symbol_set
instr = ','.join([ss[0]] * len(params))
params = map(ss[1], params)
query = '(%s."%s" %s (%s))' % (table_alias, left, operator, instr)
else:
# The case for (left, 'in', []) or (left, 'not in', []).