تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
7810 أدوات العرض

How can we access currently logined user id in openerp ?

الصورة الرمزية
إهمال

can u elaborate more where u want user_id

أفضل إجابة

For an example, look at the code in: ./addons/base_status/base_state.py

def _get_default_user(self, cr, uid, context=None):

    """ Gives current user id

        :param context: if portal not in context returns False

    """

    if context is None:

        context = {}

    if not context or not context.get('portal'):

        return False

    return uid
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 15
7527
1
نوفمبر 24
2619
4
أبريل 18
8740
0
أكتوبر 16
4184
0
نوفمبر 15
3090