Commit 2f51cd9f authored by Nicolas Delaby's avatar Nicolas Delaby

Avoid Conversion When calling OOoStylesheet

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20747 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ab30bfaa
......@@ -461,11 +461,16 @@ xmlns:config="http://openoffice.org/2001/config" office:version="1.0">
raise ValueError, 'Can not render a template without a parent acquisition context'
# Retrieve master document
ooo_document = getattr(here, self.ooo_stylesheet)
# If style is dynamic, call it
format = request.get('format')
try:
ooo_document = ooo_document()
except AttributeError:
pass
# If style is dynamic, call it
try:
request.set('format', None)
ooo_document = ooo_document()
except AttributeError:
pass
finally:
request.set('format', format)
# Create a new builder instance
ooo_builder = OOoBuilder(ooo_document)
# Pass builder instance as extra_context
......
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