Example #1
0
            description=_("The instrument's ID in the lab's asset register"),
        )
    ),

    StringField('Location',
        schemata = 'Additional info.',
        widget = StringWidget(
            label=_("Location"),
            description=_("The room and location where the instrument is installed"),
        )
    ),

    FileField('Photo',
              help='Photo of the instrument',
        widget = FileWidget(
            label = _("Photo image file"),
        ),
    ),
          
    DateTimeField('InstallationDate',
    schemata = 'Additional info.',
    widget = DateTimeWidget(
        label=_("InstallationDate"),
        description=_("The date the instrument was installed"),
        )
    ),

    FileField('InstallationCertificate',
    schemata = 'Additional info.',
    widget = FileWidget(
        label=_("Installation Certificate"),
Example #2
0
        schemata='Accreditation',
        #write_permission = ManageBika,
        widget=StringWidget(
            label=_("Accreditation Reference"),
            description=_(
                "The reference code issued to the lab by the accreditation body"
            ),
        ),
    ),
    # ~~~~~~~ To be implemented ~~~~~~~
    FileField(
        'AccreditationBodyLogo',
        help="Please upload the logo you are authorised to use on your " +
        "website and results reports by your accreditation body. " +
        "Maximum size is 175 x 175 pixels.",
        widget=FileWidget(label=_("Accreditation Logo"), ),
    ),
    fields.Text(
        'AccreditationPageHeader',
        size=10,
        help="Enter the details of your lab`s service accreditations " +
        "here.  The following fields are available:  lab_is_accredited, " +
        "lab_name, lab_country, confidence, accreditation_body_name, " +
        "accreditation_standard, accreditation_reference<br/>"),
)


class Laboratory(models.Model, BaseOLiMSModel):
    _name = 'olims.laboratory'
    _rec_name = 'Name'
Example #3
0
from fields.file_field import FileField
from fields.widget.widget import DateTimeWidget, FileWidget, StringWidget
from base_olims_model import BaseOLiMSModel
from lims import bikaMessageFactory as _

