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,
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
Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
Rekisteröidy| Aiheeseen liittyviä artikkeleita | Vastaukset | Näkymät | Toimenpide | |
|---|---|---|---|---|
|
1
huhtik. 15
|
16128 | |||
|
0
maalisk. 15
|
4932 | |||
|
Can someone explain me the xpath?
Ratkaistu
|
2
lokak. 15
|
8759 | ||
|
1
maalisk. 15
|
10093 | |||
|
3
maalisk. 15
|
6682 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.