Bugfixes in Expression
bzr revid: fp@tinyerp.com-20080819231537-akvupz2a38i6jfic
This commit is contained in:
parent
840e3c1082
commit
6fa9175cc5
|
@ -65,10 +65,12 @@ class expression(object):
|
|||
return [(left, 'in', table.search(cr, uid, doms, context=context))]
|
||||
return doms
|
||||
else:
|
||||
if not ids:
|
||||
return []
|
||||
ids2 = table.search(cr, uid, [(parent, 'in', ids)], context=context)
|
||||
return [(prefix+left, 'in', ids + _rec_get(ids2, table, parent))]
|
||||
def rg(ids, table, parent):
|
||||
if not ids:
|
||||
return []
|
||||
ids2 = table.search(cr, uid, [(parent, 'in', ids)], context=context)
|
||||
return ids+rg(ids2, table, parent)
|
||||
return [(prefix+left, 'in', rg(ids2, table, parent))]
|
||||
|
||||
self.__main_table = table
|
||||
|
||||
|
@ -85,7 +87,6 @@ class expression(object):
|
|||
working_table = table.pool.get(table._inherit_fields[left][0])
|
||||
if working_table not in self.__tables.values():
|
||||
self.__joins.append(('%s.%s=%s.%s' % (working_table._table, 'id', table._table, table._inherits[working_table._name]), working_table._table))
|
||||
print 'JOINS', self.__joins
|
||||
|
||||
self.__tables[i] = working_table
|
||||
|
||||
|
@ -165,10 +166,8 @@ class expression(object):
|
|||
self.__operator = 'in'
|
||||
if field._obj != working_table._name:
|
||||
dom = _rec_get(ids2, field_obj, working_table._parent_name, left=left)
|
||||
print 'Diff', dom, field._obj
|
||||
else:
|
||||
dom = _rec_get(ids2, working_table, left)
|
||||
print 'Same', dom
|
||||
self.__exp = self.__exp[:i] + dom + self.__exp[i+1:]
|
||||
else:
|
||||
if isinstance(right, basestring):
|
||||
|
|
Loading…
Reference in New Issue