Commit 41ecf8ff authored by Yoshinori Okuji's avatar Yoshinori Okuji

Use toxml to export a business template.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3027 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 76144f20
...@@ -124,7 +124,7 @@ class TemplateTool (BaseTool): ...@@ -124,7 +124,7 @@ class TemplateTool (BaseTool):
""" """
cfg = getConfiguration() cfg = getConfiguration()
path = os.path.join(cfg.clienthome, '%s-%s.bt5' % (business_template.getTitle(), business_template.getVersion())) path = os.path.join(cfg.clienthome, '%s-%s.bt5' % (business_template.getTitle(), business_template.getVersion()))
export_string = self.manage_exportObject(id=business_template.getId(), toxml=1, download=1) export_string = business_template.toxml()
f = open(path, 'wb') f = open(path, 'wb')
try: try:
f.write(export_string) f.write(export_string)
...@@ -142,7 +142,7 @@ class TemplateTool (BaseTool): ...@@ -142,7 +142,7 @@ class TemplateTool (BaseTool):
""" """
Export in a format or another Export in a format or another
""" """
export_string = self.manage_exportObject(id=business_template.getId(), toxml=1, download=1) export_string = business_template.toxml()
if RESPONSE is not None: if RESPONSE is not None:
RESPONSE.setHeader('Content-type','application/data') RESPONSE.setHeader('Content-type','application/data')
RESPONSE.setHeader('Content-Disposition', RESPONSE.setHeader('Content-Disposition',
......
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