콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
5380 화면

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
4월 15
14351
0
3월 15
3250
2
10월 15
6784
1
3월 15
7795
3
3월 15
5117