当前位置: 首页>>代码示例>>Python>>正文


Python AnalysesView.__init__方法代码示例

本文整理汇总了Python中bika.lims.browser.analyses.AnalysesView.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python AnalysesView.__init__方法的具体用法?Python AnalysesView.__init__怎么用?Python AnalysesView.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在bika.lims.browser.analyses.AnalysesView的用法示例。


在下文中一共展示了AnalysesView.__init__方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from bika.lims.browser.analyses import AnalysesView [as 别名]
# 或者: from bika.lims.browser.analyses.AnalysesView import __init__ [as 别名]
    def __init__(self, context, request):
        AnalysesView.__init__(self, context, request)
        self.contentFilter = {'portal_type':'ReferenceAnalysis',
                              'path': {'query':"/".join(self.context.getPhysicalPath()),
                                       'level':0}}
        self.show_select_row = False
        self.show_sort_column = False
        self.show_select_column = False
        self.allow_edit = False

        self.columns = {
            'id': {'title': _('ID')},
            'Category': {'title': _('Category')},
            'Service': {'title': _('Service')},
            'Worksheet': {'title': _('Worksheet')},
            'Result': {'title': _('Result')},
            'Uncertainty': {'title': _('+-')},
            'DueDate': {'title': _('Due Date')},
            'retested': {'title': _('Retested'), 'type':'boolean'},
            'state_title': {'title': _('State')},
        }
        self.review_states = [
            {'id':'all',
             'title': _('All'),
             'transitions': [],
             'columns':['id',
                        'Category',
                        'Service',
                        'Worksheet',
                        'Result',
                        'Uncertainty',
                        'DueDate',
                        'state_title'],
             },
        ]
开发者ID:cheslip,项目名称:Bika-LIMS,代码行数:37,代码来源:referencesample.py

示例2: __init__

# 需要导入模块: from bika.lims.browser.analyses import AnalysesView [as 别名]
# 或者: from bika.lims.browser.analyses.AnalysesView import __init__ [as 别名]
    def __init__(self, context, request):
        AnalysesView.__init__(self, context, request)
        self.icon = "++resource++bika.lims.images/worksheet_big.png"
        self.contentFilter = {}
        self.show_select_row = False
        self.show_sort_column = False
        self.allow_edit = True

        self.columns = {
            'Pos': {'title': _('Position')},
            'DueDate': {'title': _('Due date')},
            'Category': {'title': _('Category')},
            'Service': {'title': _('Analysis')},
            'Result': {'title': _('Result')},
            'Uncertainty': {'title': _('+-')},
            'retested': {'title': _('Retested'), 'type':'boolean'},
##            'Attachments': {'title': _('Attachments')},
            'state_title': {'title': _('State')},
        }
        self.review_states = [
            {'title': _('All'), 'id':'all',
             'transitions': ['submit', 'verify', 'retract', 'unassign'],
             'columns':['Pos',
                        'Category',
                        'Service',
                        'Result',
                        'Uncertainty',
##                        'Attachments',
                        'DueDate',
                        'state_title'],
             },
        ]
开发者ID:lemoene,项目名称:Bika-LIMS,代码行数:34,代码来源:worksheet.py

示例3: __init__

# 需要导入模块: from bika.lims.browser.analyses import AnalysesView [as 别名]
# 或者: from bika.lims.browser.analyses.AnalysesView import __init__ [as 别名]
    def __init__(self, context, request):
        BaseView.__init__(self, context, request)
        self.catalog = 'bika_analysis_catalog'
        self.contentFilter = {'portal_type':'Analysis',
                              'review_state':'sample_received',
                              'worksheetanalysis_review_state':'unassigned'}
        self.icon = self.portal_url + "/++resource++bika.lims.images/worksheet_big.png"
        self.contentFilter = {}
        self.show_select_row = False
        self.show_sort_column = False
        self.allow_edit = True
        self.show_categories = False
        self.expand_all_categories = False

        self.columns = {
            'Pos': {'title': _('Position')},
            'DueDate': {'title': _('Due Date')},
            'Service': {'title': _('Analysis')},
            'getPriority': {'title': _('Priority')},
            'Method': {'title': _('Method')},
            'DetectionLimit': {
                'title': _('DL'),
                'sortable': False,
                'toggle': False},
            'Result': {'title': _('Result'),
                       'input_width': '6',
                       'input_class': 'ajax_calculate numeric',
                       'sortable': False},
            'Uncertainty': {'title': _('+-')},
            'ResultDM': {'title': _('Dry')},
            'retested': {'title': "<img src='++resource++bika.lims.images/retested.png' title='%s'/>" % _('Retested'),
                         'type':'boolean'},
            'Attachments': {'title': _('Attachments')},
            'Instrument': {'title': _('Instrument')},
            'state_title': {'title': _('State')},
            'Priority': { 'title': _('Priority'), 'index': 'Priority'},
        }
        self.review_states = [
            {'id':'default',
             'title': _('All'),
             'contentFilter':{},
             'transitions': [{'id':'submit'},
                             {'id':'verify'},
                             {'id':'retract'},
                             {'id':'unassign'}],
             'columns':['Pos',
                        'Service',
                        'Priority',
                        'Method',
                        'Instrument',
                        'DetectionLimit',
                        'Result',
                        'Uncertainty',
                        'DueDate',
                        'state_title',
                        'Attachments']
             },
        ]
