Commit 4b9324b7 authored by wenjie.zheng's avatar wenjie.zheng Committed by Sebastien Robin

Add prefix feature for ERP5Workflow objects.

parent 77035cd9
......@@ -38,8 +38,9 @@ from Products.DCWorkflow.Expression import Expression
from Products.ERP5Workflow.Document.Transition import TRIGGER_WORKFLOW_METHOD, TRIGGER_USER_ACTION
from zLOG import LOG, INFO, ERROR, WARNING
from Products.DCWorkflow.Expression import StateChangeInfo
from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
class Interaction(XMLObject):
class Interaction(IdAsReferenceMixin('interaction_'), XMLObject):
"""
An ERP5 Interaction.
"""
......
......@@ -45,11 +45,11 @@ from Products.CMFActivity.ActiveObject import ActiveObject
from Products.ERP5Type.patches.Expression import Expression_createExprContext
from Products.ERP5Type.Globals import PersistentMapping
from zLOG import LOG, ERROR, WARNING
from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
_MARKER = []
class InteractionWorkflow(XMLObject):
class InteractionWorkflow(IdAsReferenceMixin('erp5workflow_'), XMLObject):
"""
An ERP5 Interaction Workflow.
"""
......
......@@ -34,6 +34,7 @@ from Products.ERP5Type.XMLObject import XMLObject
from zLOG import LOG, ERROR, DEBUG, WARNING
from Acquisition import aq_inner
from Acquisition import aq_parent
from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
class StateError(Exception):
"""
......@@ -41,7 +42,7 @@ class StateError(Exception):
"""
pass
class State(XMLObject, XMLMatrix):
class State(IdAsReferenceMixin('state_'), XMLObject, XMLMatrix):
"""
A ERP5 State.
"""
......
......@@ -44,12 +44,13 @@ from Products.ERP5Type.patches.WorkflowTool import WorkflowHistoryList
from Products.ERP5Type.patches.Expression import Expression_createExprContext
from Products.DCWorkflow.Guard import Guard
from Products.CMFCore.Expression import Expression
from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
TRIGGER_AUTOMATIC = 0
TRIGGER_USER_ACTION = 1
TRIGGER_WORKFLOW_METHOD = 2
class Transition(XMLObject):
class Transition(IdAsReferenceMixin('transition_'), XMLObject):
"""
A ERP5 Transition.
"""
......
......@@ -31,8 +31,9 @@ from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLObject import XMLObject
from Products.DCWorkflow.Guard import Guard
from Products.CMFCore.Expression import Expression
from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
class Variable(XMLObject):
class Variable(IdAsReferenceMixin('variable_'), XMLObject):
"""
A ERP5 Variable.
"""
......
......@@ -61,8 +61,9 @@ from Products.DCWorkflow.Expression import StateChangeInfo
from Products.ERP5Type.patches.WorkflowTool import SECURITY_PARAMETER_ID, WORKLIST_METADATA_KEY
from Products.CMFCore.utils import getToolByName
from Products.ERP5.Tool import ERP5WorkflowTool
from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
class Workflow(XMLObject):
class Workflow(IdAsReferenceMixin('erp5workflow_'), XMLObject):
"""
A ERP5 Workflow.
"""
......
......@@ -40,10 +40,11 @@ from Products.DCWorkflow.Guard import Guard
from Products.DCWorkflow.permissions import ManagePortal
from Persistence import PersistentMapping
from Products.CMFCore.utils import getToolByName
from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
tales_re = re.compile(r'(\w+:)?(.*)')
class Worklist(XMLObject):
class Worklist(IdAsReferenceMixin('worklist_'), XMLObject):
"""
A ERP5 Worklist.
"""
......
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