diff --git a/product/ERP5/Tool/TemplateTool.py b/product/ERP5/Tool/TemplateTool.py index b5798b59079a468811df0f56de5f91dd52bebb13..9e5f619c6677c49874e6e3afe84929daadc5750c 100644 --- a/product/ERP5/Tool/TemplateTool.py +++ b/product/ERP5/Tool/TemplateTool.py @@ -1648,11 +1648,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() @@ -1661,8 +1661,8 @@ class TemplateTool (BaseTool): return combinedBM security.declareProtected(Permissions.ManagePortal, - 'installMultipleBusinessManager') - def installMultipleBusinessManager(self, bm): + 'installBusinessManager') + def installBusinessManager(self, bm): """ Run installation on flattened Business Manager """ @@ -1673,6 +1673,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):