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:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
2
Replies
24449
Tampilan
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
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
3
Mei 25
|
2727 | ||
|
0
Des 23
|
2419 | ||
|
1
Jul 23
|
2476 | ||
|
0
Jul 22
|
1939 | ||
Odoo? Why this new name?
Diselesaikan
|
|
3
Sep 21
|
21978 |
Refer this: http://bit.ly/get-current-logged-in-user-id-in-odoo