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

When looking for editable fields, if we the listbox is a proxy field, and the

editable field is not found in the current form, look in the template field's
form


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19759 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5d4ee6a9
......@@ -1017,6 +1017,14 @@ class ListBoxRenderer:
editable_field_id = '%s_%s' % (self.getId(), alias)
if form.has_field(editable_field_id, include_disabled=1):
return form.get_field(editable_field_id, include_disabled=1)
# if we are rendering a proxy field, also look for editable fields from the
# template field's form.
if self.field.has_value('form_id'):
form = getattr(self.field, self.field.get_value('form_id'), None)
if form and form.has_field(editable_field_id, include_disabled=1):
return form.get_field(editable_field_id, include_disabled=1)
return None
def getListMethod(self):
......
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