From 81cda1b11a2a30f0893f9dee842babb8ec4c6d4d Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Fri, 19 May 2017 14:25:20 +0900 Subject: [PATCH] ERP5Form.ListBox: Extend select_expression cleanup to modern equivalents --- product/ERP5Form/ListBox.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/product/ERP5Form/ListBox.py b/product/ERP5Form/ListBox.py index 3d2bff5f69..82e95ad0b8 100644 --- a/product/ERP5Form/ListBox.py +++ b/product/ERP5Form/ListBox.py @@ -1224,7 +1224,7 @@ class ListBoxRenderer: params['select_columns'] = ', '.join(sql_column_list) - # XXX Remove selection_expression if present. + # XXX Remove selection_expression (and equivalents) if present. # This is necessary for now, because the actual selection expression in # search catalog does not take the requested columns into account. If # select_expression is passed, this can raise an exception, because stat @@ -1236,8 +1236,9 @@ class ListBoxRenderer: # catalog.* but only selection_expression. But this is a bit difficult, # because there is no simple way to distinguish queried columns from callable # objects in the current ListBox configuration. - if 'select_expression' in params: - del params['select_expression'] + params.pop('select_expression', None) + params.pop('select_list', None) + params.pop('select_dict', None) params.setdefault('limit', 1000) self.getSelection().edit(params=params) -- 2.30.9