OCA / odoorpc

Python module to pilot your Odoo servers through JSON-RPC.
http://pythonhosted.org/OdooRPC/
GNU Lesser General Public License v3.0
231 stars 123 forks source link

Support of Odoo v14+ API Keys #74

Closed a-willem closed 1 year ago

a-willem commented 2 years ago

Is your feature request related to a problem? If so, please provide clear and concise description of what the problem is.

odoorpc is sending jsonrpc queries to the various /web/* endpoints enable for frontend.

However, Odoo tags such accesses as "interactive" requests, and forbids login using an API Token.

Describe the solution you'd like

The proper way would be to use the unique /jsonrpc endpoint, which would, however, necessitate a refactoring of all requests.

Describe alternatives you've considered

As XMLRPC is deprecated and 2FA is becoming more common, using API tokens will become a necessity. There doesn't seem to be an alternative solution on the longer term. A short-term solution is to disable 2FA for specific accounts.

Happy to provide more detailed feedback if necessary or to give a hand provided I can get a few pointers on where to look at !

smogol-st commented 1 year ago

Hi have same issue here. We moved from V11 to V14 Pro and I wanted to use this new feature for my scripts, as any new users costs some money. As I need to updated some fields, your module is very handy to do that but it don't allows to login with the API key.

To simply read data from odoo I also use another module : aio_odoorpc . On this one, the login using the API-key works.

sebalix commented 1 year ago

Indeed that is something OdooRPC should support, I'll check this issue as soon as I have some time. Thanks for the report.

rivo2302 commented 1 year ago

I have same issue in V15 community . The login with api keys return : odoorpc.error.RPCError: Access Denied

vasi26ro commented 1 year ago

I have the same issue here. Odoo V15 Enterprise

EnricoTaglini commented 1 year ago

Same issue also for me with Odoo V14. Is there an approximate date for the fix? Thanks

sebalix commented 1 year ago

Not yet, I wanted to first fix the CI builds (done in https://github.com/OCA/odoorpc/pull/84), add the support for Odoo 16.0 (https://github.com/OCA/odoorpc/pull/85), now I can tackle this issue, but I can't give a date, I mainly work on this project on my free time.

sebalix commented 1 year ago

Fixed here: https://github.com/OCA/odoorpc/pull/86 I will push a new release soon.