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:
self.saved_request_form = REQUEST.form
# REQUEST.form is cleared here, because when rendering a report section
# with a listbox, listbox gets parameters from request.form and edits
# selection with those parameters, so if you happen to pass explicitly
# selection params that have the same name as some request parameters (some
# dialog fields) but different values, listbox would not use your explicit
# parameters, but the ones from REQUEST.form.
# As a result, request parameters are not available inside a report
# section, and if one needs to access report parameters from inside a
# report section, he have to store them in selection parameters in the
# report method (the method returning the list of ReportSection)
REQUEST.form = {}
# When rendering a report section with a listbox, listbox gets parameters
# from request.form and edits selection with those parameters, so if you
# happen to pass explicitly selection params that have the same name as
# some request parameters (some dialog fields) but different values,
# listbox would not use your explicit parameters, but the ones from
# REQUEST.form, so we remove eventual request parameters that have the same
# name of selections parameters passed explicitly.
for selection_parameter in (self.selection_params or ()):
REQUEST.form.pop(selection_parameter, None)
security.declarePublic('popReport')
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