Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Try using _constraints.
def _check_batch_limit(self, cursor, user, ids, context=None):
for record in self.browse(cursor, user, ids, context=context):
//limit is set as 18 or 20
if len(record.student_registrations) > record.limit:
_constraints = [
(_check_batch_limit, 'Error:Limit reached.', ['student_registrations']),
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 E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 12/8/14, 2:48 PM|
|Seen: 3155 times|
|Last updated: 3/16/15, 8:10 AM|