Пример #1
0
    DateTimeField(
        'DateDisposed',
        schemata='Dates',
        widget=bika_DateTimeWidget(
            label=_("Date Disposed"),
            visible={'edit': 'hidden'},
        ),
    ),
    ReferenceResultsField(
        'ReferenceResults',
        schemata='Reference Values',
        required=1,
        subfield_validators={
            'result': 'referencevalues_validator',
        },
        widget=ReferenceResultsWidget(label=_("Expected Values"), ),
    ),
    ComputedField(
        'SupplierUID',
        expression='context.aq_parent.UID()',
        widget=ComputedWidget(visible=False, ),
    ),
    ComputedField(
        'ReferenceDefinitionUID',
        expression=
        'here.getReferenceDefinition() and here.getReferenceDefinition().UID() or None',
        widget=ComputedWidget(visible=False, ),
    ),
))

schema['title'].schemata = 'Description'
Пример #2
0
schema = BikaSchema.copy() + Schema((
    ReferenceResultsField(
        'ReferenceResults',
        schemata='Reference Values',
        required=1,
        subfield_validators={
            'result': 'referencevalues_validator',
        },
        widget=ReferenceResultsWidget(
            label=_("Reference Values"),
            description=_(
                "Click on Analysis Categories (against shaded background"
                "to see Analysis Services in each category. Enter minimum "
                "and maximum values to indicate a valid results range. "
                "Any result outside this range will raise an alert. "
                "The % Error field allows for an % uncertainty to be "
                "considered when evaluating results against minimum and "
                "maximum values. A result out of range but still in range "
                "if the % error is taken into consideration, will raise a "
                "less severe alert."),
        ),
    ),
    BooleanField(
        'Blank',
        schemata='Description',
        default=False,
        widget=BooleanWidget(
            label=_("Blank"),
            description=_("Reference sample values are zero or 'blank'"),
        ),