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
- 会計
- 在庫
- PoS
- Project
- MRP
この質問にフラグが付けられました
2
返信
24495
ビュー
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
関連投稿 | 返信 | ビュー | 活動 | |
---|---|---|---|---|
|
3
5月 25
|
2772 | ||
|
0
12月 23
|
2453 | ||
|
1
7月 23
|
2511 | ||
|
0
7月 22
|
1959 | ||
|
3
9月 21
|
22062 |
Refer this: http://bit.ly/get-current-logged-in-user-id-in-odoo