Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
24619 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
2900
0
Des 23
2561
1
Jul 23
2609
0
Jul 22
2034
3
Sep 21
22458