remote.py as module

This commit is contained in:
DiG 2022-01-17 23:12:58 +01:00
parent 52d626352e
commit 290dd598fd
1 changed files with 4 additions and 1 deletions

View File

@ -41,6 +41,7 @@ odoo = None
def autolog():
# Then, use the odoorpc.ODOO.load() class method:
global odoo
odoo = odoorpc.ODOO.load('session')
# Or, if you have saved your configuration in another file:
# odoo = odoorpc.ODOO.load('tutorial', '~/my_own_odoorpcrc')
@ -58,7 +59,7 @@ def autolog():
eprint( 'Company: ', user.company_id.name ) # the name of its company
eprint( '_________________________' )
return odoo
# return odoo
@ -104,6 +105,8 @@ def rel_fields( model ):
def login( server = None, port = None, db = None, user = None, passwd = None ):
global odoo
if server:
tsv( 'Server:', server )
else: