Exemplo n.º 1
0
 StringField(
     'LabURL',
     schemata='Address',
     #write_permission = ManageBika,
     widget=StringWidget(
         size=60,
         label=_("Lab URL"),
         description=_("The Laboratory's web address"),
     ),
 ),
 IntegerField(
     'Confidence',
     default=100,
     schemata='Accreditation',
     widget=IntegerWidget(
         label=_("Confidence Level %"),
         description=_(
             "This value is reported at the bottom of all published results"
         ),
     ),
 ),
 BooleanField(
     'LaboratoryAccredited',
     default=False,
     schemata='Accreditation',
     #write_permission = ManageBika,
     widget=BooleanWidget(
         label=_("Laboratory Accredited"),
         description=_("Check this box if your laboratory is accredited"),
     ),
 ),
Exemplo n.º 2
0
        'Instructions',
        searchable=True,
        default_content_type='text/plain',
        allowed_content_types=('text/plain'),
        default_output_type="text/plain",
        widget=TextAreaWidget(
            label=_("Instructions"),
            append_only=True,
        ),
    ),
    fields.Many2many(
        string='ARTemplates',
        comodel_name='olims.ar_template',
        required=True,
    ),
    IntegerField(string='Sampling Frequency', required=True, default=7),
    fields.Many2one(string='ClientSRTemplate', comodel_name='olims.client'),
    fields.Many2one(string='Sampler',
                    comodel_name="res.users",
                    domain="[('groups_id', 'in', (14,18))]",
                    required=True),
)


class SRTemplate(models.Model, BaseOLiMSModel):
    _name = 'olims.sr_template'
    _rec_name = 'Template'

    _at_rename_after_creation = True

    def _renameAfterCreation(self, check_auto_id=False):
Exemplo n.º 3
0
         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"),
     ),
 ),
 BooleanField('Status',
     searchable = True,
     widget = StringWidget(
         label = _("Status"),
     ),
 ),
 # ~~~~~~~ To be implemented ~~~~~~~
 #     LinesField('Remarks',
 #         widget = LinesWidget(
 #             label = _("Remarks"),
 #         )
 #     ),
 # ~~~~~~~ To be implemented ~~~~~~~
Exemplo n.º 4
0
from fields.text_field import TextField
from fields.widget.widget import IntegerWidget, BooleanWidget, FileWidget, \
                                TextAreaWidget, StringWidget
# ~~~~~~~~~~ Irrelevant code for Odoo ~~~~~~~~~~~
# schema = BikaSchema.copy() + Schema((
schema = (StringField('name',
              required=1,        
    ),
    TextField('Description',
        widget=TextAreaWidget(
            description = _('Used in item listings and search results.'),
                            )
    ),
          IntegerField('sortKey',
        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"),
              ),
    ),
Exemplo n.º 5
0
    fields.Many2one(string='Instrument',
                    comodel_name='olims.instrument',
        required = False,
        help='Select the preferred instrument'
    ),
    fields.Many2one(string='category',
                   comodel_name='olims.analysis_category',
                   required=True,
                   help="The category the analysis service belongs to",
    ),
    fields.One2many(string='Layout',
                    comodel_name='olims.ws_template_layout',
                    inverse_name='worksheet_layout_id',
    ),
    StringField(string="name"),
    IntegerField('number_of_pos'),
    fields.Many2many(comodel_name="olims.reference_definition", string="ControlAnalysis"),
)
schema_worksheet_analysis_servive = (fields.Many2one(string="worksheet_analysis_id",
        comodel_name="olims.worksheet_template"
        ),
        fields.Many2one(string="Service",
            comodel_name="olims.analysis_service",
            domain="[('category', '=', Category)]",
        ),
        StringField(string="Keyword",
            compute="_ComputeAnalysisServiceFields"
        ),
        StringField(string="Method",
            compute="_ComputeAnalysisServiceFields"
        ),
Exemplo n.º 6
0
                     "written in italics."),
              ),
 ),
 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."),
             ),
 ),
 IntegerField('Precision',
              schemata="Analysis",
              widget=IntegerWidget(
                  label = _("Precision as number of decimals"),
                  description=_(
                      "Define the number of decimals to be used for this result."),
              ),
 ),
 IntegerField('ExponentialFormatPrecision',
              schemata="Analysis",
              default = 7,
              widget=IntegerWidget(
                  label = _("Exponential format precision"),
                  description=_(
                      "Define the precision when converting values to exponent " + \
                      "notation.  The default is 7."),
              ),
 ),
 FixedPointField('LowerDetectionLimit',
                 schemata="Analysis",
Exemplo n.º 7
0
    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',
        widget=DecimalWidget(label=_("Uncertainty"), ),
    ),
    StringField('DetectionLimitOperand', ),

    # The analysis that was originally rejected
    fields.Many2one(