Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
24445 Vistas

How to get the current user id in an Odoo Web Controller ?

Avatar
Descartar
Autor Mejor respuesta

Hi Yenthe,

In Odoo 8, inside a web controller it doesn't work for me and I'm using that codes instead :

request.uid

or

request.session.uid

Regards,
Slim

Avatar
Descartar
Mejor respuesta

Hi Slim,

You can get the user his id out of the environment its context like this:

http.request.env.context.get('uid')

Regards,
Yenthe

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
3
may 25
2722
0
dic 23
2413
1
jul 23
2473
0
jul 22
1938
3
sept 21
21975