Commit 1bfd5f23 authored by Vincent Pelletier's avatar Vincent Pelletier

Extend filtering to more borderline cases:

- fields commonly found in listbox HTML renderer
- fields commonly found in xhtml style
- fields with empty string as a value, which can be empty listbox columns


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26567 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2214c90d
...@@ -85,9 +85,22 @@ class CatalogMethodWrapper(MethodWrapper): ...@@ -85,9 +85,22 @@ class CatalogMethodWrapper(MethodWrapper):
""" """
def __call__(self, *args, **kw): def __call__(self, *args, **kw):
for parameter_id in ('selection', 'selection_name', 'select_columns', for parameter_id in ('selection', 'selection_name', 'select_columns',
'reset', 'selection_index', 'list_selection_name', 'reset', 'selection_index', 'list_selection_name', 'list_start',
'list_start', 'list_lines'): 'list_lines',
# Also strip common HTML field names
# XXX: I'm not sure if those values really belong to here
'md5_object_uid_list', 'cancel_url', 'listbox_list_selection_name',
'form_id', 'select_language', 'select_favorite', 'select_module',
'select_jump', 'select_action', 'Base_doSelect'):
kw.pop(parameter_id, None) kw.pop(parameter_id, None)
# Strip all entries which have an empty string as value (ie, an empty
# field).
# XXX: I'm not sure if this filtering really belongs to here.
# It is probably needed at a more generic level (Forms ? Selection ?), or
# even a more specific one (limited to HTML ?)...
for key, value in kw.items():
if value == '':
kw.pop(key)
return getattr(self.context, self.method_name)(*args, **kw) return getattr(self.context, self.method_name)(*args, **kw)
class ReportTree: class ReportTree:
......
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