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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
7b917688
Commit
7b917688
authored
Jul 24, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Folder Worklow Action: fix for modules containing objects of different portal types
parent
12e2a3ea
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
product/ERP5Form/Extensions/Folder_getWorkflowActionDocumentList.py
...P5Form/Extensions/Folder_getWorkflowActionDocumentList.py
+4
-4
No files found.
product/ERP5Form/Extensions/Folder_getWorkflowActionDocumentList.py
View file @
7b917688
...
...
@@ -34,8 +34,8 @@ from hashlib import md5
# not proposed.
skipped_workflow_id_list
=
[
'delivery_causality_workflow'
,]
def
generateUid
(
workflow_id
,
workflow_state
):
return
'new_'
+
md5
(
'%s/%s
'
%
(
workflow_id
,
workflow_state
)).
hexdigest
()
def
generateUid
(
portal_type
,
workflow_id
,
workflow_state
):
return
'new_'
+
md5
(
'%s/%s
/%s'
%
(
portal_type
,
workflow_id
,
workflow_state
)).
hexdigest
()
def
getDocumentGroupByWorkflowStateList
(
self
,
form_id
=
''
,
**
kw
):
"""This returns the list of all "document groups", ie document of the same
...
...
@@ -96,7 +96,7 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
workflow_id
=
workflow
.
getId
()
current_workflow_state
=
doc
.
getProperty
(
state_var
)
document_list
.
append
(
doc
.
asContext
(
uid
=
generateUid
(
workflow_id
,
current_workflow_state
),
uid
=
generateUid
(
doc
.
getPortalType
(),
workflow_id
,
current_workflow_state
),
getListItemUrl
=
UrlGetter
(
doc
,
state_var
),
workflow_title
=
Base_translateString
(
workflow
.
title_or_id
()),
translated_workflow_state_title
=
...
...
@@ -137,7 +137,7 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
workflow_id
=
workflow
.
getId
()
current_workflow_state
=
doc
.
getProperty
(
state_var
)
document_list
.
append
(
doc
.
asContext
(
uid
=
generateUid
(
workflow_id
,
current_workflow_state
),
uid
=
generateUid
(
ptype
,
workflow_id
,
current_workflow_state
),
getListItemUrl
=
UrlGetter
(
doc
,
state_var
),
workflow_title
=
Base_translateString
(
workflow
.
title_or_id
()),
translated_workflow_state_title
=
...
...
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