How to get the current user id in an Odoo Web Controller ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- Müşteri İlişkileri Yönetimi
- e-Commerce
- Muhasebe
- Envanter
- PoS
- Project
- MRP
Bu soru işaretlendi
2
Cevaplar
25048
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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Üye Ol| İlgili Gönderiler | Cevaplar | Görünümler | Aktivite | |
|---|---|---|---|---|
|
|
3
May 25
|
3359 | ||
|
|
0
Ara 23
|
2998 | ||
|
|
1
Tem 23
|
3028 | ||
|
|
0
Tem 22
|
2384 | ||
|
Odoo? Why this new name?
Çözüldü
|
|
3
Eyl 21
|
23941 |
Refer this: http://bit.ly/get-current-logged-in-user-id-in-odoo