Commit f52f8072 authored by Jean-Paul Smets's avatar Jean-Paul Smets

User level excception must be handled through scipts or page templates, not inside classes.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13801 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 05e7c11f
......@@ -530,14 +530,7 @@ xmlns:config="http://openoffice.org/2001/config" office:version="1.0">
REQUEST.RESPONSE.setHeader('Content-type', 'application/pdf')
REQUEST.RESPONSE.setHeader('Content-disposition', 'attachment;; filename="%s.pdf"' % self.title_or_id())
return data
# now for other formats
if not tmp_ooo.isTargetFormatAllowed(format):
errstr = '%s format is not supported' % format
return tmp_ooo.returnMessage(errstr)
try:
mime, data = tmp_ooo.convert(format)
except xmlrpclib.Fault,e:
return tmp_ooo.returnMessage('Problem: %s' % str(e))
mime, data = tmp_ooo.convert(format)
if REQUEST is not None:
REQUEST.RESPONSE.setHeader('Content-type', mime)
REQUEST.RESPONSE.setHeader('Content-disposition', 'attachment;; filename="%s.%s"' % (self.title_or_id(),format))
......
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