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.
Working on V6.1 on window.
I have added this constraint on a custom module to force the default_code (Product Reference) to be unique but it does not work i can still add products with similar references.
'default_code': fields.char('Reference', size=80, select=True, required=True), } _sql_constraints = [ ('code_uniq', 'unique(default_code)', ("There is a similar SKU/References already in the system please specify another name, SKU must be UNIQUE!")) ]
Any suggestions please. Thank you in advance.
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/19/13, 6:35 AM|
|Seen: 5348 times|
|Last updated: 3/16/15, 8:10 AM|