How to get the current user id in an Odoo Web Controller ?
La domanda è stata contrassegnata
2
Risposte
26354
Visualizzazioni
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
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
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
Registrati| Post correlati | Risposte | Visualizzazioni | Attività | |
|---|---|---|---|---|
|
|
1
nov 25
|
4949 | ||
|
|
4
nov 25
|
5138 | ||
|
|
1
giu 23
|
4496 | ||
|
|
0
lug 22
|
3752 | ||
|
Odoo? Why this new name?
Risolto
|
|
3
set 21
|
28100 |
Refer this: http://bit.ly/get-current-logged-in-user-id-in-odoo