WIP lookup commands
This commit is contained in:
parent
54e8e42633
commit
1c4d74aa15
10
odoo-rpc.py
10
odoo-rpc.py
|
@ -293,7 +293,7 @@ def lookup_model( muid ):
|
|||
|
||||
return _tree
|
||||
|
||||
def lookup_recs( model, domains ):
|
||||
def lookup( model, domains ):
|
||||
eprint( "> Lookup many: %s %s" % (model,domains) )
|
||||
if model in MODEL_IGNORE:
|
||||
eprint( 'IGNORED' )
|
||||
|
@ -315,7 +315,7 @@ def lookup_recs( model, domains ):
|
|||
|
||||
return stack
|
||||
|
||||
def lookup( model, domains ):
|
||||
def lookup_old( model, domains ):
|
||||
eprint( "> Lookup: %s %s" % (model,domains) )
|
||||
if model in MODEL_IGNORE:
|
||||
print( 'IGNORED' )
|
||||
|
@ -456,13 +456,13 @@ if MODEL in odoo.env:
|
|||
jlog( inst.read()[0] )
|
||||
|
||||
if METHOD == 'lookup':
|
||||
print( lookup( MODEL, args2domains(PARAMS[2:]) ) )
|
||||
jlog( lookup( MODEL, args2domains(PARAMS[2:]) ) )
|
||||
|
||||
if METHOD == 'lookup-model':
|
||||
jlog( lookup_model( Muid(MODEL,PARAMS[2]) ) )
|
||||
|
||||
if METHOD == 'lookup-recs':
|
||||
jlog( lookup_recs( MODEL, args2domains(PARAMS[2:]) ) )
|
||||
# if METHOD == 'lookup-recs':
|
||||
# jlog( lookup_recs( MODEL, args2domains(PARAMS[2:]) ) )
|
||||
|
||||
if METHOD == 'export-json':
|
||||
export_json( MODEL, args2domains(PARAMS[2:]) )
|
||||
|
|
Loading…
Reference in New Issue