Commit 8805d212 authored by Jérome Perrin's avatar Jérome Perrin

set value in request with real key


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40931 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fa986c21
...@@ -55,10 +55,7 @@ ...@@ -55,10 +55,7 @@
# Updates relation of an ERP5 document\n # Updates relation of an ERP5 document\n
from Products.ERP5Type.Message import Message\n from Products.ERP5Type.Message import Message\n
from Products.Formulator.Errors import ValidationError\n from Products.Formulator.Errors import ValidationError\n
\n from Products.ERP5Form.MultiRelationField import SUB_FIELD_ID\n
# XXX: Harcoded value, which must be taken from RelationField.py\n
# XXX why not import it then ???\n
SUB_FIELD_ID = \'relation\'\n
\n \n
if listbox_uid is not None:\n if listbox_uid is not None:\n
selection_tool = context.getPortalObject().portal_selections\n selection_tool = context.getPortalObject().portal_selections\n
...@@ -79,7 +76,7 @@ else:\n ...@@ -79,7 +76,7 @@ else:\n
# XXX Not very dynamic...\n # XXX Not very dynamic...\n
sub_field_key = field.generate_subfield_key(SUB_FIELD_ID, key=field_key)\n sub_field_key = field.generate_subfield_key(SUB_FIELD_ID, key=field_key)\n
old_request[sub_field_key] = uids\n old_request[sub_field_key] = uids\n
\n old_request[field_key] = uids\n
\n \n
request = container.REQUEST\n request = container.REQUEST\n
request_form = request.form\n request_form = request.form\n
...@@ -143,6 +140,7 @@ return edit_method(form_id,\n ...@@ -143,6 +140,7 @@ return edit_method(form_id,\n
<string>Message</string> <string>Message</string>
<string>Products.Formulator.Errors</string> <string>Products.Formulator.Errors</string>
<string>ValidationError</string> <string>ValidationError</string>
<string>Products.ERP5Form.MultiRelationField</string>
<string>SUB_FIELD_ID</string> <string>SUB_FIELD_ID</string>
<string>None</string> <string>None</string>
<string>_getattr_</string> <string>_getattr_</string>
......
40817 40818
\ No newline at end of file \ 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