How to get the current user id in an Odoo Web Controller ?
لقد تم الإبلاغ عن هذا السؤال
2
الردود
26315
أدوات العرض
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
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيل| المنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
|---|---|---|---|---|
|
|
1
نوفمبر 25
|
4885 | ||
|
|
4
نوفمبر 25
|
5074 | ||
|
|
1
يونيو 23
|
4450 | ||
|
|
0
يوليو 22
|
3725 | ||
|
Odoo? Why this new name?
تم الحل
|
|
3
سبتمبر 21
|
28013 |
Refer this: http://bit.ly/get-current-logged-in-user-id-in-odoo