[Erp5-report] r32012 nicolas - /erp5/trunk/products/ERP5OOo/FormPrintout.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jan 27 11:51:38 CET 2010


Author: nicolas
Date: Wed Jan 27 11:51:37 2010
New Revision: 32012

URL: http://svn.erp5.org?rev=32012&view=rev
Log:
Most of index_html implementation require at least "REQUEST" parameter.
So change method signatures to follow this convention.
Reviewed by Romain

Modified:
    erp5/trunk/products/ERP5OOo/FormPrintout.py

Modified: erp5/trunk/products/ERP5OOo/FormPrintout.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5OOo/FormPrintout.py?rev=32012&r1=32011&r2=32012&view=diff
==============================================================================
--- erp5/trunk/products/ERP5OOo/FormPrintout.py [utf8] (original)
+++ erp5/trunk/products/ERP5OOo/FormPrintout.py [utf8] Wed Jan 27 11:51:37 2010
@@ -173,7 +173,7 @@
     self.template = template
 
   security.declareProtected('View', 'index_html')
-  def index_html(self, icon=0, preview=0, width=None, height=None, REQUEST=None):
+  def index_html(self, REQUEST, icon=0, preview=0, width=None, height=None, RESPONSE=None):
     """Render and view a printout document."""
 
     obj = getattr(self, 'aq_parent', None)
@@ -200,10 +200,8 @@
     content_type = printout_template.content_type
     self.strategy = self._createStrategy(content_type)
     printout = self.strategy.render(extra_context=extra_context)
-    return self._oooConvertByFormat(printout,
-                                    content_type=content_type,
-                                    extra_context=extra_context,
-                                    REQUEST=REQUEST)
+    return self._oooConvertByFormat(printout, content_type,
+                                    extra_context, REQUEST)
 
   security.declareProtected('View', '__call__')
   __call__ = index_html
@@ -229,7 +227,7 @@
       return ODGStrategy()
     raise ValueError, 'Template type: %s is not supported' % content_type
 
-  def _oooConvertByFormat(self, printout, content_type=None, extra_context={}, REQUEST=None):
+  def _oooConvertByFormat(self, printout, content_type, extra_context, REQUEST):
     """
     Convert the ODF document into the given format.
 




More information about the Erp5-report mailing list