<commit_before># -*- coding: utf-8 -*-

from datetime import datetime

from odoo import _, api, exceptions, fields, models


class Document(models.Model):

    _name = 'tmc.document'

    name = fields.Char(
        compute='_get_name',
        store=True
    )

    dependence_id = fields.Many2one(
        comodel_name='tmc.dependence',
        domain=[('document_type_ids', '!=', False),
                ('system_ids', 'ilike', u'TMC Base')],
        required=True
    )

    document_type_id = fields.Many2one(
        comodel_name='tmc.document_type',
        required=True
    )

    number = fields.Integer(
        required=True
    )

    period = fields.Integer(
        required=True
    )

    date = fields.Date()

    document_object = fields.Char(
        string="Object"
    )

    document_object_copy = fields.Char(
        compute="_get_document_object_copy"
    )<commit_msg>[IMP] Index enabled on document_object field<commit_after># -*- coding: utf-8 -*-

from datetime import datetime

from odoo import _, api, exceptions, fields, models


class Document(models.Model):

    _name = 'tmc.document'

    name = fields.Char(
        compute='_get_name',
        store=True
    )

    dependence_id = fields.Many2one(
        comodel_name='tmc.dependence',
        domain=[('document_type_ids', '!=', False),
                ('system_ids', 'ilike', u'TMC Base')],
        required=True
    )

    document_type_id = fields.Many2one(
        comodel_name='tmc.document_type',
        required=True
    )

    number = fields.Integer(
        required=True
    )

    period = fields.Integer(
        required=True
    )

    date = fields.Date()

    document_object = fields.Char(
        string="Object",
        index=True
    )

    document_object_copy = fields.Char(
        compute="_get_document_object_copy"
    )
{'fraction_non_alphanumeric': 0.11732753938077133, 'fraction_numerical': 0.0032590983161325366, 'mean_word_length': 2.3551912568306013, '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': '5073673', 'n_tokens_mistral': 583, 'n_tokens_neox': 552, 'n_words': 106}