Commit 31524a50 authored by Jérome Perrin's avatar Jérome Perrin

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
parent 49d71203
...@@ -74,7 +74,10 @@ form = getattr(context,form_id)\n ...@@ -74,7 +74,10 @@ form = getattr(context,form_id)\n
field = form.get_field(field_id)\n field = form.get_field(field_id)\n
base_category = field.get_value(\'base_category\')\n base_category = field.get_value(\'base_category\')\n
portal_type = map(lambda x:x[0],field.get_value(\'portal_type\'))\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 \n
if len(jump_reference_list)==1:\n if len(jump_reference_list)==1:\n
jump_reference = jump_reference_list[0]\n jump_reference = jump_reference_list[0]\n
...@@ -133,7 +136,7 @@ else:\n ...@@ -133,7 +136,7 @@ else:\n
<string>ZTUtils</string> <string>ZTUtils</string>
<string>make_query</string> <string>make_query</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>request</string> <string>request</string>
<string>getattr</string> <string>getattr</string>
<string>form</string> <string>form</string>
...@@ -141,12 +144,16 @@ else:\n ...@@ -141,12 +144,16 @@ else:\n
<string>base_category</string> <string>base_category</string>
<string>map</string> <string>map</string>
<string>portal_type</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>jump_reference_list</string>
<string>len</string> <string>len</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>jump_reference</string> <string>jump_reference</string>
<string>selection_uid_list</string> <string>selection_uid_list</string>
<string>kw</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment