本文整理匯總了Python中bika.lims.content.bikaschema.BikaFolderSchema類的典型用法代碼示例。如果您正苦於以下問題:Python BikaFolderSchema類的具體用法?Python BikaFolderSchema怎麽用?Python BikaFolderSchema使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了BikaFolderSchema類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: ManagedSchema
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(
示例2: Schema
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',),
示例3: Schema
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",