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
143
Merge Requests
143
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
670e7553
Commit
670e7553
authored
Oct 21, 2022
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workflow: import InteractionWorkflowDefinition only if WITH_LEGACY_WORKFLOW is True.
parent
8d5a3ce4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
product/ERP5Type/Base.py
product/ERP5Type/Base.py
+5
-1
product/ERP5Type/Tool/WorkflowTool.py
product/ERP5Type/Tool/WorkflowTool.py
+8
-2
No files found.
product/ERP5Type/Base.py
View file @
670e7553
...
...
@@ -3534,7 +3534,11 @@ class Base(
# Use meta transition to jump from one state to another
# without existing transitions.
from
Products.ERP5.InteractionWorkflow
import
InteractionWorkflowDefinition
from
Products.ERP5Type
import
WITH_LEGACY_WORKFLOW
if
WITH_LEGACY_WORKFLOW
:
from
Products.ERP5.InteractionWorkflow
import
InteractionWorkflowDefinition
else
:
InteractionWorkflowDefinition
=
None
.
__class__
from
Products.ERP5Type.Core.InteractionWorkflow
import
InteractionWorkflow
portal
=
self
.
getPortalObject
()
workflow_tool
=
portal
.
portal_workflow
...
...
product/ERP5Type/Tool/WorkflowTool.py
View file @
670e7553
...
...
@@ -98,7 +98,10 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
This is public method to allow passing meta transition (Jump form
any state to another in same workflow)
"""
from
Products.ERP5.InteractionWorkflow
import
InteractionWorkflowDefinition
if
WITH_LEGACY_WORKFLOW
:
from
Products.ERP5.InteractionWorkflow
import
InteractionWorkflowDefinition
else
:
InteractionWorkflowDefinition
=
None
.
__class__
from
Products.ERP5Type.Core.InteractionWorkflow
import
InteractionWorkflow
workflow_list
=
self
.
getWorkflowValueListFor
(
ob
.
getPortalType
())
if
wf_id
is
None
:
...
...
@@ -124,7 +127,10 @@ class WorkflowTool(BaseTool, OriginalWorkflowTool):
"""Test if given state_id is available for ob
in at least one associated workflow
"""
from
Products.ERP5.InteractionWorkflow
import
InteractionWorkflowDefinition
if
WITH_LEGACY_WORKFLOW
:
from
Products.ERP5.InteractionWorkflow
import
InteractionWorkflowDefinition
else
:
InteractionWorkflowDefinition
=
None
.
__class__
from
Products.ERP5Type.Core.InteractionWorkflow
import
InteractionWorkflow
for
workflow
in
(
wf_id
and
(
self
[
wf_id
],)
or
self
.
getWorkflowValueListFor
(
ob
.
getPortalType
())):
if
not
isinstance
(
workflow
,
(
InteractionWorkflowDefinition
,
...
...
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