コード例 #1
0
ファイル: PropertySheetTool.py プロジェクト: zamananjum0/erp5
    def _bootstrap(self):
        bt_name = 'erp5_property_sheets'
        from Products.ERP5.ERP5Site import ERP5Generator
        ERP5Generator.bootstrap(
            self,
            bt_name,
            'PropertySheetTemplateItem',
            (
                'BaseType',
                'BusinessTemplate',
                'Folder',
                'SimpleItem',
                'Version',
                'Comment',
                # the following ones are required to upgrade an existing site
                'Reference',
                'BaseCategory',
                'SQLIdGenerator',
            ))

        def install():
            from ZPublisher.BaseRequest import RequestContainer
            from Products.ERP5Type.Globals import get_request
            portal = self.getPortalObject()
            # BusinessTemplate.install needs a request
            template_tool = portal.aq_base.__of__(
                portal.aq_parent.__of__(
                    RequestContainer(REQUEST=get_request()))).portal_templates
            if template_tool.getInstalledBusinessTemplate(bt_name) is None:
                from Products.ERP5.ERP5Site import getBootstrapBusinessTemplateUrl
                url = getBootstrapBusinessTemplateUrl(bt_name)
                template_tool.download(url).install()

        transaction.get().addBeforeCommitHook(unrestricted_apply, (install, ))
コード例 #2
0
ファイル: PropertySheetTool.py プロジェクト: Verde1705/erp5
 def _bootstrap(self):
   bt_name = 'erp5_property_sheets'
   from Products.ERP5.ERP5Site import ERP5Generator
   ERP5Generator.bootstrap(self, bt_name, 'PropertySheetTemplateItem', (
     'BaseType',
     'BusinessTemplate',
     'Folder',
     'SimpleItem',
     'Version',
     'Comment',
     # the following ones are required to upgrade an existing site
     'Reference',
     'BaseCategory',
     'SQLIdGenerator',
   ))
   def install():
     from ZPublisher.BaseRequest import RequestContainer
     from Products.ERP5Type.Globals import get_request
     portal = self.getPortalObject()
     # BusinessTemplate.install needs a request
     template_tool = portal.aq_base.__of__(portal.aq_parent.__of__(
       RequestContainer(REQUEST=get_request()))).portal_templates
     if template_tool.getInstalledBusinessTemplate(bt_name) is None:
       from Products.ERP5.ERP5Site import getBootstrapBusinessTemplateUrl
       url = getBootstrapBusinessTemplateUrl(bt_name)
       template_tool.download(url).install()
   transaction.get().addBeforeCommitHook(unrestricted_apply, (install,))
コード例 #3
0
 def _bootstrap(self):
     from Products.ERP5.ERP5Site import ERP5Generator
     ERP5Generator.bootstrap(self, 'erp5_core', 'CategoryTemplateItem', (
         'before_script',
         'before_commit_script',
         'activate_script',
         'after_script',
     ))
コード例 #4
0
ファイル: TypesTool.py プロジェクト: Soufianeterhzaz/erp5
 def _bootstrap(self):
   from Products.ERP5.ERP5Site import ERP5Generator
   ERP5Generator.bootstrap(self, 'erp5_core', 'PortalTypeTemplateItem', (
     'Business Template',
     'Standard Property',
     'Acquired Property',
     # the following ones are required to upgrade an existing site
     'Category Property',
   ))
コード例 #5
0
 def _bootstrap(self):
   from Products.ERP5.ERP5Site import ERP5Generator
   ERP5Generator.bootstrap(self, 'erp5_core', 'PortalTypeTemplateItem', (
     'Business Template',
     'Standard Property',
     'Acquired Property',
     # the following ones are required to upgrade an existing site
     'Category Property',
   ))
コード例 #6
0
ファイル: TypesTool.py プロジェクト: bhuvanaurora/erp5
    def _bootstrap(self):
        from Products.ERP5.ERP5Site import ERP5Generator

        ERP5Generator.bootstrap(
            self,
            "erp5_core",
            "PortalTypeTemplateItem",
            (
                "Business Template",
                "Standard Property",
                "Acquired Property",
                # the following ones are required to upgrade an existing site
                "Category Property",
            ),
        )
コード例 #7
0
    def _bootstrap(self):
        bt_name = 'erp5_property_sheets'
        from Products.ERP5.ERP5Site import ERP5Generator
        content_path_list = [
            'BaseType',
            'BusinessTemplate',
            'Folder',
            'SimpleItem',
            'Version',
            'Comment',
            # for workflows
            'Guard',
            'WorkflowVariable',
            'InteractionWorkflowInteraction',
            'ActionInformation/action_name_property',
            'WorkflowState',
            'WorkflowTransition',
            'Predicate',
            'Workflow',
            'Workflow/manager_bypass_property',
            'Workflow/state_variable_property',
            'Workflow/workflow_managed_permission_property',
            # the following ones are required to upgrade an existing site
            'Reference',
            'BaseCategory',
            'SQLIdGenerator'
        ]
        content_path_list.extend([
            'BusinessTemplate/' + bt_property
            for bt_property in self._bootstrap_business_template_property_tuple
        ])
        ERP5Generator.bootstrap(self, bt_name, 'PropertySheetTemplateItem',
                                content_path_list)

        def install():
            from ZPublisher.BaseRequest import RequestContainer
            from Products.ERP5Type.Globals import get_request
            portal = self.getPortalObject()
            # BusinessTemplate.install needs a request
            template_tool = portal.aq_base.__of__(
                portal.aq_parent.__of__(
                    RequestContainer(REQUEST=get_request()))).portal_templates
            if template_tool.getInstalledBusinessTemplate(bt_name) is None:
                from Products.ERP5.ERP5Site import getBootstrapBusinessTemplateUrl
                url = getBootstrapBusinessTemplateUrl(bt_name)
                template_tool.download(url).install()

        transaction.get().addBeforeCommitHook(unrestricted_apply, (install, ))
コード例 #8
0
 def _bootstrap(self):
   from Products.ERP5.ERP5Site import ERP5Generator
   ERP5Generator.bootstrap(self,
                           'erp5_core',
                           'PortalTypeTemplateItem',
                           self._bootstrap_type_list)
   getattr(self, 'Workflow Transition Variable').base_category_list = ('causality',)
   ERP5Generator.bootstrap_allow_type(self, 'Catalog Tool')
   ERP5Generator.bootstrap_allow_type(self, 'Workflow Tool')
   ERP5Generator.bootstrap_allow_type(self, 'Workflow')
   ERP5Generator.bootstrap_allow_type(self, 'Workflow Transition')
   ERP5Generator.bootstrap_allow_type(self, 'Interaction Workflow')