This commit is contained in:
Bertrand Chenal committed 2008-04-23 16:17:43 +02:00
commit 3e6bb4f5ed
1 file changed
+3 -13
+3 -13
View File
@@ -2058,19 +2058,9 @@ class ORM(object):
fargs = args[i][0].split('.', 1)
field = table._columns.get(fargs[0], False)
if not field:
# XXX must find a solution for long id list
if args[i][0] == 'id' and args[i][1] == 'child_of':
ids2 = args[i][2]
def _rec_get(ids, table, parent):
if not ids:
return []
ids2 = table.search(cursor, user,
[(parent, 'in', ids)], context=context)
return ids2 + _rec_get(ids2, table, parent)
args[i] = (args[i][0], 'in', ids2 + \
_rec_get(ids2, table, table._parent_name), table)
i += 1
continue
if fargs[0] in self._inherit_fields:
table = self.pool.get(self._inherit_fields[args[i][0]][0])
field = table._columns.get(fargs[0], False)
if len(fargs) > 1:
if field._type == 'many2one':
args[i] = (fargs[0], 'inselect',