Commit 0513d98e authored by Romain Courteaud's avatar Romain Courteaud

Handle selection stats in ReportSection.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22142 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f8dd48ce
...@@ -202,6 +202,7 @@ class ReportSection: ...@@ -202,6 +202,7 @@ class ReportSection:
selection_params=None, selection_params=None,
listbox_display_mode=None, listbox_display_mode=None,
selection_columns=None, selection_columns=None,
selection_stats=None,
selection_sort_order=None, selection_sort_order=None,
selection_report_path=None, selection_report_path=None,
selection_report_list=None): selection_report_list=None):
...@@ -226,6 +227,7 @@ class ReportSection: ...@@ -226,6 +227,7 @@ class ReportSection:
self.selection_params = selection_params self.selection_params = selection_params
self.listbox_display_mode = listbox_display_mode self.listbox_display_mode = listbox_display_mode
self.selection_columns = selection_columns self.selection_columns = selection_columns
self.selection_stats = selection_stats
self.selection_sort_order = selection_sort_order self.selection_sort_order = selection_sort_order
self.saved_selections = {} self.saved_selections = {}
self.selection_report_path = selection_report_path self.selection_report_path = selection_report_path
...@@ -330,6 +332,12 @@ class ReportSection: ...@@ -330,6 +332,12 @@ class ReportSection:
REQUEST=REQUEST) REQUEST=REQUEST)
portal_selections.setSelectionSortOrder(selection_name, portal_selections.setSelectionSortOrder(selection_name,
self.selection_sort_order, REQUEST=REQUEST) self.selection_sort_order, REQUEST=REQUEST)
if self.selection_stats is not None:
self.saved_selections[selection_name]['stats'] = \
portal_selections.getSelectionStats(selection_name,
REQUEST=REQUEST)
portal_selections.setSelectionStats(selection_name,
self.selection_stats, REQUEST=REQUEST)
self.saved_request_form = REQUEST.form self.saved_request_form = REQUEST.form
REQUEST.form = {} REQUEST.form = {}
...@@ -389,6 +397,10 @@ class ReportSection: ...@@ -389,6 +397,10 @@ class ReportSection:
portal_selections.setSelectionSortOrder(selection_name, portal_selections.setSelectionSortOrder(selection_name,
self.saved_selections[selection_name]['sort_order'], self.saved_selections[selection_name]['sort_order'],
REQUEST=REQUEST) REQUEST=REQUEST)
if self.selection_stats is not None:
portal_selections.setSelectionStats(selection_name,
self.saved_selections[selection_name]['stats'],
REQUEST=REQUEST)
REQUEST.form = self.saved_request_form REQUEST.form = self.saved_request_form
......
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