From e13dce7782695b61dc4d2f334b57ed80f3a0ddd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Mon, 21 Sep 2009 10:01:45 +0000 Subject: [PATCH] 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 --- product/ERP5Form/SelectionTool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/product/ERP5Form/SelectionTool.py b/product/ERP5Form/SelectionTool.py index a70b4a0122..ab2cfbc61f 100644 --- a/product/ERP5Form/SelectionTool.py +++ b/product/ERP5Form/SelectionTool.py @@ -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) -- 2.30.9