Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
24449 Tampilan

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

Avatar
Buang
Penulis Jawaban Terbai

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
3
Mei 25
2727
0
Des 23
2419
1
Jul 23
2476
0
Jul 22
1939
3
Sep 21
21978