Add update domain on view field by the domain of the action

bzr revid: ced-1a49be0bf2d049cf3f5af457f227e59803309920
This commit is contained in:
ced 2007-12-24 14:45:39 +00:00
parent f02188fee1
commit acf7db176c
1 changed files with 8 additions and 0 deletions

View File

@ -1679,6 +1679,14 @@ class orm(object):
fargs = args[i][0].split('.', 1)
field = table._columns.get(fargs[0],False)
if not field:
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(cr, user, [(parent, 'in', ids)], context=context)
return ids + _rec_get(ids2, table, parent)
args[i] = (args[i][0], 'in', ids2 + _rec_get(ids2, table, table._parent_name), table)
i+=1
continue
if len(fargs) > 1: