) ), RemarksField('Remarks', searchable=True, widget=RemarksWidget( label=_("Remarks") ) ), # Custom settings for the assigned analysis services # https://jira.bikalabs.com/browse/LIMS-1324 # Fields: # - uid: Analysis Service UID # - hidden: True/False. Hide/Display in results reports RecordsField('AnalysisServicesSettings', required=0, subfields=('uid', 'hidden',), widget=ComputedWidget(visible=False), ), StringField('CommercialID', searchable=1, required=0, schemata='Accounting', widget=StringWidget( visible={'view': 'visible', 'edit': 'visible'}, label=_('Commercial ID'), description=_("The profile's commercial ID for accounting purposes."), ), ), # When it's set, the system uses the analysis profile's price to quote and the system's VAT is overridden by the # the analysis profile's specific VAT BooleanField('UseAnalysisProfilePrice',
write_permission=permissions.ModifyPortalContent, widget=BooleanWidget( label=_("Ad-Hoc"), visible=False, render_own_label=True, ), ), RemarksField( 'Remarks', widget=RemarksWidget(label=_("Remarks"), ), ), RecordsField( 'RejectionReasons', widget=RejectionWidget( label=_("Sample Rejection"), description=_("Set the Sample Rejection workflow and the reasons"), render_own_label=False, visible=False, ), ), )) schema['title'].required = False class Sample(BaseFolder, HistoryAwareMixin): implements(ISample, IDoNotSupportSnapshots) security = ClassSecurityInfo() displayContentsTab = False schema = schema
), RecordsField( 'PythonImports', required=False, subfields=('module', 'function'), subfield_labels={'module': _('Module'), 'function': _('Function')}, subfield_readonly={'module': False, 'function': False}, subfield_types={'module': 'string', 'function': 'string'}, default=[ {'module': 'math', 'function': 'ceil'}, {'module': 'math', 'function': 'floor'}, ], subfield_validators={ 'module': 'importvalidator', }, widget=BikaRecordsWidget( label=_("Additional Python Libraries"), description=_( "If your formula needs a special function from an external " "Python library, you can import it here. E.g. if you want to " "use the 'floor' function from the Python 'math' module, " "you add 'math' to the Module field and 'floor' to the " "function field. The equivalent in Python would be 'from math " "import floor'. In your calculation you could use then " "'floor([Ca] + [Mg])'. " ), allowDelete=True, ), ), TextField(
RecordsField( 'TestParameters', required=False, subfields=('keyword', 'value'), subfield_labels={ 'keyword': _('Keyword'), 'value': _('Value') }, subfield_readonly={ 'keyword': True, 'value': False }, subfield_types={ 'keyword': 'string', 'value': 'float' }, default=[ { 'keyword': '', 'value': 0 }, ], widget=RecordsWidget( label=_("Test Parameters"), description=_( "To test the calculation, enter values here for all " "calculation parameters. This includes Interim " "fields defined above, as well as any services that " "this calculation depends on to calculate results."), allowDelete=False, ), ),
RecordsField( 'RejectionReasons', widget=RejectionWidget( label=_("Sample Rejection"), description=_("Set the Sample Rejection workflow and the reasons"), render_own_label=False, visible={ 'edit': 'invisible', 'view': 'visible', 'add': 'edit', 'secondary': 'disabled', 'header_table': 'visible', 'sample_registered': { 'view': 'visible', 'edit': 'visible', 'add': 'edit' }, 'to_be_sampled': { 'view': 'visible', 'edit': 'visible' }, 'sampled': { 'view': 'visible', 'edit': 'visible' }, 'to_be_preserved': { 'view': 'visible', 'edit': 'visible' }, 'sample_due': { 'view': 'visible', 'edit': 'visible' }, 'sample_received': { 'view': 'visible', 'edit': 'visible' }, 'attachment_due': { 'view': 'visible', 'edit': 'visible' }, 'to_be_verified': { 'view': 'visible', 'edit': 'visible' }, 'verified': { 'view': 'visible', 'edit': 'visible' }, 'published': { 'view': 'visible', 'edit': 'visible' }, 'invalid': { 'view': 'visible', 'edit': 'visible' }, 'rejected': { 'view': 'visible', 'edit': 'visible' }, }, ), ),