Commit 92337172 authored by Ivan Tyagov's avatar Ivan Tyagov

It's possible to override max lines from selection parameters.

This can be useful in 'report' mode when we may like to override 
default max lines per page and possibly show all records.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16886 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cf8a2d5d
......@@ -1445,7 +1445,6 @@ class ListBoxRenderer:
selection_name = self.getSelectionName()
start = self.getLineStart()
max_lines = self.getMaxLineNumber()
report_section_list = []
if self.isReportTreeMode():
......@@ -2152,6 +2151,10 @@ class ListBoxHTMLRenderer(ListBoxRenderer):
def getMaxLineNumber(self):
"""Return the maximum number of lines shown in a page.
"""
list_lines =self.getParamDict().get('list_lines', None)
if list_lines is not None:
# it's possible to override max lines from selection parameters
return list_lines
return self.field.get_value('lines')
getMaxLineNumber = VolatileCachingMethod(getMaxLineNumber)
......
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