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