diff --git a/product/ERP5/Tool/TemplateTool.py b/product/ERP5/Tool/TemplateTool.py index 49c0b6696a1fa44a16360a56f35c769f81eb7b74..90ce5c7c0365698ccc4d910e35bd4d91eb1d0af4 100644 --- a/product/ERP5/Tool/TemplateTool.py +++ b/product/ERP5/Tool/TemplateTool.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved. @@ -61,6 +62,8 @@ import subprocess WIN = os.name == 'nt' +_MARKER = [] + class BusinessTemplateUnknownError(Exception): """ Exception raised when the business template is impossible to find in the repositories @@ -1042,7 +1045,7 @@ class TemplateTool (BaseTool): security.declareProtected(Permissions.ManagePortal, 'installBusinessTemplatesFromRepositories' ) def installBusinessTemplatesFromRepositories(self, template_list, - only_newer=True): + only_newer=True, update_catalog=_MARKER): """Installs template_list from configured repositories by default only newest""" # XXX-Luke: This method could replace # TemplateTool_installRepositoryBusinessTemplateList while still being @@ -1057,7 +1060,10 @@ class TemplateTool (BaseTool): template_name]['revision']: template_document = self.download(template_dict[template_name][ 'url']) - template_document.install() + if update_catalog is _MARKER: + template_document.install() + else: + template_document.install(update_catalog=update_catalog) opreation_log.append('Installed %s with revision %s' % ( template_document.getTitle(), template_document.getRevision())) else: