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
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
erp5
Commits
ea49e297
Commit
ea49e297
authored
9 years ago
by
wenjie.zheng
Committed by
Sebastien Robin
9 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Site.py: improve migration function.
parent
2d301b80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
product/ERP5/ERP5Site.py
product/ERP5/ERP5Site.py
+11
-8
No files found.
product/ERP5/ERP5Site.py
View file @
ea49e297
...
@@ -1646,21 +1646,24 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin):
...
@@ -1646,21 +1646,24 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin):
"""
"""
if
hasattr
(
self
,
'portal_workflow_old'
):
if
hasattr
(
self
,
'portal_workflow_old'
):
tool
=
self
.
portal_workflow_old
tool
=
self
.
portal_workflow_old
if
hasattr
(
self
,
'portal_workflow'
):
self
.
manage_delObjects
([
'portal_workflow'
])
else
:
tool
=
self
.
portal_workflow
self
.
manage_renameObject
(
tool
.
id
,
'portal_workflow_old'
)
LOG
(
' ERP5Site.py'
,
WARNING
,
' rename portal_workflow to %s'
%
tool
.
id
)
new_tool
=
self
.
newContent
(
id
=
'portal_workflow'
,
portal_type
=
'ERP5 Workflow Tool'
)
LOG
(
' ERP5Site.py'
,
WARNING
,
' create %s '
%
new_tool
.
id
)
object_id_list
=
tool
.
objectIds
()
object_id_list
=
tool
.
objectIds
()
object_clipboard
=
tool
.
manage_copyObjects
(
object_id_list
)
object_clipboard
=
tool
.
manage_copyObjects
(
object_id_list
)
new_tool
=
self
.
newContent
(
id
=
'portal_workflow_new'
,
portal_type
=
'ERP5 Workflow Tool'
)
LOG
(
' ERP5Site.py'
,
WARNING
,
' create %s '
%
new_tool
.
id
)
new_tool
.
manage_pasteObjects
(
object_clipboard
)
new_tool
.
manage_pasteObjects
(
object_clipboard
)
new_tool
.
_chains_by_type
=
tool
.
_chains_by_type
new_tool
.
_chains_by_type
=
tool
.
_chains_by_type
LOG
(
' ERP5Site.py'
,
WARNING
,
' copy objects to %s from %s.'
%
(
new_tool
.
id
,
tool
.
id
))
LOG
(
' ERP5Site.py'
,
WARNING
,
' copy objects to %s from %s.'
%
(
new_tool
.
id
,
tool
.
id
))
if
hasattr
(
self
,
'portal_workflow_old'
):
self
.
manage_delObjects
([
'portal_workflow'
])
else
:
self
.
manage_renameObject
(
tool
.
id
,
'portal_workflow_old'
)
self
.
manage_renameObject
(
new_tool
.
id
,
'portal_workflow'
)
Globals
.
InitializeClass
(
ERP5Site
)
Globals
.
InitializeClass
(
ERP5Site
)
...
...
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