Commit 39cc1b1c authored by Yoshinori Okuji's avatar Yoshinori Okuji

Add a new method save.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@850 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 35c93ef5
......@@ -30,6 +30,9 @@ import cStringIO
from webdav.client import Resource
from Products.CMFCore.utils import UniqueObject
from App.config import getConfiguration
import os
from Acquisition import Implicit
from AccessControl import ClassSecurityInfo
from Globals import InitializeClass, DTMLFile, PersistentMapping
......@@ -129,6 +132,17 @@ class TemplateTool (BaseTool):
return local_configuration.__of__(self)
return None
def save(self, business_template, toxml=None):
"""
Save in a format or another
"""
business_template.build()
self.manage_exportObject(id=business_template.getId())
suffix = toxml and 'xml' or 'zexp'
cfg = getConfiguration()
f = os.path.join(cfg.clienthome, '%s.%s' % (business_template.getId(), suffix))
return f
def publish(self, business_template, url, username=None, password=None):
"""
Publish in a format or another
......
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