Added save command

This commit is contained in:
DiG 2022-02-06 02:26:16 +01:00
parent c66f39f0f0
commit 742df99887
1 changed files with 10 additions and 0 deletions

View File

@ -409,6 +409,16 @@ def save( model, domains, recurse = False, force = False ):
jlog( unique_models )
to_browse = groupby_model( unique_models )
for mod in to_browse.keys():
print('loading %s %s' % (to_browse[mod].length, mod) )
if mod in odoo.env:
try:
for inst in odoo.env[mod].browse( to_browse[mod] ):
print( inst.id, inst.name )
except:
eprint('Model %s not found' % (mod)
continue
# list = odoo.env[mod].browse( to_browse[mod] )
return to_browse