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.
The old API defined a unique field as follows:
_sql_constraints = [
('cne_unique', 'unique(cne)', 'cne already exists!')
The new API deprecates this, and recommends to use @api.constrains, but how can I code to check for uniqueness in an efficient way?
this is _constraints which is deprecated (python constraint), not _sql_constraints, see :
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: 3/29/15, 3:11 PM|
|Seen: 1114 times|
|Last updated: 4/14/16, 3:24 AM|