Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
erp5
Commits
4dc7ad72
Commit
4dc7ad72
authored
Sep 07, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: No need to recursively reduce in dependencies which are already BM
parent
87bcd6d9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
33 deletions
+35
-33
product/ERP5/Tool/TemplateTool.py
product/ERP5/Tool/TemplateTool.py
+35
-33
No files found.
product/ERP5/Tool/TemplateTool.py
View file @
4dc7ad72
...
...
@@ -592,7 +592,7 @@ class TemplateTool (BaseTool):
importAndReExportBusinessTemplateFromPath(template_path)
security.declareProtected( '
Import
/
Export
objects
', '
migrateBTToBM
')
def migrateBTToBM(self, template_path, REQUEST=None, **kw):
def migrateBTToBM(self, template_path,
isReduced=False,
REQUEST=None, **kw):
"""
Migrate business template repository to Business Manager repo.
Business Manager completely rely only on BusinessItem and to show
...
...
@@ -832,6 +832,9 @@ class TemplateTool (BaseTool):
Used for recursive udpation of layer for dependency in a BT
"""
dependency_list
=
bt
.
getDependencyList
()
# XXX: Do not return template_path_list of the new BM incase there is no
# dependency_list, instead look for the latest updated version of
# new_template_path_list
if
not
dependency_list
:
return
template_path_list
else
:
...
...
@@ -867,7 +870,11 @@ class TemplateTool (BaseTool):
# Check for the item list and if the BT is Business Manager,
# if BM, then compare and update layer and if not run migration and
# then do it again
if
base_bt
.
getPortalType
()
==
'Business Manager'
:
if
base_bt
.
getPortalType
()
!=
'Business Manager'
:
# If the base_bt is not Business Manager, run the migration on the
# base_bt
base_bt
=
self
.
migrateBTToBM
(
base_bt_path
,
isReduced
=
True
)
# Check for item path which also exists in base_bt
base_path_list
=
base_bt
.
getPathList
()
...
...
@@ -892,14 +899,6 @@ class TemplateTool (BaseTool):
# with taking care of layer
reduceDependencyList
(
base_bt
,
new_template_path_list
)
# If the base_bt is not Business Manager, run the migration on the
# base_bt
else
:
# XXX: Just calling migrateBTToBM here won't do anything, we need
# to remove the BT from path and then update it with the migrated
# one
base_bt
=
self
.
migrateBTToBM
(
base_bt_path
)
return
new_template_path_list
# Take care about the the dependency_list also and then update the layer
...
...
@@ -939,6 +938,9 @@ class TemplateTool (BaseTool):
if
is_installed
:
import_template
.
uninstall
()
if
isReduced
:
return
migrated_bm
def
cleanTemplatePathList
(
self
,
path_list
):
"""
Remove redundant paths and sub-objects' path if the object path already
...
...
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