How to get the current user id in an Odoo Web Controller ?
Bu soru işaretlendi
2
Cevaplar
26319
Görünümler
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
Tartışma hoşunuza mı gidiyor? Sadece okumakla kalmayın, katılın!
Özel özelliklerden yararlanmak ve harika topluluğumuzla etkileşime geçmek için bugün bir hesap oluşturun!
Üye Ol| İlgili Gönderiler | Cevaplar | Görünümler | Aktivite | |
|---|---|---|---|---|
|
|
1
Kas 25
|
4889 | ||
|
|
4
Kas 25
|
5076 | ||
|
|
1
Haz 23
|
4452 | ||
|
|
0
Tem 22
|
3726 | ||
|
Odoo? Why this new name?
Çözüldü
|
|
3
Eyl 21
|
28021 |
Refer this: http://bit.ly/get-current-logged-in-user-id-in-odoo