Commit 2a4e9972 authored by Alexandre Boeglin's avatar Alexandre Boeglin

Pass report to selection before calling report tree inline stat method.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1777 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9934b6d6
...@@ -786,7 +786,7 @@ class ListBoxWidget(Widget.Widget): ...@@ -786,7 +786,7 @@ class ListBoxWidget(Widget.Widget):
report_sections = [] report_sections = []
#LOG("Report Tree",0,str(report_tree_list)) #LOG("Report Tree",0,str(report_tree_list))
for s in report_tree_list: for s in report_tree_list:
# Prepare query # Prepare query by defining selection report object
selection.edit(report = s[4]) selection.edit(report = s[4])
if s[1]: if s[1]:
# Push new select_expression # Push new select_expression
...@@ -794,8 +794,7 @@ class ListBoxWidget(Widget.Widget): ...@@ -794,8 +794,7 @@ class ListBoxWidget(Widget.Widget):
kw['select_expression'] = select_expression kw['select_expression'] = select_expression
selection.edit( params = kw ) selection.edit( params = kw )
#LOG('ListBox 569', 0, str((selection_name, selection.__dict__))) #LOG('ListBox 569', 0, str((selection_name, selection.__dict__)))
stat_temp = selection(method = stat_method, stat_temp = selection(method = stat_method, context=here, REQUEST=REQUEST)
context=here, REQUEST=REQUEST)
# Pop new select_expression # Pop new select_expression
if original_select_expression is None: if original_select_expression is None:
del kw['select_expression'] del kw['select_expression']
...@@ -1307,7 +1306,9 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')"> ...@@ -1307,7 +1306,9 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')">
#params = dict(kw) #params = dict(kw)
#params['operator'] = stats[n] #params['operator'] = stats[n]
#attribute_value=attribute_value(**params) #attribute_value=attribute_value(**params)
selection.edit(report=current_section[6])
attribute_value=attribute_value(selection=selection) attribute_value=attribute_value(selection=selection)
selection.edit(report=None)
except: except:
LOG('ListBox', 0, 'WARNING: Could not call %s with %s: ' % (repr(attribute_value), repr(params)), error=sys.exc_info()) LOG('ListBox', 0, 'WARNING: Could not call %s with %s: ' % (repr(attribute_value), repr(params)), error=sys.exc_info())
pass pass
......
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