Skip to content

odoorpc.error.RPCError: Access Denied when using API Key #64

@fotisp

Description

@fotisp

When using the new "API Keys" functionality on Odoo 14.0, the authentication fails with an authentication denied error message.

#
# # Prepare the connection to the server
odoo = odoorpc.ODOO('localhost, port='8069')

odoo.login('odoo', 'admin', 'b934327276dca39fe1081327bf3f8e8b780da22e0')

The error

File "/tmp/src/odoorpc/odoo.py", line 345, in login
{'db': db, 'login': login, 'password': password},
File "/tmp/src/odoorpc/odoo.py", line 274, in json
data['error']['data']['message'], data['error']
odoorpc.error.RPCError: Access Denied python-BaseException

The same code with the actual user password works fine.

Furthermore the vanilla code

import xmlrpc.client


url = 'http://localhost:8069'
db = 'odoo'
username = 'admin'
password = 'b934327276dca39fe1081327bf3f8e8b780da22e0'

common = xmlrpc.client.ServerProxy('{}/xmlrpc/2/common'.format(url))
common.version()

uid = common.authenticate(db, username, password, {})
print(common.version())

print(uid)

Works just fine.

I have tried this in Master.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions