Skip to Content
मेन्यू
This question has been flagged
2 Replies
24418 Views

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

Avatar
Discard
Author Best Answer

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
Discard
Best Answer

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
Discard
Related Posts Replies Views Activity
3
मई 25
2688
0
दिस॰ 23
2392
1
जुल॰ 23
2445
0
जुल॰ 22
1906
3
सित॰ 21
21924