Hi everyone!
I developed the code below to read reports and data from odoo:
import os
import xmlrpc.client
url = os.getenv('url')
db = os.getenv('db')
username = os.getenv('user')
password = os.getenv('password')
common = xmlrpc.client.ServerProxy('{}/xmlrpc/2/common'.format(url))
uid = common.authenticate(db, username, password,{})
models = xmlrpc.client.ServerProxy('{}/xmlrpc/2/object'.format(url))models.execute_kw(db, uid, password,'sale.order','check_access_rights',['read'],{'raise_exception':False})
Unfortunately, this code got this error
Fault: Fault 1: 'Traceback (most recent call last):\n File "/opt/odoo14/odoo/odoo/addons/base/controllers/rpc.py", line 88, in xmlrpc_2\n response = self._xmlrpc(service)\n File "/opt/odoo14/odoo/odoo/addons/base/controllers/rpc.py", line 68, in _xmlrpc\n result = dispatch_rpc(service, method, params)\n File "/opt/odoo14/odoo/odoo/http.py", line 142, in dispatch_rpc\n result = dispatch(method, params)\n File "/opt/odoo14/odoo/odoo/service/model.py", line 37, in dispatch\n security.check(db,uid,passwd)\n File "/opt/odoo14/odoo/odoo/service/security.py", line 9, in check\n return res_users.check(db, uid, passwd)\nTypeError: \'Boolean\' object is not callable
I do a research, finding out that my UID may be a error code, however I tried with other password and I got different error. In other words, my credential are correct, but I can't use the API with my user.
I would be grateful with any handy hand.
Best,
Juan Grimaldos