Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Romain Courteaud
erp5_rtl_support
Commits
ac4e5087
Commit
ac4e5087
authored
Jul 31, 2015
by
wenjie.zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WorkflowTool.py: avoid convert 'non-exist' bad defined transition during the conversion.
parent
834e7010
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
product/ERP5/Tool/WorkflowTool.py
product/ERP5/Tool/WorkflowTool.py
+4
-3
No files found.
product/ERP5/Tool/WorkflowTool.py
View file @
ac4e5087
...
@@ -350,9 +350,10 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
...
@@ -350,9 +350,10 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
sdef
=
workflow
.
_getOb
(
'state_'
+
sid
)
sdef
=
workflow
.
_getOb
(
'state_'
+
sid
)
new_category
=
[]
new_category
=
[]
for
transition_id
in
dc_workflow
.
states
.
get
(
sid
).
transitions
:
for
transition_id
in
dc_workflow
.
states
.
get
(
sid
).
transitions
:
tr_path
=
getattr
(
workflow
,
'transition_'
+
transition_id
).
getPath
()
tr
=
getattr
(
workflow
,
'transition_'
+
transition_id
,
None
)
tr_path
=
'destination/'
+
'/'
.
join
(
tr_path
.
split
(
'/'
)[
2
:])
if
tr
is
not
None
:
new_category
.
append
(
tr_path
)
tr_path
=
'destination/'
+
'/'
.
join
(
tr
.
getPath
().
split
(
'/'
)[
2
:])
new_category
.
append
(
tr_path
)
sdef
.
setCategoryList
(
new_category
)
sdef
.
setCategoryList
(
new_category
)
# set transition's destination state:
# set transition's destination state:
for
tid
in
dc_workflow
.
transitions
:
for
tid
in
dc_workflow
.
transitions
:
...
...
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