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'))
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 11/2/16, 6:58 AM|
|Seen: 111 times|
|Last updated: 11/2/16, 7:24 AM|