Commit a9bca9d1 authored by Sebastien Robin's avatar Sebastien Robin

- ignore the prefix when looking for editable fields of listbox,

so the display of editable field in report mode will no longer be
broken


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24473 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f32cb7a1
...@@ -580,11 +580,19 @@ class ListBoxRenderer: ...@@ -580,11 +580,19 @@ class ListBoxRenderer:
def getId(self): def getId(self):
"""Return the id of the field. Usually, "listbox". """Return the id of the field. Usually, "listbox".
The prefix will automatically be added
""" """
return self.getPrefixedString(self.field.id) return self.getPrefixedString(self.field.id)
getId = lazyMethod(getId) getId = lazyMethod(getId)
def getUnprefixedId(self):
"""Return the id of the field. Usually, "listbox".
"""
return self.field.id
getUnprefixedId = lazyMethod(getUnprefixedId)
def getTitle(self): def getTitle(self):
"""Return the title. Make sure that it is in unicode. """Return the title. Make sure that it is in unicode.
""" """
...@@ -1033,7 +1041,7 @@ class ListBoxRenderer: ...@@ -1033,7 +1041,7 @@ class ListBoxRenderer:
Return None if a field for this column does not exist. Return None if a field for this column does not exist.
""" """
form = self.getForm() form = self.getForm()
editable_field_id = '%s_%s' % (self.getId(), alias) editable_field_id = '%s_%s' % (self.getUnprefixedId(), alias)
if form.has_field(editable_field_id, include_disabled=1): if form.has_field(editable_field_id, include_disabled=1):
return form.get_field(editable_field_id, include_disabled=1) return form.get_field(editable_field_id, include_disabled=1)
......
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