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
2b265d1d
Commit
2b265d1d
authored
Feb 27, 2017
by
Ayush Tiwari
Committed by
Ayush Tiwari
Nov 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Add function for installing Multiple Business Manger
parent
7194af6e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
product/ERP5/Tool/TemplateTool.py
product/ERP5/Tool/TemplateTool.py
+14
-4
No files found.
product/ERP5/Tool/TemplateTool.py
View file @
2b265d1d
...
...
@@ -1651,11 +1651,11 @@ class TemplateTool (BaseTool):
else
:
# Summation should also consider arithmetic on the Business Item(s)
# having same path and layer and combine them.
combinedBM
=
sum
(
bm_list
)
combinedBM
=
reduce
(
lambda
x
,
y
:
x
+
y
,
bm_list
)
# XXX: We are missing the part of creating installed_BM for all the BM
# we have in bm_list, because this would be needed in case we build
# Business Manager again
# Business Manager again
.
# Reduce the final Business Manager
combinedBM
.
reduceBusinessManager
()
...
...
@@ -1664,8 +1664,8 @@ class TemplateTool (BaseTool):
return
combinedBM
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'install
Multiple
BusinessManager'
)
def
install
Multiple
BusinessManager
(
self
,
bm
):
'installBusinessManager'
)
def
installBusinessManager
(
self
,
bm
):
"""
Run installation on flattened Business Manager
"""
...
...
@@ -1676,6 +1676,16 @@ class TemplateTool (BaseTool):
else
:
raise
ValueError
,
'Business Manager not flattened, cannot install'
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'installMultipleBusinessManager'
)
def
installMultipleBusinessManager
(
self
,
bm_list
):
"""
Run installation on flattened Business Manager
"""
combinedBM
=
self
.
combineMultipleBusinessManager
(
bm_list
)
self
.
installBusinessManager
(
combinedBM
)
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'getBusinessTemplateUrl'
)
def
getBusinessTemplateUrl
(
self
,
base_url_list
,
bt5_title
):
...
...
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