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.....
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Apr 15
|
14063 | ||
|
0
Mar 15
|
3105 | ||
|
2
Oct 15
|
6543 | ||
|
1
Mar 15
|
7449 | ||
|
3
Mar 15
|
4913 |