本文整理汇总了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",