當前位置: 首頁>>代碼示例>>Python>>正文


Python bikaschema.BikaFolderSchema類代碼示例

本文整理匯總了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(
開發者ID:AlcyonSuisse,項目名稱:bika.lims,代碼行數:30,代碼來源:organisation.py

示例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',),
開發者ID:KaskMartin,項目名稱:Bika-LIMS,代碼行數:31,代碼來源:instrument.py

示例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",
開發者ID:bikalabs,項目名稱:bika.lims,代碼行數:31,代碼來源:instrument.py


注:本文中的bika.lims.content.bikaschema.BikaFolderSchema類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。