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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastien Robin
erp5
Commits
c33ac428
Commit
c33ac428
authored
Jul 07, 2016
by
iv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Workflow: fix history listing and remove old compatibility code.
parent
bc6ae22b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getWorkflowHistoryItemList.py
...portal_skins/erp5_core/Base_getWorkflowHistoryItemList.py
+5
-11
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getWorkflowHistoryItemList.py
View file @
c33ac428
...
...
@@ -9,7 +9,6 @@ can_view_history = getSecurityManager().getUser().has_permission('View History',
marker
=
[]
result
=
[]
i
=
1
portal_object
=
context
.
getPortalObject
()
portal_workflow
=
portal_object
.
portal_workflow
workflow_id_list
=
[
x
for
x
,
y
in
context
.
getWorkflowStateItemList
()]
...
...
@@ -29,25 +28,20 @@ def getActorName(actor):
return
actor_name_cache
[
actor
]
# Get history
# XXX Compatibility
workflow_item_list
=
portal_workflow
.
getInfoFor
(
ob
=
context
,
name
=
'history'
,
wf_id
=
workflow_id
)
workflow
=
getattr
(
portal_workflow
,
workflow_id
)
wf_state_variable
=
workflow
.
getStateVariable
()
next_serial
=
None
previous_obj
=
None
for
workflow_item
in
portal_workflow
.
getInfoFor
(
ob
=
context
,
name
=
'history'
,
wf_id
=
workflow_id
)
for
position
,
workflow_item
in
enumerate
(
workflow_item_list
):
# XXX removing str method generate a strange bug
current_object
=
newTempBase
(
portal_object
,
str
(
i
))
i
+=
1
current_object
=
newTempBase
(
portal_object
,
str
(
position
+
1
))
for
key
,
value
in
workflow_item
.
items
():
if
key
==
'serial'
and
not
can_view_history
:
continue
# XXX Compatibility
for
compatibility_name
in
[
'building_'
,
'installation_'
]:
if
key
.
startswith
(
compatibility_name
):
# Display the workflow state in the state columns
key
=
key
[
len
(
compatibility_name
):]
if
key
==
wf_state_variable
:
state
=
workflow
.
getStateValueById
(
value
)
# Store locally the id of state, usefull for merging action and transition
...
...
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