<commit_before># ~~~~~~~~~~ Irrelevant code for Odoo ~~~~~~~~~~~
# from dependencies.dependency import implements
# from dependencies import atapi
# from dependencies.dependency import BaseContent
# from lims.interfaces import IMultifile
# from lims.content.bikaschema import BikaSchema
# from lims import bikaMessageFactory as _
# from lims import config

from lims import bikaMessageFactory as _
from fields.string_field import StringField
from fields.widget.widget import StringWidget
from openerp import fields, models
from base_olims_model import BaseOLiMSModel

#schema = BikaSchema.copy() + atapi.Schema((
schema = (
    StringField('DocumentID',
    required=1,
    validators=('uniquefieldvalidator',),
    widget = StringWidget(
        label=_("Document ID"),
        )
    ),
# ~~~~~~~ To be implemented ~~~~~~~
    # FileField('File',
    # required=1,
    # widget = FileWidget(
    #     label=_("Document"),
    #     description=_("File upload "),
    #     )
    # ),

    StringField('DocumentVersion',
    widget = StringWidget(
        label=_("Document Version"),
        )
    ),

    StringField('DocumentLocation',
    widget = StringWidget(
        label=_("Document Location"),
        description=_("Location where the document set is shelved"),
        )
    ),

    StringField('DocumentType',
    required=1,
    widget = StringWidget(
        label=_("Document Type"),
        description=_("Type of document (e.g. user manual, instrument specifications, image, ...)"),
        )
    ),
)

# TitleField = schema['title']
# TitleField.required = 0
# TitleField.widget.visible = False

class Multifile(models.Model, BaseOLiMSModel): #BaseContent
    _name = 'olims.multifile'
    # It implements the IEthnicity interface
    # implements(IMultifile)
    # schema = schema

# Activating the content type in Archetypes' internal types registry
#atapi.registerType(Multifile, config.PROJECTNAME)
Multifile.initialze(schema)<commit_msg>Added a relational field for 'Instrument'.<commit_after># ~~~~~~~~~~ Irrelevant code for Odoo ~~~~~~~~~~~
# from dependencies.dependency import implements
# from dependencies import atapi
# from dependencies.dependency import BaseContent
# from lims.interfaces import IMultifile
# from lims.content.bikaschema import BikaSchema
# from lims import bikaMessageFactory as _
# from lims import config

from lims import bikaMessageFactory as _
from fields.string_field import StringField
from fields.file_field import FileField
from fields.widget.widget import StringWidget
from openerp import fields, models
from base_olims_model import BaseOLiMSModel

#schema = BikaSchema.copy() + atapi.Schema((
schema = (
    StringField('DocumentID',
    required=1,
    validators=('uniquefieldvalidator',),
    widget = StringWidget(
        label=_("Document ID"),
        )
    ),
    FileField('File',
    required=1,
#     widget = FileWidget(
#         label=_("Document"),
#         description=_("File upload "),
#         )
    ),

    StringField('DocumentVersion',
    widget = StringWidget(
        label=_("Document Version"),
        )
    ),

    StringField('DocumentLocation',
    widget = StringWidget(
        label=_("Document Location"),
        description=_("Location where the document set is shelved"),
        )
    ),

    StringField('DocumentType',
    required=1,
    widget = StringWidget(
        label=_("Document Type"),
        description=_("Type of document (e.g. user manual, instrument specifications, image, ...)"),
        )
    ),
    fields.Many2one(string='Instrument',
                   comodel_name='olims.instrument',
                   required = False,
    )
)

# TitleField = schema['title']
# TitleField.required = 0
# TitleField.widget.visible = False

class Multifile(models.Model, BaseOLiMSModel): #BaseContent
    _name = 'olims.multifile'
    # It implements the IEthnicity interface
    # implements(IMultifile)
    # schema = schema

# Activating the content type in Archetypes' internal types registry
#atapi.registerType(Multifile, config.PROJECTNAME)
Multifile.initialze(schema)
{'fraction_non_alphanumeric': 0.11304135062392953, 'fraction_numerical': 0.002202104232933692, 'mean_word_length': 3.537180910099889, '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': '2928428', 'n_tokens_mistral': 1153, 'n_tokens_neox': 1145, 'n_words': 291}