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
138
Merge Requests
138
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
Jobs
Commits
Open sidebar
nexedi
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
Show 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 @@
...
@@ -27,7 +27,6 @@
#
#
##############################################################################
##############################################################################
from
Products.PythonScripts.standard
import
Object
from
hashlib
import
md5
from
hashlib
import
md5
# Some workflow does not make sense in the context of mass transition and are
# Some workflow does not make sense in the context of mass transition and are
...
@@ -61,9 +60,6 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
...
@@ -61,9 +60,6 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
selection_name
=
request
[
'selection_name'
]
selection_name
=
request
[
'selection_name'
]
form
=
getattr
(
portal
,
form_id
)
listbox
=
getattr
(
form
,
'listbox'
,
None
)
# guess all column name from catalog schema
# guess all column name from catalog schema
possible_state_list
=
[
column_name
.
split
(
'.'
)[
1
]
for
column_name
in
possible_state_list
=
[
column_name
.
split
(
'.'
)[
1
]
for
column_name
in
self
.
getPortalObject
().
portal_catalog
.
getSQLCatalog
().
getColumnMap
()
if
self
.
getPortalObject
().
portal_catalog
.
getSQLCatalog
().
getColumnMap
()
if
...
@@ -111,7 +107,6 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
...
@@ -111,7 +107,6 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
else
:
else
:
getObject
=
portal
.
portal_catalog
.
getObject
getObject
=
portal
.
portal_catalog
.
getObject
selected_document_list
=
[
getObject
(
uid
)
for
uid
in
selection_uid_list
]
selected_document_list
=
[
getObject
(
uid
)
for
uid
in
selection_uid_list
]
marker
=
[]
# this will be a dictionnary with (portal_type, workflow_id, workflow_state)
# this will be a dictionnary with (portal_type, workflow_id, workflow_state)
# as keys, and (count, a random document) as values
# as keys, and (count, a random document) as values
workflow_state_dict
=
{}
workflow_state_dict
=
{}
...
@@ -128,7 +123,7 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
...
@@ -128,7 +123,7 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
workflow_state_dict
[
key
]
=
document
,
document_count
+
1
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_state_dict
.
iteritems
():
workflow
=
wf_tool
.
getWorkflowById
(
workflow_id
)
workflow
=
wf_tool
.
getWorkflowById
(
workflow_id
)
state_var
=
workflow
.
variables
.
getStateVar
()
state_var
=
workflow
.
variables
.
getStateVar
()
...
@@ -172,7 +167,6 @@ def getWorkflowActionDocumentList(self, **kw):
...
@@ -172,7 +167,6 @@ def getWorkflowActionDocumentList(self, **kw):
selection_name
=
kw
[
'module_selection_name'
]
selection_name
=
kw
[
'module_selection_name'
]
document_list
=
[]
document_list
=
[]
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
getObject
=
portal
.
portal_catalog
.
getObject
wtool
=
portal
.
portal_workflow
wtool
=
portal
.
portal_workflow
selection_tool
=
portal
.
portal_selections
selection_tool
=
portal
.
portal_selections
...
...
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.xml
View file @
97369a97
...
@@ -6,6 +6,12 @@
...
@@ -6,6 +6,12 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
FolderWorkflowActionUtils
</string>
</value>
<value>
<string>
FolderWorkflowActionUtils
</string>
</value>
...
@@ -39,13 +45,7 @@
...
@@ -39,13 +45,7 @@
<item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<value>
<tuple>
<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>
</value>
</value>
</item>
</item>
<item>
<item>
...
@@ -55,13 +55,28 @@
...
@@ -55,13 +55,28 @@
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<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>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
</pickle>
...
@@ -74,7 +89,7 @@
...
@@ -74,7 +89,7 @@
<item>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -83,7 +98,7 @@
...
@@ -83,7 +98,7 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
</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