From cbcc8942060e0641e39f891029d2dee07d3848a0 Mon Sep 17 00:00:00 2001 From: Alexandre Boeglin <alex@nexedi.com> Date: Tue, 21 Sep 2004 13:38:58 +0000 Subject: [PATCH] Pass selection to stat methods, instead of only selection params. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1775 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Form/ListBox.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/product/ERP5Form/ListBox.py b/product/ERP5Form/ListBox.py index 7894c1486f..db39703f94 100755 --- a/product/ERP5Form/ListBox.py +++ b/product/ERP5Form/ListBox.py @@ -1304,9 +1304,10 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')"> #LOG('ListBox', 0, 'column = %s, value = %s' % (repr(column), repr(value))) if callable(attribute_value): try: - params = dict(kw) + #params = dict(kw) #params['operator'] = stats[n] - attribute_value=attribute_value(**params) + #attribute_value=attribute_value(**params) + attribute_value=attribute_value(selection=selection) except: LOG('ListBox', 0, 'WARNING: Could not call %s with %s: ' % (repr(attribute_value), repr(params)), error=sys.exc_info()) pass @@ -1473,9 +1474,10 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')"> #LOG('ListBox', 0, 'column = %s, value = %s' % (repr(column), repr(value))) if callable(value): try: - params = dict(kw) + #params = dict(kw) #params['operator'] = stats[n] - value=value(**params) + #value=value(**params) + value=value(selection=selection) except: LOG('ListBox', 0, 'WARNING: Could not call %s with %s: ' % (repr(value), repr(params)), error=sys.exc_info()) pass -- 2.30.9