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
3f5e7a71
Commit
3f5e7a71
authored
Feb 18, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WorkflowTool: don't emit getWorkflowsFor warning with CMFCore
parent
4c4cd37e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
product/ERP5Type/Tool/WorkflowTool.py
product/ERP5Type/Tool/WorkflowTool.py
+13
-3
No files found.
product/ERP5Type/Tool/WorkflowTool.py
View file @
3f5e7a71
...
...
@@ -28,6 +28,8 @@
"""
Most of the code in this file has been taken from patches/WorkflowTool.py
"""
import
re
import
warnings
from
six
import
string_types
as
basestring
from
AccessControl
import
ClassSecurityInfo
,
Unauthorized
from
Acquisition
import
aq_base
...
...
@@ -257,9 +259,17 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
return
workflow_list
# WITH_LEGACY_WORKFLOW
getWorkflowsFor
=
deprecated
(
"getWorkflowsFor() is deprecated; use getWorkflowValueListFor() instead"
)(
getWorkflowValueListFor
)
__getWorkflowsFor_warning
=
\
"getWorkflowsFor() is deprecated; use getWorkflowValueListFor() instead"
getWorkflowsFor
=
deprecated
(
__getWorkflowsFor_warning
)(
getWorkflowValueListFor
)
# ignore the warning when called from Products.CMFCore, getWorkflowsFor is a
# CMFCore API that is used internally in CMFCore, we only want to warn when
# using it from ERP5.
warnings
.
filterwarnings
(
'ignore'
,
message
=
re
.
escape
(
__getWorkflowsFor_warning
),
module
=
'Products.CMFCore.WorkflowTool'
)
@
deprecated
(
"getChainFor() is deprecated; use getWorkflowValueListFor() instead"
)
def
getChainFor
(
self
,
ob
):
return
[
wf
.
getId
()
for
wf
in
self
.
getWorkflowValueListFor
(
ob
)]
...
...
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