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
Laurent S
erp5
Commits
db77f05f
Commit
db77f05f
authored
May 04, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Workflow.py: replace split with getReference.
parent
4d9fb621
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
product/ERP5Workflow/Document/Workflow.py
product/ERP5Workflow/Document/Workflow.py
+8
-6
No files found.
product/ERP5Workflow/Document/Workflow.py
View file @
db77f05f
...
...
@@ -104,7 +104,7 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject):
object
=
self
.
getStateChangeInformation
(
document
,
self
.
getSourceValue
())
# Initialize workflow history
state_id
=
'_'
.
join
(
self
.
getSourceId
().
split
(
'_'
)[
1
:]
)
state_id
=
self
.
getSourceValue
().
getReference
(
)
status_dict
=
{
state_var
:
state_id
}
variable_list
=
self
.
objectValues
(
portal_type
=
'Variable'
)
former_status
=
self
.
_getOb
(
status_dict
[
state_var
],
None
)
...
...
@@ -358,6 +358,7 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject):
'category'
:
tdef
.
actbox_category
,
'transition'
:
tdef
}))
fmt_data
.
_pop
()
LOG
(
"362 listing user action '%s'"
%
tid
,
WARNING
,
" in Workflow.py"
)
res
.
sort
()
return
[
result
[
1
]
for
result
in
res
]
...
...
@@ -502,15 +503,16 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject):
status
=
tool
.
getStatusOf
(
id_no_suffix
,
ob
)
LOG
(
"502 tool is '%s' type, status is '%s'"
%
(
tool
.
getPortalType
(),
status
),
WARNING
,
" in Workflow.py"
)
if
status
is
None
:
state
=
self
.
getSource
Id
()
state
=
self
.
getSource
Value
()
else
:
state
=
'state_'
+
status
.
get
(
self
.
getStateVariable
(),
None
)
state_id
=
'state_'
+
status
.
get
(
self
.
getStateVariable
(),
None
)
state
=
self
.
_getOb
(
state_id
)
if
state
is
None
:
state
=
self
.
getSource
Id
()
state
=
self
.
getSource
Value
()
if
id_only
:
return
'_'
.
join
(
state
.
split
(
'_'
)[
1
:]
)
return
state
.
getReference
(
)
else
:
return
s
elf
.
_getOb
(
state
,
None
)
return
s
tate
###########
## Graph ##
...
...
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