Commit 3a927433 authored by iv's avatar iv

ERP5Workflow: ConfigurationWorkflow class now inheritates from Workflow

remove duplicated code
parent a5e8cb08
......@@ -29,7 +29,7 @@
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Workflow.Document.Workflow import Workflow
from Products.ERP5Type.Globals import PersistentMapping
from tempfile import mktemp
......@@ -41,7 +41,7 @@ from Acquisition import aq_base
from DateTime import DateTime
class ConfigurationWorkflow(XMLObject):
class ConfigurationWorkflow(Workflow):
"""
A Business Configuration Workflow.
"""
......@@ -120,25 +120,6 @@ class ConfigurationWorkflow(XMLObject):
result = document.workflow_history[workflow_key][-1].copy()
return result
def getDateTime(self):
"""
Return current date time.
"""
return DateTime()
def getStateChangeInformation(self, document, state, transition=None):
"""
Return an object used for variable tales expression.
"""
if transition is None:
transition_url = None
else:
transition_url = transition.getRelativeUrl()
return self.asContext(document=document,
transition=transition,
transition_url=transition_url,
state=state)
def _getWorkflowStateOf(self, ob, id_only=0):
tool = self.getPortalObject().portal_workflow
id = self.getId()
......
......@@ -115,8 +115,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
"""
Generate a key used in the workflow history.
"""
history_key = self.getReference()
return history_key
return self.getReference()
def _updateWorkflowHistory(self, document, status_dict):
"""
......
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