Skip to content Skip to sidebar Skip to footer

Odoo 11.0 Make Field Unique

Can somebody explain how to make a field unique value? Like the invoice number, order number, ... each value must be unique. I need this for the product internal_reference and co

Solution 1:

_sql_constraints = [
         ('Any_name', 'unique (your_field_name)','Your message!')]

Post a Comment for "Odoo 11.0 Make Field Unique"