Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
erp5
Commits
c907ad07
Commit
c907ad07
authored
Jul 17, 2015
by
wenjie.zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patches/DCWorkflow.py: clean up.
parent
13b8bbde
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
29 deletions
+16
-29
product/ERP5Type/patches/DCWorkflow.py
product/ERP5Type/patches/DCWorkflow.py
+16
-29
No files found.
product/ERP5Type/patches/DCWorkflow.py
View file @
c907ad07
...
...
@@ -690,10 +690,6 @@ def updateRoleMappings(self, REQUEST=None):
DCWorkflowDefinition
.
updateRoleMappings
=
updateRoleMappings
def
DCWorkflowDefinition_getPortalType
(
self
):
return
self
.
__class__
.
__name__
DCWorkflowDefinition
.
getPortalType
=
DCWorkflowDefinition_getPortalType
# this patch allows to get list of portal types for workflow
def
getPortalTypeListForWorkflow
(
self
):
"""
...
...
@@ -730,10 +726,6 @@ def DCWorkflowDefinition_getFutureStateSet(self, state, ignore=(),
DCWorkflowDefinition
.
getFutureStateSet
=
DCWorkflowDefinition_getFutureStateSet
def
DCWorkflowDefinition_getStateVariable
(
self
):
return
self
.
state_var
DCWorkflowDefinition
.
getStateVariable
=
DCWorkflowDefinition_getStateVariable
def
DCWorkflowDefinition_notifyWorkflowMethod
(
self
,
ob
,
transition_list
,
args
=
None
,
kw
=
None
):
'''
Allows the system to request a workflow action. This method
...
...
@@ -780,58 +772,57 @@ def DCWorkflowDefinition_notifySuccess(self, ob, transition_list, result, args=N
'''
pass
def
method_getReference
(
self
):
return
self
.
id
# following 15 patches are required for the new workflow tool compatibility.
def
DCWorkflowDefinition_getVariableValueList
(
self
):
if
self
.
variables
is
not
None
:
return
self
.
variables
return
{}
def
DCWorkflowDefinition_getVariableIdList
(
self
):
if
self
.
variables
is
not
None
:
return
self
.
variables
.
objectIds
()
return
[]
def
DCWorkflowDefinition_getStateVariable
(
self
):
return
self
.
state_var
def
DCWorkflowDefinition_getStateValueList
(
self
):
if
self
.
states
is
not
None
:
return
self
.
states
return
{}
def
DCWorkflowDefinition_getStateIdList
(
self
):
if
self
.
states
is
not
None
:
return
self
.
states
.
objectIds
()
return
[]
def
DCWorkflowDefinition_getTransitionValueList
(
self
):
if
self
.
transitions
is
not
None
:
return
self
.
transitions
else
:
return
{}
def
DCWorkflowDefinition_getTransitionIdList
(
self
):
if
self
.
transitions
is
not
None
:
return
self
.
transitions
.
objectIds
()
return
[]
def
DCWorkflowDefinition_getWorklistValueList
(
self
):
if
self
.
worklists
is
not
None
:
return
self
.
worklists
return
{}
def
DCWorkflowDefinition_getWorklistIdList
(
self
):
if
self
.
worklists
is
not
None
:
return
self
.
worklists
.
objectIds
()
return
[]
def
DCWorkflowDefinition_propertyIds
(
self
):
return
sorted
(
self
.
__dict__
.
keys
())
def
DCWorkflowDefinition_getProperty
(
self
,
prop_id
):
return
self
.
__dict__
[
prop_id
]
def
DCWorkflowDefinition_getScriptValueList
(
self
):
if
self
.
scripts
is
not
None
:
return
self
.
scripts
return
{}
def
StateDefinition_getDestinationIdList
(
self
):
return
self
.
transitions
def
DCWorkflowDefinition_getPortalType
(
self
):
return
self
.
__class__
.
__name__
def
method_getReference
(
self
):
return
self
.
id
# a necessary funtion in Base_viewDict
def
DCWorkflowDefinition_showDict
(
self
):
attr_dict
=
{}
for
attr
in
sorted
(
self
.
__dict__
.
keys
()):
...
...
@@ -841,7 +832,8 @@ def DCWorkflowDefinition_showDict(self):
else
:
continue
return
attr_dict
# generate XML file for the workflow contents comparison between DCWorkflow
# and converted workflow.
def
DCWorkflowDefinition_showAsXML
(
self
,
root
=
None
):
if
root
is
None
:
root
=
Element
(
'erp5'
)
...
...
@@ -1053,13 +1045,6 @@ def DCWorkflowDefinition_showAsXML(self, root=None):
return
etree
.
tostring
(
root
,
encoding
=
'utf-8'
,
xml_declaration
=
True
,
pretty_print
=
True
)
def
DCWorkflowDefinition_propertyIds
(
self
):
return
sorted
(
self
.
__dict__
.
keys
())
def
DCWorkflowDefinition_getProperty
(
self
,
prop_id
):
return
self
.
__dict__
[
prop_id
]
DCWorkflowDefinition
.
getReference
=
method_getReference
DCWorkflowDefinition
.
notifyWorkflowMethod
=
DCWorkflowDefinition_notifyWorkflowMethod
DCWorkflowDefinition
.
notifyBefore
=
DCWorkflowDefinition_notifyBefore
...
...
@@ -1077,6 +1062,8 @@ DCWorkflowDefinition.showAsXML = DCWorkflowDefinition_showAsXML
DCWorkflowDefinition
.
showDict
=
DCWorkflowDefinition_showDict
DCWorkflowDefinition
.
propertyIds
=
DCWorkflowDefinition_propertyIds
DCWorkflowDefinition
.
getProperty
=
DCWorkflowDefinition_getProperty
DCWorkflowDefinition
.
getStateVariable
=
DCWorkflowDefinition_getStateVariable
DCWorkflowDefinition
.
getPortalType
=
DCWorkflowDefinition_getPortalType
StateDefinition
.
getReference
=
method_getReference
StateDefinition
.
getDestinationIdList
=
StateDefinition_getDestinationIdList
StateDefinition
.
getDestinationReferenceList
=
StateDefinition_getDestinationIdList
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment