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.
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: 12/19/13, 6:35 AM|
|Seen: 4467 times|
|Last updated: 3/16/15, 8:10 AM|