CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Same question asked by Ahmad safi
I answered him following
You create a model having 2 fields user_id(Many2one, unique) and user_creation_limit(integer).
That may have tree view and form view.
Then override the create method of res.users
def create(self, vals):
# Calculate this user is eligible to create
# using self._uid
# by fetching list of all users and their created user id(create_uid )
return super(ModelName, self).create(vals)
raise UserError(_('Your limit is exceed'))
About This Community
Odoo Training Center
|Asked: 11/2/16, 6:06 AM|
|Seen: 314 times|
|Last updated: 11/2/16, 7:31 AM|