This question has been flagged
3829 Views

We have some product with the same barcode (EAN13). Actually is the same product with variations like color but the manufacturer set the same barcode to all variations. How can I set the Barcode Field to Odoo 10 to not check fro duplicate?
Thank you in advance

Avatar
Discard

Use _sql_constraints,

for example ,

_sql_constraints = [('barcode', 'unique(barcode)', 'Barcode number already assigned!')]

barcode = fields.Integer(string="barcode")

Author

Sorry. Maybe is not clear the way I describe the problem. I want the barcode field NOT unique.