How to get the current user id in an Odoo Web Controller ?
This question has been flagged
2
Respostes
26280
Vistes
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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Registrar-se| Related Posts | Respostes | Vistes | Activitat | |
|---|---|---|---|---|
|
|
1
de nov. 25
|
4850 | ||
|
|
4
de nov. 25
|
5041 | ||
|
|
1
de juny 23
|
4421 | ||
|
|
0
de jul. 22
|
3701 | ||
|
Odoo? Why this new name?
Solved
|
|
3
de set. 21
|
27977 |
Refer this: http://bit.ly/get-current-logged-in-user-id-in-odoo