Compare commits

...

1 Commits

Author SHA1 Message Date
Kevin Khao
8b0f12eb27 remove default_code_uniq 2023-07-10 15:01:59 +03:00

View File

@@ -16,16 +16,6 @@ class ProductProduct(models.Model):
active = fields.Boolean(tracking=40)
barcode_type = fields.Char(compute='_compute_barcode_type')
_sql_constraints = [(
# Maybe it could be better to have a constrain per company
# but the company_id field is on product.template,
# not on product.product
# If it's a problem, we'll create a company_id field on
# product.product
'default_code_uniq',
'unique(default_code)',
'This internal reference already exists!')]
@api.model
def _get_barcode_type(self, barcode):
barcode_type = False