예제 #1
0
# manage_results screen.
Unit = StringField(
    'Unit',
    schemata="Description",
    widget=StringWidget(
        label=_("Unit"),
        description=_(
            "The measurement units for this analysis service' results, e.g. "
            "mg/l, ppm, dB, mV, etc."),
    ))

# Decimal precision for printing normal decimal results.
Precision = IntegerField(
    'Precision',
    schemata="Analysis",
    widget=IntegerWidget(
        label=_("Precision as number of decimals"),
        description=_(
            "Define the number of decimals to be used for this result."),
    ))

# If the precision of the results as entered is higher than this value,
# the results will be represented in scientific notation.
ExponentialFormatPrecision = IntegerField(
    'ExponentialFormatPrecision',
    schemata="Analysis",
    required=True,
    default=7,
    widget=IntegerWidget(
        label=_("Exponential format precision"),
        description=_(
            "Define the precision when converting values to exponent "
예제 #2
0
Analyst = StringField(
    'Analyst'
)

# The actual uncertainty for this analysis' result, populated from the ranges
# specified in the analysis service when the result is submitted.
Uncertainty = FixedPointField(
    'Uncertainty',
    precision=10,
)

# transitioned to a 'verified' state. This value is set automatically
# when the analysis is created, based on the value set for the property
# NumberOfRequiredVerifications from the Analysis Service
NumberOfRequiredVerifications = IntegerField(
    'NumberOfRequiredVerifications',
    default=1
)

# This field keeps the user_ids of members who verified this analysis.
# After each verification, user_id will be added end of this string
# seperated by comma- ',' .
Verificators = StringField(
    'Verificators',
    default=''
)

schema = schema.copy() + Schema((
    AnalysisService,
    Analyst,
    Attachment,
    DateAnalysisPublished,
예제 #3
0
    ExpressionValidator
from bika.lims import api
from bika.lims import alphanumber
from bika.lims.content.bikaschema import BikaFolderSchema
from bika.lims.idserver import renameAfterCreation
from plone.app.folder.folder import ATFolder
from senaite.storage import logger
from senaite.storage import senaiteMessageFactory as _
from senaite.storage.interfaces import IStorageLayoutContainer, IStorageFacility
from zope.interface import implements

Rows = IntegerField(
    name="Rows",
    default=1,
    widget=IntegerWidget(
        label=_("Rows"),
        description=_("Alphabet letters will be used to represent a row "
                      "within the container")),
    validators=(ExpressionValidator('python: int(value) > 0'),
                ExpressionValidator(
                    'python: here.get_minimum_size()[0] <= int(value)')))

Columns = IntegerField(
    name="Columns",
    default=1,
    widget=IntegerWidget(
        label=_("Columns"),
        description=_("Number of positions per row. Numbers will be used to "
                      "represent a column within a row")),
    validators=(ExpressionValidator('python: int(value) > 0'),
                ExpressionValidator(
                    'python: here.get_minimum_size()[1] <= int(value)')))