diff --git a/bin/osv/orm.py b/bin/osv/orm.py index e083c898740..ce39bba8617 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1707,6 +1707,9 @@ class orm(object): joins=[] while i 3: table=x[3] - if x[1] != 'in': + if x[1] == 'inselect': + qu1.append('(%s.%s in (%s))' % (table._table, x[0], x[2][0])) + qu2 += x[2][1] + elif x[1] != 'in': #FIXME: this replace all (..., '=', False) values with 'is null' and this is # not what we want for real boolean fields. The problem is, we can't change it # easily because we use False everywhere instead of None