WIP lookup commands
This commit is contained in:
parent
1c4d74aa15
commit
888864d647
15
odoo-rpc.py
15
odoo-rpc.py
|
@ -313,7 +313,20 @@ def lookup( model, domains ):
|
|||
# stack.append({ 'model': model, 'id': inst.id, 'file': filename, 'data': size })
|
||||
stack.append( tree )
|
||||
|
||||
return stack
|
||||
# return stack
|
||||
jlog( stack )
|
||||
return [ flatten_stack( obj ) for obj in stack ]
|
||||
|
||||
def flatten_stack( data ):
|
||||
flat = []
|
||||
for key in data.keys():
|
||||
if type(data[key]) != dict:
|
||||
flat.append(key)
|
||||
else:
|
||||
result += flatten_stack(data[key])
|
||||
return result
|
||||
|
||||
|
||||
|
||||
def lookup_old( model, domains ):
|
||||
eprint( "> Lookup: %s %s" % (model,domains) )
|
||||
|
|
Loading…
Reference in New Issue