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

Hi,

I need to stop my customers to create only 2 users in their database how can i restrict this in odoo.

Any one Could you help me..

Thanks in Advance.....

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

you can put constraints on the res.users model as like below.

_constraints = [  (_check_no, 'You cannot create more then 2 users .... ! ! ! !', []) ]

def _check_no(self, cr, uid, ids, context={}):

    user_ids = self.search(cr, uid, [] )

    if len(user_ids) > 2:

        return False

    return True

I hope it will help to achieve your goal.

 

الصورة الرمزية
إهمال
الكاتب

thank you very much for your answer Emipro technologies

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أبريل 15
14092
0
مارس 15
3127
2
أكتوبر 15
6577
1
مارس 15
7470
3
مارس 15
4932