Commit 8f05514e authored by wenjie.zheng's avatar wenjie.zheng Committed by Sebastien Robin

InteractionWorkflow.py: change the name of universal method for the initialization of document.

parent 8a9c57e9
......@@ -53,7 +53,6 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
"""
An ERP5 Interaction Workflow.
"""
meta_type = 'ERP5 Workflow'
portal_type = 'Interaction Workflow'
_isAWorkflow = True # DCWorkflow Tool compatibility
......@@ -68,8 +67,6 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
intaractions = None
manager_bypass = 0
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
......@@ -85,7 +82,7 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
)
def initializeDocument(self, document):
def notifyCreated(self, document):
pass
security.declareProtected(Permissions.View, 'getChainedPortalTypeList')
......@@ -129,7 +126,7 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
Allows the user to request information provided by the
workflow. This method must perform its own security checks.
'''
vdef = self._getOb(name, _MARKER) ### getObjectByRef
vdef = self._getOb(name, _MARKER)
if vdef is _MARKER:
return default
if vdef.info_guard is not None and not vdef.info_guard.check(
......@@ -148,7 +145,7 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
return value
security.declarePrivate('isWorkflowMethodSupported')
def isERP5WorkflowMethodSupported(self, ob, tid):
def isWorkflowMethodSupported(self, ob, tid):
'''
Returns a true value if the given workflow method
is supported in the current state.
......@@ -159,8 +156,6 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
return 1
return 0
isWorkflowMethodSupported = isERP5WorkflowMethodSupported
def _checkTransitionGuard(self, tdef, document, **kw):
if tdef.temporary_document_disallowed:
isTempDocument = getattr(document, 'isTempDocument', None)
......@@ -271,8 +266,7 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
filtered_transition_list = []
for t_id in transition_list:
LOG(" t_id is '%s'"%t_id, WARNING, " in InteractionWorkflow.py 247.")
tdef = self._getOb(t_id) # t_id is id or reference?
tdef = self._getOb(t_id)
assert tdef.trigger_type == TRIGGER_WORKFLOW_METHOD
filtered_transition_list.append(tdef.getId())
former_status = self._getOb(status_dict[self.getStateVariable()], None)
......
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