开发者ID:151706061,项目名称:bika.lims,代码行数:60,代码来源:analyses.py

示例4: __init__

# 需要导入模块: from bika.lims.browser.analyses import AnalysesView [as 别名]
# 或者: from bika.lims.browser.analyses.AnalysesView import __init__ [as 别名]
    def __init__(self, context, request):
        AnalysesView.__init__(self, context, request)
        self.catalog = 'bika_analysis_catalog'
        self.contentFilter = {'portal_type':'ReferenceAnalysis',
                              'path': {'query':"/".join(self.context.getPhysicalPath()),
                                       'level':0}}
        self.show_select_row = False
        self.show_sort_column = False
        self.show_select_column = False
        self.allow_edit = False

        self.columns = {
            'id': {'title': _('ID'), 'toggle':False},
            'getReferenceAnalysesGroupID': {'title': _('QC Sample ID'), 'toggle': True},
            'Category': {'title': _('Category'), 'toggle':True},
            'Service': {'title': _('Service'), 'toggle':True},
            'Worksheet': {'title': _('Worksheet'), 'toggle':True},
            'Method': {
                'title': _('Method'),
                'sortable': False,
                'toggle': True},
            'Instrument': {
                'title': _('Instrument'),
                'sortable': False,
                'toggle': True},
            'Result': {'title': _('Result'), 'toggle':True},
            'Captured': {'title': _('Captured'), 'toggle':True},
            'Uncertainty': {'title': _('+-'), 'toggle':True},
            'DueDate': {'title': _('Due Date'),
                        'index': 'getDueDate',
                        'toggle':True},
            'retested': {'title': _('Retested'), 'type':'boolean', 'toggle':True},
            'state_title': {'title': _('State'), 'toggle':True},
        }
        self.review_states = [
            {'id':'default',
             'title': _('All'),
             'contentFilter':{},
             'transitions': [],
             'columns':['id',
                        'getReferenceAnalysesGroupID',
                        'Category',
                        'Service',
                        'Worksheet',
                        'Method',
                        'Instrument',
                        'Result',
                        'Captured',
                        'Uncertainty',
                        'DueDate',
                        'state_title'],
             },
        ]
        self.anjson = {}
开发者ID:fqblab,项目名称:bika.lims,代码行数:56,代码来源:referencesample.py

示例5: __init__

# 需要导入模块: from bika.lims.browser.analyses import AnalysesView [as 别名]
# 或者: from bika.lims.browser.analyses.AnalysesView import __init__ [as 别名]
 def __init__(self, context, request, **kwargs):
     AnalysesView.__init__(self, context, request)
     for k,v in kwargs.items():
         self.contentFilter[k] = v
     if kwargs.get('getPointOfCapture', '') == 'lab':
         self.allow_edit = False
         self.columns['Request'] = {'title': _("Request"),
                                    'sortable':False}
         # Add Request column
         pos = self.review_states[0]['columns'].index('Service') + 1
         self.review_states[0]['columns'].insert(pos, 'Request')
开发者ID:udithap,项目名称:Bika-LIMS,代码行数:13,代码来源:sample.py

示例6: __init__

# 需要导入模块: from bika.lims.browser.analyses import AnalysesView [as 别名]
# 或者: from bika.lims.browser.analyses.AnalysesView import __init__ [as 别名]
 def __init__(self, context, request, **kwargs):
     AnalysesView.__init__(self, context, request)
     self.show_select_column = False
     self.allow_edit = False
     self.show_workflow_action_buttons = False
     for k,v in kwargs.items():
         self.contentFilter[k] = v
     self.columns['Request'] = {'title': _("Request"),
                                'sortable':False}
     # Add Request column
     pos = self.review_states[0]['columns'].index('Service') + 1
     self.review_states[0]['columns'].insert(pos, 'Request')
开发者ID:socheathly,项目名称:Bika-LIMS,代码行数:14,代码来源:sample.py

示例7: __init__

# 需要导入模块: from bika.lims.browser.analyses import AnalysesView [as 别名]
# 或者: from bika.lims.browser.analyses.AnalysesView import __init__ [as 别名]
 def __init__(self, context, request, **kwargs):
     AnalysesView.__init__(self, context, request)
     self.show_select_column = False
     self.allow_edit = False
     self.show_workflow_action_buttons = False
     for k, v in kwargs.items():
         self.contentFilter[k] = v
     self.columns["Request"] = {"title": _("Request"), "sortable": False}
     self.columns["Priority"] = {"title": _("Priority"), "sortable": False}
     # Add Request and Priority columns
     pos = self.review_states[0]["columns"].index("Service") + 1
     self.review_states[0]["columns"].insert(pos, "Request")
     pos += 1
     self.review_states[0]["columns"].insert(pos, "Priority")
开发者ID:bikalabs,项目名称:bika.lims,代码行数:16,代码来源:analyses.py

示例8: __init__

# 需要导入模块: from bika.lims.browser.analyses import AnalysesView [as 别名]
# 或者: from bika.lims.browser.analyses.AnalysesView import __init__ [as 别名]
 def __init__(self, context, request, **kwargs):
     AnalysesView.__init__(self, context, request)
     self.show_workflow_action_buttons = False
     for k,v in kwargs.items():
         self.contentFilter[k] = v
     self.contentFilter['getSampleUID'] = context.UID()
     self.columns['Request'] = {
         'title': _("Request"),
         'attr': 'getParentTitle',
         'replace_url': 'getParentURL',
         'sortable': False}
     # Add Request columns
     pos = self.review_states[0]['columns'].index('Service') + 1
     self.review_states[0]['columns'].insert(pos, 'Request')
     pos += 1
开发者ID:xispa,项目名称:bika.lims,代码行数:17,代码来源:analyses.py

示例9: __init__

# 需要导入模块: from bika.lims.browser.analyses import AnalysesView [as 别名]
# 或者: from bika.lims.browser.analyses.AnalysesView import __init__ [as 别名]
    def __init__(self, context, request, **kwargs):
        AnalysesView.__init__(self, context, request, **kwargs)
        self.columns['getReferenceAnalysesGroupID'] = {'title': _('QC Sample ID'),
                                                       'sortable': False}
        self.columns['Partition'] = {'title': _('Reference Sample'),
                                     'sortable': False}
        self.columns['Retractions'] = {'title': '',
                                                  'sortable': False}
        self.review_states[0]['columns'] = ['Service',
                                            'getReferenceAnalysesGroupID',
                                            'Partition',
                                            'Result',
                                            'Uncertainty',
                                            'CaptureDate',
                                            'Retractions']


        analyses = self.context.getReferenceAnalyses()
        asuids = [an.UID() for an in analyses]
        self.catalog = 'bika_analysis_catalog'
        self.contentFilter = {'UID': asuids}
        self.anjson = {}
开发者ID:Ammy2,项目名称:Bika-LIMS,代码行数:24,代码来源:instrument.py

示例10: __init__

# 需要导入模块: from bika.lims.browser.analyses import AnalysesView [as 别名]
# 或者: from bika.lims.browser.analyses.AnalysesView import __init__ [as 别名]
    def __init__(self, context, request, **kwargs):
        AnalysesView.__init__(self, context, request)
        self.title = _("Analyses pending")
        self.show_select_all_checkbox = False
        self.show_categories = False
        self.pagesize = 50
        # Get temp objects that are too time consuming to obtain every time
        self.worksheet_catalog = getToolByName(
            context, CATALOG_WORKSHEET_LISTING)
        # Check if the filter bar functionality is activated or not
        self.filter_bar_enabled =\
            self.context.bika_setup.getDisplayAdvancedFilterBarForAnalyses()

        # each editable item needs it's own allow_edit
        # which is a list of field names.
        self.allow_edit = True

        self.columns['AnalysisRequest'] = {
            'title': _('Analysis Request'),
            'attr': 'getRequestID',
            'replace_url': 'getRequestURL',
            'sortable': False
            }
        self.columns['Worksheet'] = {
            'title': _('Worksheet'),
            'sortable': False
            }
        self.review_states = [
            {'id': 'default',
             'title':  _('Results pending'),
             'transitions': [{'id': 'sample'},
                             {'id': 'submit'},
                             {'id': 'cancel'},
                             # {'id': 'assign'}
                             ],
             'contentFilter': {'review_state': [
                'sample_received', 'assigned', 'attachment_due'],
                'cancellation_state': 'active', },
             'columns': ['AnalysisRequest',
                         'Worksheet',
                         'Service',
                         'Result',
                         'Uncertainty',
                         'Partition',
                         'Method',
                         'Instrument',
                         'Analyst',
                         'state_title',
                         ]
             },
            {'id': 'to_be_verified',
             'title':  _('To be verified'),
             'transitions': [{'id': 'verify'},
                             {'id': 'cancel'}
                             ],
             'contentFilter': {
                'review_state': ['to_be_verified'],
                'cancellation_state': 'active', },
             'columns': ['AnalysisRequest',
                         'Worksheet',
                         'Service',
                         'Result',
                         'Uncertainty',
                         'Partition',
                         'Method',
                         'Instrument',
                         'Analyst',
                         'state_title',
                         ]
             },
        ]
开发者ID:xispa,项目名称:bika.lims,代码行数:73,代码来源:aggregatedanalyses.py


注:本文中的bika.lims.browser.analyses.AnalysesView.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。