<commit_before># -*- coding: utf-8 -*-
##############################################################################
#
#    EDM, module for Odoo, Open Source Management Solution
#    Copyright (C) 2014 InsPyration EURL (<http://www.inspyration.fr>).
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU Affero General Public License as
#    published by the Free Software Foundation, either version 3 of the
#    License, or (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Affero General Public License for more details.
#
#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

__author__ = "<NAME> & <NAME>"
__copyright__ = "Copyright 2014"
__credits__ = ["<NAME>", "<NAME>", "www.insPyration.fr", "www.formation-python.com"]
__license__ = "AGPL"
__version__ = "1.0"
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
__status__ = "Production"

import openerp
from openerp.osv import fields, osv
from datetime import timedelta, datetime


#==============================================================================#
#                              class document                                  #
#==============================================================================#
class Document(osv.Model):
    
    _name = 'inspy.edm.doc'
    _description = "Document"
    
    _columns = {
        'name': fields.char(
            'Title',
            size=256,
            required=True,
            select=True,
        ),
        'description': fields.text(
            string="Description",
        ),
        'type_id': fields.many2one(
            'semantics.signifier',
            required=True,
            string="Type",
            domain=[('field_id.name','=',"Partner's documents types")],
            help="Type = Partner's documents types"
        ),
        'file_type': fields.selection(
            [ ('url','URL'), ('binary','Binary'), ],
            'File type',
            help="Binary File or URL",
            required=True,
        ),
        'content': fields.binary(
            string="Content",
        ),
        'content_filename': fields.char(
            'Content filename',
            size=256,
            select=True,
        ),
        'url': fields.char(
            size=1024,
            string="Url",
        ),
        'additional_information': fields.text(
            string="Additional information",
        ),
        'partner_id': fields.many2one(
            'res.partner',
            string="Partner",
        ),
        'tag_ids': fields.many2many(
            'semantics.signifier',
            'inspy_doc_tag_rel',
            'tag_id',
            'doc_id',
            string="Tags",
            domain=[('field_id.name','=',"Partner's documents key words")],
            help="Type = Partner's documents key words"
        ),
    }

    _defaults = {
        'file_type': 'binary',
    }
#==============================================================================#
#                                 class type                                   #
#==============================================================================#
class Type(osv.Model):
    
    _name = 'inspy.edm.type'
    _description = "Document"
    
    _columns = { 
        'name': fields.char(
            'Title',
            size=256,
            required=True,
            select=True,
        ),
    }<commit_msg>Document: Change help to tags field<commit_after># -*- coding: utf-8 -*-
##############################################################################
#
#    EDM, module for Odoo, Open Source Management Solution
#    Copyright (C) 2014 InsPyration EURL (<http://www.inspyration.fr>).
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU Affero General Public License as
#    published by the Free Software Foundation, either version 3 of the
#    License, or (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Affero General Public License for more details.
#
#    You should have received a copy of the GNU Affero General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

__author__ = "<NAME> & <NAME>"
__copyright__ = "Copyright 2014"
__credits__ = ["<NAME>", "<NAME>", "www.insPyration.fr", "www.formation-python.com"]
__license__ = "AGPL"
__version__ = "1.0"
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
__status__ = "Production"

import openerp
from openerp.osv import fields, osv
from datetime import timedelta, datetime


#==============================================================================#
#                              class document                                  #
#==============================================================================#
class Document(osv.Model):
    
    _name = 'inspy.edm.doc'
    _description = "Document"
    
    _columns = {
        'name': fields.char(
            'Title',
            size=256,
            required=True,
            select=True,
        ),
        'description': fields.text(
            string="Description",
        ),
        'type_id': fields.many2one(
            'semantics.signifier',
            required=True,
            string="Type",
            domain=[('field_id.name','=',"Partner's documents types")],
            help="Type = Partner's documents types"
        ),
        'file_type': fields.selection(
            [ ('url','URL'), ('binary','Binary'), ],
            'File type',
            help="Binary File or URL",
            required=True,
        ),
        'content': fields.binary(
            string="Content",
        ),
        'content_filename': fields.char(
            'Content filename',
            size=256,
            select=True,
        ),
        'url': fields.char(
            size=1024,
            string="Url",
        ),
        'additional_information': fields.text(
            string="Additional information",
        ),
        'partner_id': fields.many2one(
            'res.partner',
            string="Partner",
        ),
        'tag_ids': fields.many2many(
            'semantics.signifier',
            'inspy_doc_tag_rel',
            'tag_id',
            'doc_id',
            string="Tags",
            domain=[('field_id.name','=',"Partner's documents key words")],
            help="Tags = Partner's documents key words"
        ),
    }

    _defaults = {
        'file_type': 'binary',
    }
#==============================================================================#
#                                 class type                                   #
#==============================================================================#
class Type(osv.Model):
    
    _name = 'inspy.edm.type'
    _description = "Document"
    
    _columns = { 
        'name': fields.char(
            'Title',
            size=256,
            required=True,
            select=True,
        ),
    }
{'fraction_non_alphanumeric': 0.22851511169513797, 'fraction_numerical': 0.007358738501971091, 'mean_word_length': 2.195214105793451, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6737209', 'n_tokens_mistral': 2001, 'n_tokens_neox': 1865, 'n_words': 501}