Commit bdfc3b11 authored by Aurel's avatar Aurel

* execute build transition at import of Business Template

* don't export empty items in SiteProperty


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4271 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b4f796a9
......@@ -1342,6 +1342,7 @@ class SitePropertyTemplateItem(BaseTemplateItem):
if type in ('lines', 'tokens'):
xml_data += os.linesep+' <value>'
for item in object:
if item != '':
xml_data += os.linesep+' <item>%s</item>' %(item,)
xml_data += os.linesep+' </value>'
else:
......@@ -2101,10 +2102,12 @@ Business Template is a set of definitions, such as skins, portal types and categ
'business_template_installation_workflow'] = None
security.declareProtected(Permissions.ManagePortal, 'build')
def build(self):
def build(self, no_action=0):
"""
Copy existing portal objects to self
"""
if no_action: return # this is use at import of Business Template to get the status built
# Make sure that everything is sane.
self.clean()
......
......@@ -249,6 +249,7 @@ class TemplateTool (BaseTool):
tempid, temppath = mkstemp()
file, headers = urlretrieve(url, temppath)
bt = self._importBT(temppath, id)
bt.build(no_action=1)
bt.reindexObject()
if REQUEST is not None:
......@@ -278,6 +279,7 @@ class TemplateTool (BaseTool):
tempfile.close()
bt = self._importBT(temppath, id)
bt.build(no_action=1)
bt.reindexObject()
if REQUEST is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment