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
Frederic Thoma
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
Show 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):
...
@@ -690,10 +690,6 @@ def updateRoleMappings(self, REQUEST=None):
DCWorkflowDefinition
.
updateRoleMappings
=
updateRoleMappings
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
# this patch allows to get list of portal types for workflow
def
getPortalTypeListForWorkflow
(
self
):
def
getPortalTypeListForWorkflow
(
self
):
"""
"""
...
@@ -730,10 +726,6 @@ def DCWorkflowDefinition_getFutureStateSet(self, state, ignore=(),
...
@@ -730,10 +726,6 @@ def DCWorkflowDefinition_getFutureStateSet(self, state, ignore=(),
DCWorkflowDefinition
.
getFutureStateSet
=
DCWorkflowDefinition_getFutureStateSet
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
):
def
DCWorkflowDefinition_notifyWorkflowMethod
(
self
,
ob
,
transition_list
,
args
=
None
,
kw
=
None
):
'''
'''
Allows the system to request a workflow action. This method
Allows the system to request a workflow action. This method
...
@@ -780,58 +772,57 @@ def DCWorkflowDefinition_notifySuccess(self, ob, transition_list, result, args=N
...
@@ -780,58 +772,57 @@ def DCWorkflowDefinition_notifySuccess(self, ob, transition_list, result, args=N
'''
'''
pass
pass
def
method_getReference
(
self
):
# following 15 patches are required for the new workflow tool compatibility.
return
self
.
id
def
DCWorkflowDefinition_getVariableValueList
(
self
):
def
DCWorkflowDefinition_getVariableValueList
(
self
):
if
self
.
variables
is
not
None
:
if
self
.
variables
is
not
None
:
return
self
.
variables
return
self
.
variables
return
{}
return
{}
def
DCWorkflowDefinition_getVariableIdList
(
self
):
def
DCWorkflowDefinition_getVariableIdList
(
self
):
if
self
.
variables
is
not
None
:
if
self
.
variables
is
not
None
:
return
self
.
variables
.
objectIds
()
return
self
.
variables
.
objectIds
()
return
[]
return
[]
def
DCWorkflowDefinition_getStateVariable
(
self
):
return
self
.
state_var
def
DCWorkflowDefinition_getStateValueList
(
self
):
def
DCWorkflowDefinition_getStateValueList
(
self
):
if
self
.
states
is
not
None
:
if
self
.
states
is
not
None
:
return
self
.
states
return
self
.
states
return
{}
return
{}
def
DCWorkflowDefinition_getStateIdList
(
self
):
def
DCWorkflowDefinition_getStateIdList
(
self
):
if
self
.
states
is
not
None
:
if
self
.
states
is
not
None
:
return
self
.
states
.
objectIds
()
return
self
.
states
.
objectIds
()
return
[]
return
[]
def
DCWorkflowDefinition_getTransitionValueList
(
self
):
def
DCWorkflowDefinition_getTransitionValueList
(
self
):
if
self
.
transitions
is
not
None
:
if
self
.
transitions
is
not
None
:
return
self
.
transitions
return
self
.
transitions
else
:
else
:
return
{}
return
{}
def
DCWorkflowDefinition_getTransitionIdList
(
self
):
def
DCWorkflowDefinition_getTransitionIdList
(
self
):
if
self
.
transitions
is
not
None
:
if
self
.
transitions
is
not
None
:
return
self
.
transitions
.
objectIds
()
return
self
.
transitions
.
objectIds
()
return
[]
return
[]
def
DCWorkflowDefinition_getWorklistValueList
(
self
):
def
DCWorkflowDefinition_getWorklistValueList
(
self
):
if
self
.
worklists
is
not
None
:
if
self
.
worklists
is
not
None
:
return
self
.
worklists
return
self
.
worklists
return
{}
return
{}
def
DCWorkflowDefinition_getWorklistIdList
(
self
):
def
DCWorkflowDefinition_getWorklistIdList
(
self
):
if
self
.
worklists
is
not
None
:
if
self
.
worklists
is
not
None
:
return
self
.
worklists
.
objectIds
()
return
self
.
worklists
.
objectIds
()
return
[]
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
):
def
DCWorkflowDefinition_getScriptValueList
(
self
):
if
self
.
scripts
is
not
None
:
if
self
.
scripts
is
not
None
:
return
self
.
scripts
return
self
.
scripts
return
{}
return
{}
def
StateDefinition_getDestinationIdList
(
self
):
def
StateDefinition_getDestinationIdList
(
self
):
return
self
.
transitions
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
):
def
DCWorkflowDefinition_showDict
(
self
):
attr_dict
=
{}
attr_dict
=
{}
for
attr
in
sorted
(
self
.
__dict__
.
keys
()):
for
attr
in
sorted
(
self
.
__dict__
.
keys
()):
...
@@ -841,7 +832,8 @@ def DCWorkflowDefinition_showDict(self):
...
@@ -841,7 +832,8 @@ def DCWorkflowDefinition_showDict(self):
else
:
else
:
continue
continue
return
attr_dict
return
attr_dict
# generate XML file for the workflow contents comparison between DCWorkflow
# and converted workflow.
def
DCWorkflowDefinition_showAsXML
(
self
,
root
=
None
):
def
DCWorkflowDefinition_showAsXML
(
self
,
root
=
None
):
if
root
is
None
:
if
root
is
None
:
root
=
Element
(
'erp5'
)
root
=
Element
(
'erp5'
)
...
@@ -1053,13 +1045,6 @@ def DCWorkflowDefinition_showAsXML(self, root=None):
...
@@ -1053,13 +1045,6 @@ def DCWorkflowDefinition_showAsXML(self, root=None):
return
etree
.
tostring
(
root
,
encoding
=
'utf-8'
,
return
etree
.
tostring
(
root
,
encoding
=
'utf-8'
,
xml_declaration
=
True
,
pretty_print
=
True
)
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
.
getReference
=
method_getReference
DCWorkflowDefinition
.
notifyWorkflowMethod
=
DCWorkflowDefinition_notifyWorkflowMethod
DCWorkflowDefinition
.
notifyWorkflowMethod
=
DCWorkflowDefinition_notifyWorkflowMethod
DCWorkflowDefinition
.
notifyBefore
=
DCWorkflowDefinition_notifyBefore
DCWorkflowDefinition
.
notifyBefore
=
DCWorkflowDefinition_notifyBefore
...
@@ -1077,6 +1062,8 @@ DCWorkflowDefinition.showAsXML = DCWorkflowDefinition_showAsXML
...
@@ -1077,6 +1062,8 @@ DCWorkflowDefinition.showAsXML = DCWorkflowDefinition_showAsXML
DCWorkflowDefinition
.
showDict
=
DCWorkflowDefinition_showDict
DCWorkflowDefinition
.
showDict
=
DCWorkflowDefinition_showDict
DCWorkflowDefinition
.
propertyIds
=
DCWorkflowDefinition_propertyIds
DCWorkflowDefinition
.
propertyIds
=
DCWorkflowDefinition_propertyIds
DCWorkflowDefinition
.
getProperty
=
DCWorkflowDefinition_getProperty
DCWorkflowDefinition
.
getProperty
=
DCWorkflowDefinition_getProperty
DCWorkflowDefinition
.
getStateVariable
=
DCWorkflowDefinition_getStateVariable
DCWorkflowDefinition
.
getPortalType
=
DCWorkflowDefinition_getPortalType
StateDefinition
.
getReference
=
method_getReference
StateDefinition
.
getReference
=
method_getReference
StateDefinition
.
getDestinationIdList
=
StateDefinition_getDestinationIdList
StateDefinition
.
getDestinationIdList
=
StateDefinition_getDestinationIdList
StateDefinition
.
getDestinationReferenceList
=
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