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
Tatuya Kamada
erp5
Commits
97369a97
Commit
97369a97
authored
Oct 06, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: make pylint happy with FolderWorkflowActionUtils
parent
053f5def
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
17 deletions
+26
-17
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.py
...al_components/extension.erp5.FolderWorkflowActionUtils.py
+1
-7
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.xml
...l_components/extension.erp5.FolderWorkflowActionUtils.xml
+25
-10
No files found.
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.py
View file @
97369a97
...
...
@@ -27,7 +27,6 @@
#
##############################################################################
from
Products.PythonScripts.standard
import
Object
from
hashlib
import
md5
# Some workflow does not make sense in the context of mass transition and are
...
...
@@ -61,9 +60,6 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
selection_name
=
request
[
'selection_name'
]
form
=
getattr
(
portal
,
form_id
)
listbox
=
getattr
(
form
,
'listbox'
,
None
)
# guess all column name from catalog schema
possible_state_list
=
[
column_name
.
split
(
'.'
)[
1
]
for
column_name
in
self
.
getPortalObject
().
portal_catalog
.
getSQLCatalog
().
getColumnMap
()
if
...
...
@@ -111,7 +107,6 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
else
:
getObject
=
portal
.
portal_catalog
.
getObject
selected_document_list
=
[
getObject
(
uid
)
for
uid
in
selection_uid_list
]
marker
=
[]
# this will be a dictionnary with (portal_type, workflow_id, workflow_state)
# as keys, and (count, a random document) as values
workflow_state_dict
=
{}
...
...
@@ -128,7 +123,7 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
workflow_state_dict
[
key
]
=
document
,
document_count
+
1
for
(
ptype
,
workflow_id
,
state
),
(
doc
,
document_count
)
in
\
for
(
ptype
,
workflow_id
,
_
),
(
doc
,
document_count
)
in
\
workflow_state_dict
.
iteritems
():
workflow
=
wf_tool
.
getWorkflowById
(
workflow_id
)
state_var
=
workflow
.
variables
.
getStateVar
()
...
...
@@ -172,7 +167,6 @@ def getWorkflowActionDocumentList(self, **kw):
selection_name
=
kw
[
'module_selection_name'
]
document_list
=
[]
portal
=
self
.
getPortalObject
()
getObject
=
portal
.
portal_catalog
.
getObject
wtool
=
portal
.
portal_workflow
selection_tool
=
portal
.
portal_selections
...
...
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.xml
View file @
97369a97
...
...
@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
FolderWorkflowActionUtils
</string>
</value>
...
...
@@ -39,13 +45,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W:114, 4: Unused variable \'marker\' (unused-variable)
</string>
<string>
W: 65, 2: Unused variable \'listbox\' (unused-variable)
</string>
<string>
W:131, 29: Unused variable \'state\' (unused-variable)
</string>
<string>
W:175, 2: Unused variable \'getObject\' (unused-variable)
</string>
<string>
W: 30, 0: Unused Object imported from Products.PythonScripts.standard (unused-import)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -55,13 +55,28 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -74,7 +89,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -83,7 +98,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
...
...
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