Commit da1f6cfe authored by Jérome Perrin's avatar Jérome Perrin

instead of cleaning all request.form, just remove parameters that overlaps with

explicit selection params


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26073 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d765caa8
...@@ -342,17 +342,15 @@ class ReportSection: ...@@ -342,17 +342,15 @@ class ReportSection:
self.saved_request_form = REQUEST.form self.saved_request_form = REQUEST.form
# REQUEST.form is cleared here, because when rendering a report section # When rendering a report section with a listbox, listbox gets parameters
# with a listbox, listbox gets parameters from request.form and edits # from request.form and edits selection with those parameters, so if you
# selection with those parameters, so if you happen to pass explicitly # happen to pass explicitly selection params that have the same name as
# selection params that have the same name as some request parameters (some # some request parameters (some dialog fields) but different values,
# dialog fields) but different values, listbox would not use your explicit # listbox would not use your explicit parameters, but the ones from
# parameters, but the ones from REQUEST.form. # REQUEST.form, so we remove eventual request parameters that have the same
# As a result, request parameters are not available inside a report # name of selections parameters passed explicitly.
# section, and if one needs to access report parameters from inside a for selection_parameter in (self.selection_params or ()):
# report section, he have to store them in selection parameters in the REQUEST.form.pop(selection_parameter, None)
# report method (the method returning the list of ReportSection)
REQUEST.form = {}
security.declarePublic('popReport') security.declarePublic('popReport')
def popReport(self, context, render_prefix=None): def popReport(self, context, render_prefix=None):
......
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