Commit 4c1968e6 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Likewise a non-ListBox field, call custom edit() if available (eg encapsulated editor).

For example, MultiRelationStringField does not return a plain value, but a
MultiRelationEditor overriding Base_edit default behavior.
parent 1551c1a4
......@@ -117,11 +117,19 @@ def editListBox(listbox_field, listbox):\n
for url, v in listbox.items():\n
v.update(gv)\n
# Form: \'\' -> ERP5: None\n
cleaned_v = v.copy()\n
for key, value in cleaned_v.items():\n
if value == \'\':\n
cleaned_v[key] = None\n
encapsulated_editor_list = []\n
cleaned_v = {}\n
for key, value in v.items():\n
if hasattr(value, \'edit\'):\n
encapsulated_editor_list.append(value)\n
else:\n
if value == \'\': \n
value = None\n
cleaned_v[key] = value\n
context.restrictedTraverse(url).edit(edit_order=edit_order, **cleaned_v)\n
\n
for encapsulated_editor in encapsulated_editor_list:\n
encapsulated_editor.edit(obj)\n
\n
def editMatrixBox(matrixbox_field, matrixbox):\n
""" Function called to edit a Matrix box\n
......
2014-01-27 arnaud.fontaine
* Likewise a non-ListBox field, call custom edit() if available (eg encapsulated editor). For example, MultiRelationStringField does not return a plain value, but a MultiRelationEditor overriding Base_edit default behavior.
2011-10-25 yusei
* Fix Base_resetListSetting. It did not work with "Set List Setting" dialog. Now it accepts any parameters.
......
40984
\ No newline at end of file
40985
\ No newline at end of file
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