From a10f8a9405a7d3a353b6372d3445b015f84d0e2d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 17 Aug 2007 15:28:40 +0000
Subject: [PATCH] use changeSkin('Print') instead of creating a new request by
 redirection

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15736 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_skins/erp5_core/Base_printPdf.xml          | 11 ++++-------
 product/ERP5/bootstrap/erp5_core/bt/revision          |  2 +-
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_printPdf.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_printPdf.xml
index 94fcec48f9..c20fb0c3f8 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_printPdf.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_printPdf.xml
@@ -68,10 +68,8 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>request  = context.REQUEST\n
-\n
-redirect_url = \'%s?%s\' % ( context.absolute_url()+\'/\'+form_id, \'portal_skin=Print\')\n
-return request[ \'RESPONSE\' ].redirect( redirect_url )\n
+            <value> <string>context.getPortalObject().changeSkin(\'Print\')\n
+return getattr(context, form_id)(REQUEST=container.REQUEST)\n
 </string> </value>
         </item>
         <item>
@@ -117,9 +115,8 @@ return request[ \'RESPONSE\' ].redirect( redirect_url )\n
                             <string>form_id</string>
                             <string>_getattr_</string>
                             <string>context</string>
-                            <string>request</string>
-                            <string>redirect_url</string>
-                            <string>_getitem_</string>
+                            <string>getattr</string>
+                            <string>container</string>
                           </tuple>
                         </value>
                     </item>
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index 5c9fe11c04..511fa83dfa 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-413
\ No newline at end of file
+414
\ No newline at end of file
-- 
2.30.9