[Erp5-report] r20643 - /erp5/trunk/products/ERP5OOo/Document/OOoDocument.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Apr 18 11:58:20 CEST 2008


Author: alex
Date: Fri Apr 18 11:58:19 2008
New Revision: 20643

URL: http://svn.erp5.org?rev=20643&view=rev
Log:
Use _ViewEmulator in _setCacheHeaders, as it expects an action, not an object

Modified:
    erp5/trunk/products/ERP5OOo/Document/OOoDocument.py

Modified: erp5/trunk/products/ERP5OOo/Document/OOoDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/Document/OOoDocument.py?rev=20643&r1=20642&r2=20643&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/Document/OOoDocument.py (original)
+++ erp5/trunk/products/ERP5OOo/Document/OOoDocument.py Fri Apr 18 11:58:19 2008
@@ -36,7 +36,8 @@
 from OFS.Image import Pdata
 from OFS.Image import File as OFSFile
 from OFS.content_types import guess_content_type
-from Products.CMFCore.utils import getToolByName, _setCacheHeaders
+from Products.CMFCore.utils import getToolByName, _setCacheHeaders,\
+    _ViewEmulator
 from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
 from Products.ERP5Type.Cache import CachingMethod
 from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
@@ -170,7 +171,7 @@
       by calling getTargetFormatItemList.
     """
     # Accelerate rendering in Web mode
-    _setCacheHeaders(self, {'format' : format})
+    _setCacheHeaders(_ViewEmulator().__of__(self), {'format' : format})
 
     # Verify that the format is acceptable (from permission point of view)
     method = self._getTypeBasedMethod('checkConversionFormatPermission', 




More information about the Erp5-report mailing list