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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xueyun Qian
erp5
Commits
e82cf608
Commit
e82cf608
authored
Jul 27, 2015
by
wenjie.zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Base.py: use getWorkflowsFor to replace getWorkflowValueListFor.
parent
956f518f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
product/ERP5Type/Base.py
product/ERP5Type/Base.py
+5
-5
No files found.
product/ERP5Type/Base.py
View file @
e82cf608
...
@@ -507,7 +507,7 @@ def initializePortalTypeDynamicWorkflowMethods(ptype_klass, portal_workflow):
...
@@ -507,7 +507,7 @@ def initializePortalTypeDynamicWorkflowMethods(ptype_klass, portal_workflow):
workflow_dict
=
{}
workflow_dict
=
{}
interaction_workflow_dict
=
{}
interaction_workflow_dict
=
{}
for
wf
in
portal_workflow
.
getWorkflow
ValueList
For
(
portal_type
):
for
wf
in
portal_workflow
.
getWorkflow
s
For
(
portal_type
):
wf_id
=
wf
.
getId
()
wf_id
=
wf
.
getId
()
wf_type
=
wf
.
__class__
.
__name__
wf_type
=
wf
.
__class__
.
__name__
if
wf_type
==
"DCWorkflowDefinition"
or
wf_type
==
"Workflow"
:
if
wf_type
==
"DCWorkflowDefinition"
or
wf_type
==
"Workflow"
:
...
@@ -2687,7 +2687,7 @@ class Base( CopyContainer,
...
@@ -2687,7 +2687,7 @@ class Base( CopyContainer,
'isDeleted'
)
'isDeleted'
)
def
isDeleted
(
self
):
def
isDeleted
(
self
):
"""Test if the context is in 'deleted' state"""
"""Test if the context is in 'deleted' state"""
for
wf
in
self
.
getPortalObject
().
portal_workflow
.
getWorkflow
ValueList
For
(
self
):
for
wf
in
self
.
getPortalObject
().
portal_workflow
.
getWorkflow
s
For
(
self
):
state
=
wf
.
_getWorkflowStateOf
(
self
)
state
=
wf
.
_getWorkflowStateOf
(
self
)
if
state
is
not
None
and
state
.
getReference
()
==
'deleted'
:
if
state
is
not
None
and
state
.
getReference
()
==
'deleted'
:
return
True
return
True
...
@@ -2729,7 +2729,7 @@ class Base( CopyContainer,
...
@@ -2729,7 +2729,7 @@ class Base( CopyContainer,
Returns a list of tuples {id:workflow_id, state:workflow_state}
Returns a list of tuples {id:workflow_id, state:workflow_state}
"""
"""
result
=
[]
result
=
[]
for
wf
in
self
.
portal_workflow
.
getWorkflow
ValueList
For
(
self
.
getPortalType
()):
for
wf
in
self
.
portal_workflow
.
getWorkflow
s
For
(
self
.
getPortalType
()):
result
+=
[(
wf
.
getReference
(),
wf
.
_getWorkflowStateOf
(
self
,
id_only
=
1
))]
result
+=
[(
wf
.
getReference
(),
wf
.
_getWorkflowStateOf
(
self
,
id_only
=
1
))]
return
result
return
result
...
@@ -3097,7 +3097,7 @@ class Base( CopyContainer,
...
@@ -3097,7 +3097,7 @@ class Base( CopyContainer,
# Check if edit_workflow defined
# Check if edit_workflow defined
portal_workflow
=
self
.
getPortalObject
().
portal_workflow
portal_workflow
=
self
.
getPortalObject
().
portal_workflow
wf
=
portal_workflow
.
getWorkflowById
(
'edit_workflow'
)
wf
=
portal_workflow
.
getWorkflowById
(
'edit_workflow'
)
wf_list
=
portal_workflow
.
getWorkflow
ValueList
For
(
self
)
wf_list
=
portal_workflow
.
getWorkflow
s
For
(
self
)
if
wf
is
not
None
:
if
wf
is
not
None
:
wf_list
=
[
wf
]
+
wf_list
wf_list
=
[
wf
]
+
wf_list
for
wf
in
wf_list
:
for
wf
in
wf_list
:
...
@@ -3372,7 +3372,7 @@ class Base( CopyContainer,
...
@@ -3372,7 +3372,7 @@ class Base( CopyContainer,
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
workflow_tool
=
portal
.
portal_workflow
workflow_tool
=
portal
.
portal_workflow
worflow_variable_list
=
[]
worflow_variable_list
=
[]
for
workflow
in
workflow_tool
.
getWorkflow
ValueList
For
(
self
):
for
workflow
in
workflow_tool
.
getWorkflow
s
For
(
self
):
if
not
isinstance
(
workflow
,
InteractionWorkflowDefinition
)
and
\
if
not
isinstance
(
workflow
,
InteractionWorkflowDefinition
)
and
\
not
isinstance
(
workflow
,
InteractionWorkflow
):
not
isinstance
(
workflow
,
InteractionWorkflow
):
worflow_variable_list
.
append
(
self
.
getProperty
(
workflow
.
getStateVariable
()))
worflow_variable_list
.
append
(
self
.
getProperty
(
workflow
.
getStateVariable
()))
...
...
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