<commit_before># -*- encoding: utf-8 -*-
from osv import fields,osv
#the ID for the purchase requisition and the material request
class sale_product(osv.osv):
    _name = "sale.product"
    _description = "Sale Product"
    _columns = {
        'name': fields.char('ID', size=32, required=True),
        'note': fields.char('Description', size=128, required=False),
        'create_uid':  fields.many2one('res.users', 'Creator', readonly=True),
        'create_date': fields.datetime('Creation Date', readonly=True, select=True),
    }
<commit_msg>Add the ID unique constraint<commit_after># -*- encoding: utf-8 -*-
from osv import fields,osv
#the ID for the purchase requisition and the material request
class sale_product(osv.osv):
    _name = "sale.product"
    _description = "Sale Product"
    _columns = {
        'name': fields.char('ID', size=32, required=True),
        'note': fields.char('Description', size=128, required=False),
        'create_uid':  fields.many2one('res.users', 'Creator', readonly=True),
        'create_date': fields.datetime('Creation Date', readonly=True, select=True),
    }
    _sql_constraints = [
        ('name_uniq', 'unique(name)', 'ID must be unique!'),
    ]
{'fraction_non_alphanumeric': 0.15058236272878536, 'fraction_numerical': 0.011647254575707155, 'mean_word_length': 3.812, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6582081', 'n_tokens_mistral': 378, 'n_tokens_neox': 367, 'n_words': 95}