Commit f70cc18f authored by Arnaud Fontaine's avatar Arnaud Fontaine

py3: DCWorkflow is python2-only.

parent 626c74bb
...@@ -91,8 +91,6 @@ from Products.DCWorkflow.utils import Message as _ ...@@ -91,8 +91,6 @@ from Products.DCWorkflow.utils import Message as _
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Type.Cache import CachingMethod from Products.ERP5Type.Cache import CachingMethod
from Products.ERP5Type.Globals import PersistentMapping, InitializeClass from Products.ERP5Type.Globals import PersistentMapping, InitializeClass
from Products.ERP5Type.patches.WorkflowTool import (SECURITY_PARAMETER_ID,
WORKLIST_METADATA_KEY)
from Products.ERP5Type.Utils import convertToMixedCase from Products.ERP5Type.Utils import convertToMixedCase
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.Core.WorkflowTransition import (TRIGGER_AUTOMATIC, from Products.ERP5Type.Core.WorkflowTransition import (TRIGGER_AUTOMATIC,
...@@ -509,6 +507,8 @@ class Workflow(XMLObject): ...@@ -509,6 +507,8 @@ class Workflow(XMLObject):
security_manager = getSecurityManager() security_manager = getSecurityManager()
workflow_id = self.getId() workflow_id = self.getId()
workflow_title = self.getTitle() workflow_title = self.getTitle()
from Products.ERP5Type.Tool.WorkflowTool import (SECURITY_PARAMETER_ID,
WORKLIST_METADATA_KEY)
for worklist_definition in worklist_value_list: for worklist_definition in worklist_value_list:
action_box_name = worklist_definition.getActionName() action_box_name = worklist_definition.getActionName()
guard_role_list = worklist_definition.getGuardRoleList() guard_role_list = worklist_definition.getGuardRoleList()
......
...@@ -53,7 +53,7 @@ SECURITY_PARAMETER_ID = 'local_roles' ...@@ -53,7 +53,7 @@ SECURITY_PARAMETER_ID = 'local_roles'
from AccessControl.SecurityInfo import ModuleSecurityInfo from AccessControl.SecurityInfo import ModuleSecurityInfo
ModuleSecurityInfo(__name__).declarePublic('SECURITY_PARAMETER_ID') ModuleSecurityInfo(__name__).declarePublic('SECURITY_PARAMETER_ID')
class WorkflowTool(BaseTool, OriginalWorkflowTool): class WorkflowTool(BaseTool):
""" """
A new container for DC workflow and workflow; A new container for DC workflow and workflow;
inherits methods from original WorkflowTool.py; inherits methods from original WorkflowTool.py;
...@@ -75,6 +75,21 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool): ...@@ -75,6 +75,21 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
'DublinCore', 'DublinCore',
) )
def _isBootstrapRequired(self):
"""
Required by synchronizeDynamicModules() to bootstrap an empty site and
thus create portal_components
"""
return False
def _bootstrap(self):
"""
Required by synchronizeDynamicModules() to bootstrap an empty site and
thus create portal_components
"""
pass
def filtered_meta_types(self, user=None): def filtered_meta_types(self, user=None):
return False return False
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE # FOR A PARTICULAR PURPOSE
############################################################################## ##############################################################################
import six
from Products.ERP5Type import WITH_LEGACY_WORKFLOW from Products.ERP5Type import WITH_LEGACY_WORKFLOW
...@@ -81,7 +82,9 @@ from Products.ERP5Type.patches import zopecontenttype ...@@ -81,7 +82,9 @@ from Products.ERP5Type.patches import zopecontenttype
from Products.ERP5Type.patches import OFSImage from Products.ERP5Type.patches import OFSImage
from Products.ERP5Type.patches import _transaction from Products.ERP5Type.patches import _transaction
from Products.ERP5Type.patches import default_zpublisher_encoding from Products.ERP5Type.patches import default_zpublisher_encoding
from Products.ERP5Type.patches import DCWorkflowGraph if six.PY2:
# DCWorkflowGraph is dead since 2011, so no py3 version
from Products.ERP5Type.patches import DCWorkflowGraph
from Products.ERP5Type.patches import SourceCodeEditorZMI from Products.ERP5Type.patches import SourceCodeEditorZMI
from Products.ERP5Type.patches import CachingPolicyManager from Products.ERP5Type.patches import CachingPolicyManager
from Products.ERP5Type.patches import AcceleratedHTTPCacheManager from Products.ERP5Type.patches import AcceleratedHTTPCacheManager
......
...@@ -36,7 +36,11 @@ from .patches import python, pylint, globalrequest ...@@ -36,7 +36,11 @@ from .patches import python, pylint, globalrequest
from zLOG import LOG, INFO from zLOG import LOG, INFO
DISPLAY_BOOT_PROCESS = False DISPLAY_BOOT_PROCESS = False
WITH_LEGACY_WORKFLOW = True # BBB if six.PY3:
# DCWorkflow python2-only
WITH_LEGACY_WORKFLOW = False
else:
WITH_LEGACY_WORKFLOW = True
# We have a name conflict with source_reference and destination_reference, # We have a name conflict with source_reference and destination_reference,
# which are at the same time property accessors for 'source_reference' # which are at the same time property accessors for 'source_reference'
......
...@@ -26,8 +26,6 @@ from Products.ERP5Type.Globals import InitializeClass ...@@ -26,8 +26,6 @@ from Products.ERP5Type.Globals import InitializeClass
from Products.CMFCore.WorkflowTool import WorkflowTool from Products.CMFCore.WorkflowTool import WorkflowTool
from Products.CMFCore.WorkflowCore import ObjectDeleted from Products.CMFCore.WorkflowCore import ObjectDeleted
from Products.CMFCore.WorkflowCore import WorkflowException from Products.CMFCore.WorkflowCore import WorkflowException
from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition
from Products.DCWorkflow.Transitions import TRIGGER_WORKFLOW_METHOD
from Products.DCWorkflow.utils import Message as _ from Products.DCWorkflow.utils import Message as _
from Products.DCWorkflow.Transitions import TRIGGER_USER_ACTION from Products.DCWorkflow.Transitions import TRIGGER_USER_ACTION
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment