本文整理汇总了Python中lims.browser.bika_listing.BikaListingView.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python BikaListingView.__init__方法的具体用法?Python BikaListingView.__init__怎么用?Python BikaListingView.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lims.browser.bika_listing.BikaListingView
的用法示例。
在下文中一共展示了BikaListingView.__init__方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from lims.browser.bika_listing import BikaListingView [as 别名]
# 或者: from lims.browser.bika_listing.BikaListingView import __init__ [as 别名]
def __init__(self, context, request, field):
BikaListingView.__init__(self, context, request)
self.selected = [o.UID() for o in getattr(field, field.accessor)()]
self.context_actions = {}
self.catalog = "bika_setup_catalog"
self.contentFilter = {'review_state': 'impossible_state'}
self.base_url = self.context.absolute_url()
self.view_url = self.base_url
self.show_categories = True
self.show_sort_column = False
self.show_select_row = False
self.show_select_all_checkbox = False
self.show_select_column = True
self.pagesize = 999999
self.form_id = 'serviceswidget'
self.columns = {
'Service': {'title': _('Service')},
'Keyword': {'title': _('Keyword'),
'index': 'getKeyword'},
'Method': {'title': _('Method')},
'Calculation': {'title': _('Calculation')},
}
self.review_states = [
{'id':'default',
'title': _('All'),
'contentFilter':{},
'transitions': [],
'columns':['Service',
'Keyword',
'Method',
'Calculation', ]
},
]
示例2: __init__
# 需要导入模块: from lims.browser.bika_listing import BikaListingView [as 别名]
# 或者: from lims.browser.bika_listing.BikaListingView import __init__ [as 别名]
def __init__(self, context, request):
BikaListingView.__init__(self, context, request)
self.show_sort_column = False
self.show_select_row = False
self.show_select_column = False
self.show_workflow_action_buttons = False
self.pagesize = 999999
self.icon = self.portal_url + "/++resource++bika.lims.images/%s_big.png" % \
context.portal_type.lower()
self.title = to_utf8(self.context.Title()) + " " + t(_("Log"))
self.description = ""
self.columns = {
'Version': {'title': _('Version'), 'sortable': False},
'Date': {'title': _('Date'), 'sortable': False},
'User': {'title': _('User'), 'sortable': False},
'Action': {'title': _('Action'), 'sortable': False},
'Description': {'title': _('Description'), 'sortable': False},
}
self.review_states = [
{'id': 'default',
'title': 'All',
'contentFilter': {},
'columns': ['Version',
'Date',
'User',
'Action',
'Description']},
]
示例3: __init__
# 需要导入模块: from lims.browser.bika_listing import BikaListingView [as 别名]
# 或者: from lims.browser.bika_listing.BikaListingView import __init__ [as 别名]
def __init__(self, context, request, fieldvalue, allow_edit):
BikaListingView.__init__(self, context, request)
self.context_actions = {}
self.contentFilter = {'review_state' : 'impossible_state'}
self.context_actions = {}
self.base_url = self.context.absolute_url()
self.view_url = self.base_url
self.show_sort_column = False
self.show_select_row = False
self.show_select_all_checkbox = False
self.show_select_column = False
self.pagesize = 999999
self.allow_edit = allow_edit
self.show_categories = True
# self.expand_all_categories = False
self.specsresults = {}
for specresults in fieldvalue:
self.specsresults[specresults['keyword']] = specresults
self.columns = {
'service': {'title': _('Service'), 'index': 'sortable_title', 'sortable': False},
'min': {'title': _('Min'), 'sortable': False,},
'max': {'title': _('Max'), 'sortable': False,},
'error': {'title': _('Permitted Error %'), 'sortable': False},
'hidemin': {'title': _('< Min'), 'sortable': False},
'hidemax': {'title': _('> Max'), 'sortable': False},
'rangecomment': {'title': _('Range comment'), 'sortable': False, 'toggle': False}
}
self.review_states = [
{'id':'default',
'title': _('All'),
'contentFilter':{},
'transitions': [],
'columns': ['service', 'min', 'max', 'error',
'hidemin', 'hidemax', 'rangecomment'],
},
]
示例4: __init__
# 需要导入模块: from lims.browser.bika_listing import BikaListingView [as 别名]
# 或者: from lims.browser.bika_listing.BikaListingView import __init__ [as 别名]
def __init__(self, context, request, fieldvalue, allow_edit):
BikaListingView.__init__(self, context, request)
self.context_actions = {}
self.contentFilter = {'review_state': 'impossible_state'}
self.base_url = self.context.absolute_url()
self.view_url = self.base_url
self.show_sort_column = False
self.show_select_row = False
self.show_select_all_checkbox = False
self.show_select_column = False
self.pagesize = 999999
self.allow_edit = allow_edit
self.show_categories = True
# self.expand_all_categories = False
self.referenceresults = {}
# we want current field value as a dict
# key:uid, value:{dictionary from field list of dict}
for refres in fieldvalue:
self.referenceresults[refres['uid']] = refres
self.columns = {
'service': {'title': _('Service')},
'result': {'title': _('Expected Result')},
'error': {'title': _('Permitted Error %')},
'min': {'title': _('Min')},
'max': {'title': _('Max')}
}
self.review_states = [
{'id': 'default',
'title': _('All'),
'contentFilter': {},
'transitions': [],
'columns': ['service', 'result', 'error', 'min', 'max'],
},
]