Hi,
I follow the docs: https://www.odoo.com/documentation/14.0/webservices/odoo.html
I am trying to make a test connection to demo as shown in the example: $info = ripcord::client('https://demo.odoo.com/start')->start();
Everything goes well. I get the host, database, username, and password.
When I call $common->version(); I get the correct response.
But when trying to $uid = $common->authenticate($db, $username, $password, array()); I get the following error:
Traceback (most recent call last): File "/home/odoo/src/odoo/14.0/odoo/addons/base/controllers/rpc.py", line 69, in xmlrpc_2 response = self._xmlrpc(service) File "/home/odoo/src/odoo/14.0/odoo/addons/base/controllers/rpc.py", line 49, in _xmlrpc result = dispatch_rpc(service, method, params) File "/home/odoo/src/odoo/14.0/odoo/http.py", line 140, in dispatch_rpc result = dispatch(method, params) File "/home/odoo/src/odoo/14.0/odoo/service/common.py", line 56, in dispatch return g[exp_method_name](*params) File "/home/odoo/src/odoo/14.0/odoo/service/common.py", line 27, in exp_authenticate return res_users.authenticate(db, login, password, {**user_agent_env, 'interactive': False}) TypeError: 'list' object is not a mapping
What am I doing wrong?
Thank you, Piotr!
This is a correct answer:
$common = ripcord::client("$url/xmlrpc/2/common");
$version = $common->version();
$uid = $common->authenticate($db, $username, $password, $version);