diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml index 269888fae333c94c377c6cdb7e1025dadbca22e9..b47ada6a0a81571632dbeb7b152edf15ab099c68 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_edit.xml @@ -116,7 +116,12 @@ def editListBox(listbox_field, listbox):\n gv[k] = getattr(request, k, None)\n for url, v in listbox.items():\n v.update(gv)\n - context.restrictedTraverse(url).edit(edit_order=edit_order, **v)\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 + context.restrictedTraverse(url).edit(edit_order=edit_order, **cleaned_v)\n \n def editMatrixBox(matrixbox_field, matrixbox):\n """ Function called to edit a Matrix box\n @@ -208,7 +213,12 @@ def editMatrixBox(matrixbox_field, matrixbox):\n # XXX May require some changes with Sets\n key = gv[\'mapped_value_property_list\'][0]\n v[key] = value\n - c.edit(edit_order=edit_order, **v) # and update the cell specific values\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 + c.edit(edit_order=edit_order, **cleaned_v) # and update the cell specific values\n else:\n return "Could not create cell %s" % str(k)\n else:\n diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index 3a54dbaedea1d18a119254d42f7a486de2f0be85..34e45b3489ceae9567db8d069bef338b2f5742db 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -1770 \ No newline at end of file +1771 \ No newline at end of file