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:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
2
الردود
24213
أدوات العرض
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
مايو 25
|
2380 | ||
|
0
ديسمبر 23
|
2240 | ||
|
1
يوليو 23
|
2216 | ||
|
0
يوليو 22
|
1808 | ||
Odoo? Why this new name?
تم الحل
|
|
3
سبتمبر 21
|
21536 |
Refer this: http://bit.ly/get-current-logged-in-user-id-in-odoo