Commit 117eb66f authored by Alexandre Boeglin's avatar Alexandre Boeglin

Allows report tree statistics for closed branches not to be restricted to a...

Allows report tree statistics for closed branches not to be restricted to a strict membership, by passing one more argument into selection params.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1782 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d0701d70
...@@ -1297,12 +1297,19 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')"> ...@@ -1297,12 +1297,19 @@ onChange="submitAction(this.form,'%s/portal_selections/setReportRoot')">
#LOG('ListBox', 0, 'column = %s, value = %s' % (repr(column), repr(value))) #LOG('ListBox', 0, 'column = %s, value = %s' % (repr(column), repr(value)))
if callable(attribute_value): if callable(attribute_value):
try: try:
#params = dict(kw) # set report and closed_summary
#params['operator'] = stats[n] if report_tree == 1 :
#attribute_value=attribute_value(**params)
selection.edit(report=current_section[6]) selection.edit(report=current_section[6])
kw['closed_summary'] = 1 - current_section[5]
params = dict(kw)
selection.edit(params=params)
attribute_value=attribute_value(selection=selection) attribute_value=attribute_value(selection=selection)
# reset report and closed_summary
if report_tree == 1 :
selection.edit(report=None) selection.edit(report=None)
del kw['closed_summary']
params = dict(kw)
selection.edit(params=params)
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