Commit e13dce77 authored by Jérome Perrin's avatar Jérome Perrin

When a relation field defines multiple proxy listbox ids, don't use to the...

When a relation field defines multiple proxy listbox ids, don't use to the first one, use the default.
The previous behaviour to use the first one is kept if there is only one proxy listbox id.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29121 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 074465ad
......@@ -1207,10 +1207,10 @@ class SelectionTool( BaseTool, UniqueObject, SimpleItem ):
proxy_listbox_ids = field.get_value('proxy_listbox_ids')
REQUEST.set('proxy_listbox_ids', proxy_listbox_ids)
if len(proxy_listbox_ids) > 0:
if len(proxy_listbox_ids) == 1:
REQUEST.set('proxy_listbox_id', proxy_listbox_ids[0][0])
else:
REQUEST.set('proxy_listbox_id', \
REQUEST.set('proxy_listbox_id',
"Base_viewRelatedObjectListBase/listbox")
# Empty the selection (uid)
......
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