From d956fd9de694f489914efc63977dc79138707f37 Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Fri, 9 Jun 2006 09:10:19 +0000
Subject: [PATCH] Don't loose current form when, for example, changing the
 current page on a listbox in a form that's not the default action (named
 'view').

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7659 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Form/SelectionTool.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/product/ERP5Form/SelectionTool.py b/product/ERP5Form/SelectionTool.py
index d76619e396..1f0cc2efa2 100644
--- a/product/ERP5Form/SelectionTool.py
+++ b/product/ERP5Form/SelectionTool.py
@@ -99,8 +99,7 @@ class SelectionTool( UniqueObject, SimpleItem ):
         return
 
       context = self.aq_parent
-      if form_id is None:
-        form_id = 'view'
+      form_id = form_id or REQUEST.get('form_id', 'view')
       url = context.absolute_url() + '/' + form_id
       if query_string is not None:
         if no_reset:
-- 
2.30.9