[Erp5-report] r20747 - /erp5/trunk/products/ERP5OOo/OOoTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Apr 22 14:42:19 CEST 2008
Author: nicolas
Date: Tue Apr 22 14:42:18 2008
New Revision: 20747
URL: http://svn.erp5.org?rev=20747&view=rev
Log:
Avoid Conversion When calling OOoStylesheet
Modified:
erp5/trunk/products/ERP5OOo/OOoTemplate.py
Modified: erp5/trunk/products/ERP5OOo/OOoTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/OOoTemplate.py?rev=20747&r1=20746&r2=20747&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/OOoTemplate.py (original)
+++ erp5/trunk/products/ERP5OOo/OOoTemplate.py Tue Apr 22 14:42:18 2008
@@ -461,11 +461,16 @@
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
More information about the Erp5-report
mailing list