description=_(
                "Description of the actions made during the maintenance process"
            ),
        ),
    ),
    TextField(
        'Remarks',
        default_content_type='text/plain',
        allowed_content_types=('text/plain', ),
        default_output_type="text/plain",
        widget=TextAreaWidget(label=_("Remarks"), ),
    ),
    FixedPointField(
        'Cost',
        default='0.00',
        widget=DecimalWidget(label=_("Price"), ),
    ),
    BooleanField(
        'Closed',
        default='0',
        widget=BooleanWidget(
            label=_("Closed"),
            description=_("Set the maintenance task as closed.")),
    ),
)

# IdField = schema['id']
# schema['description'].required = False
# schema['description'].widget.visible = True
# schema['description'].schemata = 'default'
#
示例#2
0
     #     checkbox_bound = 0,
     #     # format='select',
     #     # label=_("Pricelist for"),
     # ),
 ),
 fields.Selection(
     string='BulkDiscount',
     selection=BULK_DISCOUNT_OPTION
     #widget=SelectionWidget(
     #   label=_("Bulk discount applies"),
     #),
 ),
 FixedPointField(
     'BulkPrice',
     widget=DecimalWidget(
         label=_("Discount %"),
         description=_("Enter discount percentage value"),
     ),
 ),
 BooleanField(
     'Descriptions',
     default=False,
     widget=BooleanWidget(
         label=_("Include descriptions"),
         description=_("Select if the descriptions should be included"),
     ),
 ),
 DateTimeField('ExpirationDate'),
 DateTimeField('EffectiveDate'),
 # ~~~~~~~~~~ View for Remarks does not exist ~~~~~~~~~~~
 #     TextField('Remarks',
 #         searchable=True,
示例#3
0
    ),
    TextField(
        'Description',
        widget=TextAreaWidget(
            label=_('Description'),
            description=_('Used in item listings and search results.'),
        ),
    ),
    StringField('Volume', widget=StringWidget(label=_("Volume"), )),
    StringField('Unit', widget=StringWidget(label=_("Unit"), )),
    FixedPointField(
        'VAT',
        default=14.00,
        default_method='getDefaultVAT',
        widget=DecimalWidget(
            label=_("VAT %"),
            description=_("Enter percentage value eg. 14.0"),
        ),
    ),
    FixedPointField('Price',
                    required=1,
                    widget=DecimalWidget(label=_("Price excluding VAT"), )),
    fields.Float(
        string='TotalPrice',
        compute='_ComputeTotalPrice',
    ),
)


class LabProduct(models.Model, BaseOLiMSModel):
    _name = 'olims.lab_product'
    _rec_name = 'Title'
示例#4
0
    #     ),
    # ~~~~~~~ To be implemented ~~~~~~~
    #     ComputedField('DateReceived',
    #         expression = 'context.aq_parent.getDateReceived()',
    #     ),
    # ~~~~~~~ To be implemented ~~~~~~~
    #     ComputedField('DateSampled',
    #         expression = 'context.aq_parent.getSample().getDateSampled()',
    #     ),
    # ~~~~~~~ To be implemented ~~~~~~~
    #     ComputedField('InstrumentValid',
    #         expression = 'context.isInstrumentValid()'
    #     ),
    FixedPointField(
        'Uncertainty',
        widget=DecimalWidget(label=_("Uncertainty"), ),
    ),
    StringField('DetectionLimitOperand', ),

    # The analysis that was originally rejected
    fields.Many2one(
        string='Analysis',
        comodel_name='olims.analysis',
        # allowed_types=('Analysis',),
        # relationship = 'RejectAnalysisAnalysis',
    ),
)


class RejectAnalysis(models.Model, BaseOLiMSModel):  #Analysis
    _name = 'olims.reject_analysis'
示例#5
0
                schemata='Accounting',
                tumbakto='blabla'),
    StringField('NewField',
                searchable=1,
                required=1,
                schemata='Accounting',
                tumbakto='blabla'),
    FixedPointField(
        'AnalysisProfilePrice',
        schemata="Accounting",
        default='0.00',
        widget=DecimalWidget(
            label=_("Price (excluding VAT)"),
            description=_(
                "Enter percentage value eg. 14.0. This percentage is applied on the Analysis Profile only, overriding "
                "the systems VAT"),
            visible={
                'view': 'visible',
                'edit': 'visible'
            },
        ),
    ),
)


class MyModel(models.Model, BaseOLiMSModel):
    _name = 'mymodel.my_model'


MyModel.initialze(schema)