Odoo Help

1

0
1 Answer
1
Burhan Vakharia
2016/12/06 0:56

Hi fasluca,

To restrict the number of users per company,

1) You can create a configuration field in the company (res.company) which stores the maximum number of users allowed in the company.

2) Next, override the create method of Users model (res.users), to check the number of users in a company and if it already the limit is reached then raise a warning.


To learn how to override a create method please refer,

http://odootechnical.com/learn-overriding-create-method-in-odoo-8/


Hope this helps,

Thank You.

2 Comments
Cybrosys Techno Solutions Pvt.Ltd, fasluca
2016/12/06 1:17

can i use ir.rules for this?

Burhan Vakharia
2016/12/06 1:34

No. You cannot use ir.rule. ir.rule is used to create record rules. Your above-mentioned situation cannot be achieved by record rule.

Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now