How to get the current user id in an Odoo Web Controller ?
Pertanyaan ini telah diberikan tanda
2
Replies
26281
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!
Daftar| Post Terkait | Replies | Tampilan | Aktivitas | |
|---|---|---|---|---|
|
|
1
Nov 25
|
4851 | ||
|
|
4
Nov 25
|
5042 | ||
|
|
1
Jun 23
|
4421 | ||
|
|
0
Jul 22
|
3701 | ||
|
Odoo? Why this new name?
Diselesaikan
|
|
3
Sep 21
|
27977 |
Refer this: http://bit.ly/get-current-logged-in-user-id-in-odoo