Commit 280d63da authored by Romain Courteaud's avatar Romain Courteaud

Do not use cookie in Base_editRelation.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6462 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ef4fa67b
......@@ -73,10 +73,6 @@
from Products.ERP5Type.Message import Message\n
from Products.Formulator.Errors import ValidationError, FormValidationError\n
\n
# XXX Hardcoded value\n
# from Products.ERP5Form.SelectionTool import PREVIOUS_REQUEST_COOKIE_NAME\n
PREVIOUS_REQUEST_COOKIE_NAME = "previous_request" \n
\n
# Harcoded value, which must be taken from RelationField.py\n
SUB_FIELD_ID = \'relation\'\n
\n
......@@ -112,14 +108,9 @@ if relation_setter_id: \n
\n
portal_type = [x[0] for x in field.get_value(\'portal_type\')]\n
\n
# old_request = context.portal_selections.getObjectFromPickleAndSignature(\n
# request.form_pickle, \n
# request.form_signature)\n
\n
old_request = context.portal_selections.getCookieInfo(\n
request,\n
PREVIOUS_REQUEST_COOKIE_NAME)\n
# \'GreatCookieNameXXX\')\n
old_request = context.portal_selections.getObjectFromPickleAndSignature(\n
request.form_pickle, \n
request.form_signature)\n
\n
field_key = field.generate_field_key()\n
if old_request.has_key(\'sub_index\'):\n
......@@ -130,8 +121,6 @@ if old_request.has_key(\'sub_index\'):\n
old_request[\'sub_index\']), \n
key=field_key)\n
old_request[sub_field_key] = str(uids[0])\n
# old_request[\'relation_field_%s_%s\' % \\\n
# (field_id, old_request[\'sub_index\'] )] = str(uids[0])\n
else:\n
# XXX Not very dynamic...\n
\n
......@@ -226,7 +215,6 @@ return context.Base_edit(form_id, \n
<string>Products.Formulator.Errors</string>
<string>ValidationError</string>
<string>FormValidationError</string>
<string>PREVIOUS_REQUEST_COOKIE_NAME</string>
<string>SUB_FIELD_ID</string>
<string>_getattr_</string>
<string>context</string>
......
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