From 31524a50b36d17c414e834b3f781de8dcb5516ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Mon, 20 Feb 2006 00:07:32 +0000
Subject: [PATCH] Use the same filter parameters for jump than for searching
 catalog (this uses not yet implemented `filter` feature)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5752 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_core/Base_jumpToRelatedDocument.xml        | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_jumpToRelatedDocument.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_jumpToRelatedDocument.xml
index 4f8223db91..b8d82809e4 100755
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_jumpToRelatedDocument.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_jumpToRelatedDocument.xml
@@ -74,7 +74,10 @@ form = getattr(context,form_id)\n
 field = form.get_field(field_id)\n
 base_category = field.get_value(\'base_category\')\n
 portal_type = map(lambda x:x[0],field.get_value(\'portal_type\'))\n
-jump_reference_list = context.getAcquiredValueList(base_category, portal_type=portal_type)\n
+kw = {}\n
+for k, v in field.get_value(\'parameter_list\') :\n
+  kw[k] = v\n
+jump_reference_list = context.getAcquiredValueList(base_category, portal_type=portal_type, filter=kw)\n
 \n
 if len(jump_reference_list)==1:\n
   jump_reference = jump_reference_list[0]\n
@@ -133,7 +136,7 @@ else:\n
                             <string>ZTUtils</string>
                             <string>make_query</string>
                             <string>_getattr_</string>
-<string>context</string>
+                            <string>context</string>
                             <string>request</string>
                             <string>getattr</string>
                             <string>form</string>
@@ -141,12 +144,16 @@ else:\n
                             <string>base_category</string>
                             <string>map</string>
                             <string>portal_type</string>
+                            <string>kw</string>
+                            <string>_getiter_</string>
+                            <string>k</string>
+                            <string>v</string>
+                            <string>_write_</string>
                             <string>jump_reference_list</string>
                             <string>len</string>
                             <string>_getitem_</string>
                             <string>jump_reference</string>
                             <string>selection_uid_list</string>
-                            <string>kw</string>
                           </tuple>
                         </value>
                     </item>
-- 
2.30.9