コード例 #1
0
ファイル: invoice.py プロジェクト: Mefistous/OLiMS
     #         vocabulary_display_path_bound=sys.maxsize,
     #         allowed_types=('Client',),
     #         relationship='ClientInvoice',
 ),
 DateTimeField(
     'Invoice Date',
     #         required=1,
     #         vocabulary_display_path_bound=sys.maxsize,
     #         allowed_types=('AnalysisRequest',),
     #         relationship='AnalysisRequestInvoice',
 ),
 DateTimeField(
     'StartDate',
     required=1,
     default_method='current_date',
     widget=DateTimeWidget(label=_("Date"), ),
 ),
 DateTimeField(
     'EndDate',
     required=1,
     default_method='end_date',
     widget=DateTimeWidget(label=_("End Date"), ),
 ),
 TextField(
     'Remarks',
     searchable=True,
     #default_content_type='text/plain',
     #allowed_content_types=('text/plain', ),
     #default_output_type="text/plain",
     widget=TextAreaWidget(
         #   macro="bika_widgets/remarks",
コード例 #2
0
ファイル: arimport.py プロジェクト: pureboy8/OLiMS
 StringField('SamplePoint',
     searchable = True,
     widget = StringWidget(
         label = _("Sample Point"),
     ),
 ),
 StringField('Temperature',
     widget = StringWidget(
         label = _("Temperature"),
     ),
 ),
 DateTimeField('DateImported',
     required = 1,
     widget = DateTimeWidget(
         label = _("Date Imported"),
         size=12,
         visible={'edit': 'visible', 'view': 'visible', 'add': 'visible',
                  'secondary': 'invisible'},
     ),
 ),
 DateTimeField('DateApplied',
     widget = DateTimeWidget(
         label = _("Date Applied"),
         size=12,
         visible={'edit': 'visible', 'view': 'visible', 'add': 'visible',
                  'secondary': 'invisible'},
     ),
 ),
 IntegerField('NumberSamples',
     widget = IntegerWidget(
         label = _("Number of samples"),
     ),
コード例 #3
0
            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"),
        description=_("Installation certificate upload"),
        ),
    ),
    DateTimeField('ExpiryDate',
                  widget = DateTimeWidget(
                            label=_("Expiry Date"),
                            description=_("Date until the certificate is valid"),
        ),
コード例 #4
0
ファイル: supplyorder.py プロジェクト: Mefistous/OLiMS
 #          help =    'contact',
 #     # vocabulary_display_path_bound=sys.maxsize,
 #     #                allowed_types=('Invoice',),
 #     #                referenceClass=HoldingReference,
 #     #                relationship='OrderInvoice',
 #     ),
 DateTimeField(
     'OrderDate',
     required=1,
     default_method='current_date',
     widget=DateTimeWidget(
         label=_("Order Date"),
         size=12,
         render_own_label=True,
         visible={
             'edit': 'visible',
             'view': 'visible',
             'add': 'visible',
             'secondary': 'invisible'
         },
     ),
 ),
 DateTimeField(
     'DateDispatched',
     readonly=True,
     widget=DateTimeWidget(label=_("Date Dispatched"), ),
 ),
 TextField(
     'Remarks',
     searchable=True,
     default_content_type='text/plain',
コード例 #5
0
        required=False,
    ),

    # ~~~~~~~ To be implemented ~~~~~~~
    # ComputedField('InstrumentUID',
    #     expression = 'context.getInstrument() and context.getInstrument().UID() or None',
    #     widget=ComputedWidget(
    #         visible=False,
    #     ),
    # ),
    DateTimeField(
        'DateIssued',
        with_time=1,
        with_date=1,
        widget=DateTimeWidget(
            label=_("Report Date"),
            description=_("Calibration report date"),
        ),
    ),
    DateTimeField(
        'DownFrom',
        with_time=1,
        with_date=1,
        widget=DateTimeWidget(
            label=_("From"),
            description=_(
                "Date from which the instrument is under calibration"),
        ),
    ),
    DateTimeField(
        'DownTo',
        with_time=1,
コード例 #6
0
     'Remarks',
     schemata='Description',
     searchable=True,
     default_content_type='text/plain',
     allowed_content_types=('text/plain', ),
     default_output_type="text/plain",
     widget=TextAreaWidget(
         macro="bika_widgets/remarks",
         label=_("Remarks"),
         append_only=True,
     ),
 ),
 DateTimeField(
     'Date Sampled',
     schemata='Dates',
     widget=DateTimeWidget(label=_("Date Sampled"), ),
 ),
 DateTimeField(
     'Date Received',
     schemata='Dates',
     default_method='current_date',
     widget=DateTimeWidget(label=_("Date Received"), ),
 ),
 DateTimeField(
     'Date Opened',
     schemata='Dates',
     widget=DateTimeWidget(label=_("Date Opened"), ),
 ),
 DateTimeField(
     'Expiry Date',
     schemata='Dates',
コード例 #7
0
        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"), ),
    ),
    # ~~~~~~~ To be implemented ~~~~~~~
    # ComputedField('ClientUID',
    #     expression = 'here.aq_parent.UID()',
    #     widget = ComputedWidget(
    #         visible = False,
    #     ),
    # ),
)


class Attachment(models.Model, BaseOLiMSModel):
    _name = 'olims.attachment'

コード例 #8
0
 StringField(
     'Type',
     vocabulary="getMaintenanceTypes",
     widget=ReferenceWidget(
         checkbox_bound=0,
         label=("Maintenance type", "Type"),
     ),
 ),
 DateTimeField(
     'DownFrom',
     with_time=1,
     with_date=1,
     required=1,
     widget=DateTimeWidget(
         label=_("From"),
         description=_(
             "Date from which the instrument is under maintenance"),
         show_hm=True,
     ),
 ),
 DateTimeField(
     'DownTo',
     with_time=1,
     with_date=1,
     widget=DateTimeWidget(
         label=_("To"),
         description=_("Date until the instrument will not be available"),
         show_hm=True,
     ),
 ),
 StringField('Maintainer',
             widget=StringWidget(
コード例 #9
0
        widget=BooleanWidget(
            label=_("Internal Certificate"),
            description=_("Select if is an in-house calibration certificate")
        )
    ),

    StringField('Agency',
        widget = StringWidget(
            label=_("Agency"),
            description=_("Organization responsible of granting the calibration certificate")
        ),
    ),

    DateTimeField('Date',
        widget = DateTimeWidget(
            label=_("Date"),
            description=_("Date when the calibration certificate was granted"),
        ),
    ),

    DateTimeField('ValidFrom',
        with_time = 1,
        with_date = 1,
        required = 1,
        widget = DateTimeWidget(
            label=_("From"),
            description=_("Date from which the calibration certificate is valid"),
        ),
    ),

    DateTimeField('DownTo',
        with_time = 1,
コード例 #10
0
ファイル: batch.py プロジェクト: pureboy8/OLiMS
     #        base_query={'inactive_state': 'active'},
     #        showOn=True,
     #        colModel=[{'columnName': 'UID', 'hidden': True},
     #                  {'columnName': 'ClientID', 'width': '20', 'label': _('Client ID')},
     #                  {'columnName': 'Title', 'width': '80', 'label': _('Title')}
     #                 ],
     #  ),
 ),
 StringField('ClientBatchID',
             searchable=True,
             required=0,
             widget=StringWidget(label=_("Client Batch ID"))),
 DateTimeField(
     'BatchDate',
     required=False,
     widget=DateTimeWidget(label=_('Date'), ),
 ),
 # ~~~~~~~ To be implemented ~~~~~~~
 # LinesField(
 #     'BatchLabels',
 #     vocabulary="BatchLabelVocabulary",
 #     accessor="getLabelNames",
 #     widget=MultiSelectionWidget(
 #         label=_("Batch Labels"),
 #         format="checkbox",
 #     )
 # ),
 TextField('Remarks',
           searchable=True,
           default_content_type='text/x-web-intelligent',
           allowable_content_types=('text/plain', ),
コード例 #11
0
ファイル: rejectanalysis.py プロジェクト: yasir1brahim/olims
 StringField('Result', ),
 DateTimeField(
     'ResultCaptureDate',
     widget=ComputedWidget(visible=False, ),
 ),
 StringField('ResultDM', ),
 BooleanField(
     'Retested',
     default=False,
 ),
 fields.Char(string='Days'),
 fields.Char(string='Hours'),
 fields.Char(string='Minutes'),
 DateTimeField(
     'DateAnalysisPublished',
     widget=DateTimeWidget(label=_("Date Published"), ),
 ),
 DateTimeField(
     'DueDate',
     widget=DateTimeWidget(label=_("Due Date"), ),
 ),
 IntegerField('Duration', widget=IntegerWidget(label=_("Duration"), )),
 IntegerField('Earliness', widget=IntegerWidget(label=_("Earliness"), )),
 BooleanField(
     'ReportDryMatter',
     default=False,
 ),
 StringField('Analyst', ),
 TextField('Remarks', ),
 FixedPointField(
     'Uncertainty',
コード例 #12
0
ファイル: instrument.py プロジェクト: pureboy8/OLiMS
            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"),
        description=_("Installation certificate upload"),
        )
    ),

) #)
# ~~~~~~~~~~ Irrelevant code for Odoo ~~~~~~~~~~~
# schema.moveField('AssetNumber', before='description')
# schema.moveField('SupplierName', before='Model')