Commit 9649152b authored by Jean-Paul Smets's avatar Jean-Paul Smets

Added extra verification and parameters so that editable fields which are...

Added extra verification and parameters so that editable fields which are rendered in listboxes and which use the cell parameter in TALES expression do not generate useless errors anylonger.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17615 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4f7ce7f7
......@@ -909,8 +909,10 @@ class ListBoxRenderer:
search_alias = '_'.join(search_id.split('.'))
# If the search field could not be found, try to get an "editable" field on current form.
editable_field_id = '%s_%s' % (listbox_id, search_alias)
if listbox_form.has_field(editable_field_id):
search_field = listbox_form.get_field(editable_field_id)
if listbox_form.has_field(editable_field_id, include_disabled=1): # We must include disabled fields at this
# stage since there is no way (yet)
# to evalue cell in TALES expressions
search_field = listbox_form.get_field(editable_field_id, include_disabled=1)
else:
continue
render_dict = search_field.render_dict(search_value)
......@@ -992,8 +994,8 @@ class ListBoxRenderer:
"""
form = self.getForm()
editable_field_id = '%s_%s' % (self.getId(), alias)
if form.has_field(editable_field_id):
return form.get_field(editable_field_id)
if form.has_field(editable_field_id, include_disabled=1):
return form.get_field(editable_field_id, include_disabled=1)
return None
def getListMethod(self):
......@@ -3258,7 +3260,6 @@ class ListBoxLine:
"""
return self.column_dict[column_id]
security.declarePublic('getColumnPropertyList')
def getColumnPropertyList(self, column_id_list = 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