from bika.lims import bikaMessageFactory as _ from bika.lims.utils import t from bika.lims.browser.fields import HistoryAwareReferenceField from bika.lims.browser.widgets import DateTimeWidget from bika.lims.browser.widgets import RecordsWidget from bika.lims.config import PROJECTNAME from bika.lims.content.bikaschema import BikaSchema, BikaFolderSchema from bika.lims.interfaces import IInstrument from bika.lims.utils import to_utf8 from plone.app.folder.folder import ATFolder from zope.interface import implements from datetime import date from DateTime import DateTime from bika.lims.config import QCANALYSIS_TYPES schema = BikaFolderSchema.copy() + BikaSchema.copy() + Schema(( ReferenceField('InstrumentType', vocabulary='getInstrumentTypes', allowed_types=('InstrumentType',), relationship='InstrumentInstrumentType', required=1, widget=SelectionWidget( format='select', label=_("Instrument type"), ), ), ReferenceField('Manufacturer', vocabulary='getManufacturers', allowed_types=('Manufacturer',),
from AccessControl import ClassSecurityInfo from Products.ATExtensions.ateapi import RecordWidget from Products.Archetypes.public import * from bika.lims.config import PROJECTNAME from Products.CMFCore import permissions as CMFCorePermissions from Products.CMFCore.utils import getToolByName from Products.CMFPlone.utils import safe_unicode from bika.lims.content.bikaschema import BikaSchema, BikaFolderSchema from archetypes.referencebrowserwidget import ReferenceBrowserWidget from plone.app.folder.folder import ATFolder from bika.lims.browser.fields import AddressField from bika.lims.browser.widgets import AddressWidget from bika.lims import PMF, bikaMessageFactory as _ schema = BikaFolderSchema.copy() + BikaSchema.copy() + ManagedSchema(( StringField( 'Name', required=1, searchable=True, validators=('uniquefieldvalidator', ), widget=StringWidget(label=_("Name"), ), ), StringField( 'TaxNumber', widget=StringWidget(label=_("VAT number"), ), ), StringField( 'Phone', widget=StringWidget(label=_("Phone"), ), ), StringField(
from Products.ATContentTypes.content import schemata from Products.Archetypes.public import * from Products.Archetypes.references import HoldingReference from Products.CMFCore.utils import getToolByName from plone.app.folder.folder import ATFolder from zope.interface import implements from bika.lims.content.bikaschema import BikaFolderSchema from baobab.lims import bikaMessageFactory as _ from baobab.lims.config import PROJECTNAME from baobab.lims.browser.storage import getStorageTypesByName from baobab.lims.interfaces import IStorageUnit schema = BikaFolderSchema.copy() + Schema(( StringField( 'Temperature', widget=StringWidget( label=_('Temperature'), ) ), ReferenceField( 'Department', allowed_types=('Department',), relationship='StorageUnitDepartment', vocabulary='getDepartments', referenceClass=HoldingReference, widget=ReferenceWidget( checkbox_bound=0, label=_('Department'),
from AccessControl import ClassSecurityInfo from Products.ATExtensions.ateapi import RecordWidget from Products.Archetypes.public import * from bika.lims.config import PROJECTNAME from Products.CMFCore import permissions as CMFCorePermissions from Products.CMFCore.utils import getToolByName from Products.CMFPlone.utils import safe_unicode from bika.lims.content.bikaschema import BikaSchema, BikaFolderSchema from archetypes.referencebrowserwidget import ReferenceBrowserWidget from plone.app.folder.folder import ATFolder from bika.lims.browser.fields import AddressField from bika.lims.browser.widgets import AddressWidget from bika.lims import PMF, bikaMessageFactory as _ schema = BikaFolderSchema.copy() + BikaSchema.copy() + ManagedSchema(( StringField('Name', required = 1, searchable = True, validators = ('uniquefieldvalidator',), widget = StringWidget( label=_("Name"), ), ), StringField('TaxNumber', widget = StringWidget( label=_("VAT number"), ), ), StringField('Phone', widget = StringWidget(
from bika.lims.utils import t from bika.lims.browser.fields import HistoryAwareReferenceField from bika.lims.browser.widgets import DateTimeWidget from bika.lims.browser.widgets import RecordsWidget from bika.lims.config import PROJECTNAME from bika.lims.content.bikaschema import BikaSchema, BikaFolderSchema from bika.lims.interfaces import IInstrument from bika.lims.utils import to_utf8 from plone.app.folder.folder import ATFolder from zope.interface import implements from datetime import date from DateTime import DateTime from bika.lims.config import QCANALYSIS_TYPES schema = ( BikaFolderSchema.copy() + BikaSchema.copy() + Schema( ( ReferenceField( "InstrumentType", vocabulary="getInstrumentTypes", allowed_types=("InstrumentType",), relationship="InstrumentInstrumentType", required=1, widget=SelectionWidget( format="select", label=_("Instrument type"), visible={"view": "invisible", "edit": "visible"} ), ), ReferenceField( "Manufacturer",
from AccessControl.SecurityInfo import ClassSecurityInfo from Products.Archetypes.public import Schema, StringField, StringWidget from Products.ATContentTypes.content import schemata from Products.Archetypes.public import registerType from Products.CMFPlone.interfaces import IConstrainTypes from Products.CMFCore.utils import getToolByName from plone.app.folder.folder import ATFolder from zope.interface import implements from bika.lims.content.bikaschema import BikaFolderSchema from baobab.lims.interfaces import IMonitoringDevice from baobab.lims import bikaMessageFactory as _ from baobab.lims import config schema = BikaFolderSchema.copy() + Schema((StringField( 'MACAddress', required=1, searchable=True, validators=('uniquefieldvalidator', ), widget=StringWidget(label=_("MAC Address"), description=_("Monitoring Device MAC Address"), visible={ 'edit': 'visible', 'view': 'visible' })), )) schema['description'].schemata = 'default' schema['description'].widget.visible = True