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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
erp5
Commits
20ee9b58
Commit
20ee9b58
authored
Jul 13, 2016
by
iv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Workflow: some refactoring on dc_workflow_asERP5Object
parent
c33ac428
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
53 deletions
+51
-53
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/WorkflowTool_convertWorkflow.xml
...rtal_skins/erp5_workflow/WorkflowTool_convertWorkflow.xml
+1
-1
product/ERP5Type/tests/ERP5TypeTestCase.py
product/ERP5Type/tests/ERP5TypeTestCase.py
+2
-2
product/ERP5Workflow/Tool/WorkflowTool.py
product/ERP5Workflow/Tool/WorkflowTool.py
+48
-50
No files found.
bt5/erp5_workflow/SkinTemplateItem/portal_skins/erp5_workflow/WorkflowTool_convertWorkflow.xml
View file @
20ee9b58
...
@@ -86,7 +86,7 @@ for workflow in selected_workflow_list:\n
...
@@ -86,7 +86,7 @@ for workflow in selected_workflow_list:\n
url_quote(\'workflow(s) is already exist.\')))\n
url_quote(\'workflow(s) is already exist.\')))\n
\n
\n
# conversion and reassignment\n
# conversion and reassignment\n
new_workflow = context.dc_workflow_asERP5Object(
context, workflow, temp=0
)\n
new_workflow = context.dc_workflow_asERP5Object(
workflow, is_temporary=False
)\n
context.reassignWorkflow(new_workflow.getId())\n
context.reassignWorkflow(new_workflow.getId())\n
selected_workflow_id_list.append(new_workflow.getId())\n
selected_workflow_id_list.append(new_workflow.getId())\n
\n
\n
...
...
product/ERP5Type/tests/ERP5TypeTestCase.py
View file @
20ee9b58
...
@@ -1014,14 +1014,14 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
...
@@ -1014,14 +1014,14 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
workflow
=
workflow_tool
.
_getOb
(
workflow_id
)
workflow
=
workflow_tool
.
_getOb
(
workflow_id
)
if
workflow
.
getPortalType
()
not
in
[
'Workflow'
,
'Interaction Workflow'
,
'Configuration Workflow'
]:
if
workflow
.
getPortalType
()
not
in
[
'Workflow'
,
'Interaction Workflow'
,
'Configuration Workflow'
]:
LOG
(
"### workflow id"
,
0
,
workflow_id
)
LOG
(
"### workflow id"
,
0
,
workflow_id
)
new_workflow
=
workflow_tool
.
dc_workflow_asERP5Object
(
workflow
_tool
,
workflow
,
temp
=
0
)
new_workflow
=
workflow_tool
.
dc_workflow_asERP5Object
(
workflow
,
is_temporary
=
False
)
workflow_tool
.
reassignWorkflow
(
workflow_id
)
workflow_tool
.
reassignWorkflow
(
workflow_id
)
self
.
commit
()
self
.
commit
()
LOG
(
"### reassigned"
,
0
,
workflow_id
)
LOG
(
"### reassigned"
,
0
,
workflow_id
)
# force convert edit_workflow: Why have to load edit_workflow this way?
# force convert edit_workflow: Why have to load edit_workflow this way?
edit_workflow
=
workflow_tool
.
_getOb
(
'edit_workflow'
,
None
)
edit_workflow
=
workflow_tool
.
_getOb
(
'edit_workflow'
,
None
)
if
edit_workflow
is
not
None
:
if
edit_workflow
is
not
None
:
new_workflow
=
workflow_tool
.
dc_workflow_asERP5Object
(
workflow_tool
,
edit_workflow
,
temp
=
0
)
new_workflow
=
workflow_tool
.
dc_workflow_asERP5Object
(
edit_workflow
,
is_temporary
=
False
)
workflow_tool
.
reassignWorkflow
(
'edit_workflow'
)
workflow_tool
.
reassignWorkflow
(
'edit_workflow'
)
LOG
(
"### edit workflow"
,
0
,
"after reassignment"
)
LOG
(
"### edit workflow"
,
0
,
"after reassignment"
)
self
.
commit
()
self
.
commit
()
...
...
product/ERP5Workflow/Tool/WorkflowTool.py
View file @
20ee9b58
This diff is collapsed.
Click to expand it.
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