schema = (
    # ~~~~~~~ To be implemented ~~~~~~~
    #          ComputedField('RequestID',
    #     expression = 'here.getRequestID()',
    #     widget = ComputedWidget(
    #         visible = True,
    #     ),
    # ),
    FileField(
        'AttachmentFile',
        widget=FileWidget(label=_("Attachment"), ),
    ),
    fields.Many2one(string='AttachmentType',
                    comodel_name='olims.attachment_type',
                    required=False,
                    help='Attachment Type'),
    StringField(
        'AttachmentKeys',
        searchable=True,
        widget=StringWidget(label=_("Attachment Keys"), ),
    ),
    DateTimeField(
        'DateLoaded',
        required=1,
        default_method='current_date',
        widget=DateTimeWidget(label=_("Date Loaded"), ),
Example #4
0
 #             label = _("Import Option"),
 #             format='select',
 #         ),
 #         vocabulary = ARIMPORT_OPTIONS,
 #     ),
 StringField('FileName',
     searchable = True,
     widget = StringWidget(
         label = _("Filename"),
     ),
 ),
 FileField('OriginalFile',
     searchable = True,
     widget = FileWidget(
         label = _("Original File"),
         visible={'edit': 'invisible',
                  'view': 'visible', 'add': 'invisible'},
     ),
 ),
 StringField('ClientTitle',
     searchable = True,
     widget = StringWidget(
         label = _("Client Name"),
     ),
 ),
 StringField('ClientPhone',
     widget = StringWidget(
         label = _("Client Phone"),
     ),
 ),
 StringField('ClientFax',
Example #5
0
     widget=IntegerWidget(
         label = _("Sort Key"),
         description = _("Numeric value indicating the sort order of objects that are prioritised"),
     ),
 ),
 IntegerField('pricePremium',
     widget=IntegerWidget(
         label = _("Price Premium Percentage"),
         description = _("The percentage used to calculate the price for analyses done at this priority"),
     ),
 ),
       
 FileField('smallIcon',
           help='6x16 pixel icon used for the this priority in listings.',
           widget = FileWidget(
           label = _("Small Icon"),
           ),
 ),
       
 FileField('bigIcon',
           help='32x32 pixel icon used for the this priority in object views.',
           widget = FileWidget(
           label = _("Big Icon"),
           ),
 ),
      
 BooleanField('isDefault',
     widget=BooleanWidget(
         label = _("Default Priority?"),
         description = _("Check this box if this is the default priority"),
     ),
Example #6
0
from lims import bikaMessageFactory as _
from fields.string_field import StringField

from fields.file_field import FileField
from fields.widget.widget import StringWidget, FileWidget
from openerp import fields, models
from models.base_olims_model import BaseOLiMSModel



#schema = BikaSchema.copy() + Schema((
schema = (
             FileField('ReportFile',
            widget = FileWidget(
            label=_("Report"),
        ),
    ),
    StringField('ReportType',
        widget = StringWidget(
            label=_("Report Type"),
            description=_("Report type"),
        ),
    ),

    fields.Many2one(string='Client',
                   comodel_name='olims.client',
#             allowed_types = ('Client',),
#         relationship = 'ReportClient',
#         widget = ReferenceWidget(
#             label=_("Client"),
Example #7
0
    TextField(
        'Instructions',
        default_content_type='text/plain',
        allowed_content_types=('text/plain', ),
        default_output_type="text/plain",
        widget=TextAreaWidget(
            label=_("Method Instructions", "Instructions"),
            description=_(
                "Technical description and instructions intended for analysts"
            ),
        ),
    ),
    FileField(
        'MethodDocument',  # XXX Multiple Method documents please
        widget=FileWidget(
            label=_("Method Document"),
            description=_("Load documents describing the method here"),
        )),

    # The instruments linked to this method. Don't use this
    # method, use getInstrumentUIDs() or getInstruments() instead
    # ~~~~~~~ To be implemented ~~~~~~~
    #     LinesField('_Instruments',
    #         vocabulary='getInstrumentsDisplayList',
    #         widget=MultiSelectionWidget(
    #             modes = ('edit'),
    #             label=_("Instruments"),
    #             description =_(
    #                 "The selected instruments have support for this method. "
    #                 "Use the Instrument edit view to assign "
    #                 "the method to a specific instrument"),
    #         ),
Example #8
0
    fields.Many2one(string='Preparator',
                   comodel_name='olims.lab_contact',
                   help="The person at the supplier who prepared the certificate",
    ),

    fields.Many2one(string='Validator',
                   comodel_name='olims.lab_contact',
                   help="The person at the supplier who approved the certificate"
    ),



    FileField('Document',
        widget = FileWidget(
            label=_("Report upload"),
            description=_("Load the certificate document here"),
        )
    ),

    TextField('Remarks',
        searchable=True,
        default_content_type='text/x-web-intelligent',
        allowable_content_types = ('text/plain', ),
        default_output_type="text/plain",
        mode="rw",
        widget=TextAreaWidget(
            macro="bika_widgets/remarks",
            label=_("Remarks"),
            append_only=True,
        ),
    ),
Example #9
0
    fields.Char(string='postal_city'),
    fields.Char(string='postal_postalcode'),
    fields.Char(string='postal_address'),
    fields.Selection([('physical', 'Physical Address')],
                     string='postal_copy_from'),
    fields.Selection(
        string='PublicationPreference',
        selection=PUBLICATION_PREFS,
        default='email',
    ),
    FileField(
        'Signature',
        help=
        "Upload a scanned signature to be used on printed analysis results reports."
        + "Ideal size is 250 pixels wide by 150 high",
        widget=FileWidget(label=_("Signature"), ),
    ),
    fields.Many2one(
        string='Department',
        comodel_name='olims.department',
    ),
    fields.Many2one(comodel_name='res.users',
                    string='user',
                    domain="[('id', '=', '-1')]"),
)


class LabContact(models.Model, BaseOLiMSModel):  #Person
    _name = 'olims.lab_contact'
    _rec_name = 'Name'