Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
310 Vistas

We are trying to grant access to our consultants to some of the client testing databases using their Odoo oauth account. Rather than having to setup their users (and passwords) for each database, we would like to grant access via Odoo Oauth provider.

Where can I get the user ID for the Odoo provider? Is this just the e-mail account?



Using my credentials:





Somehow if I leave it blank it is working for the users but it's only granting the access to the database as an external user...


Any help is appreciated

Avatar
Descartar
Mejor respuesta

It doesn't look like there is a controller round in Odoo that just returns a user its ID.

However, you gain knowledge of your partners odoo.com res.users IDs in two ways that may suite your workflow:

  • Enable OAuth via Odoo.com Accounts in your own database and have your partners log in initially with their odoo.com account without creating their account in your database prior to this.
    This way you can read the User ID from your database and use it in your other setups:


  • Ask your partners to login to odoo.com and then have them navigate to either
    • a page in the forum and have them click on their name in the top left. The user will be redirected to a https://odoo.com/forum/user/000000 page, where 000000 is the user ID you're interested in


    • a page they do not have access to and utilize the AccessError response to your advantage, i.e. https://www.odoo.com/my/opportunity/1. In this 403-response the user can see its own user ID (unless you are that one person on this planet who has received the first opportunity from Odoo)


The user Id could also be found in the DOM of odoo.com, but that's probably way to much hassle.


One may probably also ask odoo.com/help to gain knowledge of the own user ID - but any other way mentioned above will definitely be faster.


Apart from that, I don't see any other meaningful way.

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
dic 24
742
1
mar 25
1107
0
oct 24
1149
2
abr 23
25160
0
dic 22
7554