From 9355cdf6c21d6b27dae6303710564edc71572ab7 Mon Sep 17 00:00:00 2001
From: Nicolas Delaby <nicolas@nexedi.com>
Date: Wed, 27 Jan 2010 10:51:37 +0000
Subject: [PATCH] Most of index_html implementation require at least "REQUEST"
 parameter. So change method signatures to follow this convention. Reviewed by
 Romain

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32012 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5OOo/FormPrintout.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/product/ERP5OOo/FormPrintout.py b/product/ERP5OOo/FormPrintout.py
index 3bc73e4b60..0e4959e8bb 100644
--- a/product/ERP5OOo/FormPrintout.py
+++ b/product/ERP5OOo/FormPrintout.py
@@ -173,7 +173,7 @@ class FormPrintout(Implicit, Persistent, RoleManager, Item):
     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 @@ class FormPrintout(Implicit, Persistent, RoleManager, Item):
     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 @@ class FormPrintout(Implicit, Persistent, RoleManager, Item):
       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.
 
-- 
2.30.9