<commit_before>__author__ = 'Khudrath'
from openerp.osv import fields, osv

class hotel_activity(osv.Model):
    """
    This Model Represent The activity Creation
    """
    _name = "hotel.activity.type"
    _description = "activity type"

    _columns = {
        'name': fields.char('Activity', size=100, required=True, select=True),
    }

    _order = "name"
    _sql_constraints = [
        ('name_unique', 'unique (name)', "With this activity, record already present..!")
    ]




hotel_activity()
<commit_msg>Validation changes<commit_after>__author__ = 'Khudrath'
from openerp.osv import fields, osv

class hotel_activity(osv.Model):
    """
    This Model Represent The activity Creation
    """
    _name = "hotel.activity.type"
    _description = "activity type"

    _columns = {
        'name': fields.char('Activity', size=100, required=True, select=True),
    }

    _order = "name"
    _sql_constraints = [
        ('name_unique', 'unique (name)', "Activity with this name already exist")
    ]




hotel_activity()

{'fraction_non_alphanumeric': 0.12753623188405797, 'fraction_numerical': 0.005797101449275362, 'mean_word_length': 3.28099173553719, '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': '6616142', 'n_tokens_mistral': 341, 'n_tokens_neox': 320, 'n_words': 79}