Commit 1adfc44a authored by Romain Courteaud's avatar Romain Courteaud

Do not use cookie with RelationField.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6464 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 47520e0c
...@@ -54,8 +54,6 @@ from zLOG import LOG ...@@ -54,8 +54,6 @@ from zLOG import LOG
from Acquisition import Implicit, aq_base from Acquisition import Implicit, aq_base
from Products.ERP5Type.Message import Message from Products.ERP5Type.Message import Message
PREVIOUS_REQUEST_COOKIE_NAME = "previous_request"
class SelectionError( Exception ): class SelectionError( Exception ):
pass pass
...@@ -921,8 +919,6 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -921,8 +919,6 @@ class SelectionTool( UniqueObject, SimpleItem ):
object = {} object = {}
return object return object
# Related document searching # Related document searching
def viewSearchRelatedDocumentDialog(self, index, form_id, REQUEST=None, def viewSearchRelatedDocumentDialog(self, index, form_id, REQUEST=None,
sub_index=None, **kw): sub_index=None, **kw):
...@@ -1032,7 +1028,7 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -1032,7 +1028,7 @@ class SelectionTool( UniqueObject, SimpleItem ):
for key in REQUEST.form.keys(): for key in REQUEST.form.keys():
if not isinstance(REQUEST.form[key],FileUpload): if not isinstance(REQUEST.form[key],FileUpload):
pickle_kw[key] = REQUEST.form[key] pickle_kw[key] = REQUEST.form[key]
self.setCookieInfo(REQUEST, PREVIOUS_REQUEST_COOKIE_NAME, **pickle_kw) form_pickle, form_signature = self.getPickleAndSignature(**pickle_kw)
base_category = None base_category = None
kw = {} kw = {}
...@@ -1052,13 +1048,15 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -1052,13 +1048,15 @@ class SelectionTool( UniqueObject, SimpleItem ):
kw['previous_form_id'] = form_id kw['previous_form_id'] = form_id
kw[field.get_value('catalog_index')] = field_value kw[field.get_value('catalog_index')] = field_value
kw['portal_status_message'] = portal_status_message kw['portal_status_message'] = portal_status_message
kw['form_pickle'] = form_pickle
# Need to redirect, if we want listbox nextPage to work kw['form_signature'] = form_signature
redirect_url = '%s/%s?%s' % ( o.absolute_url()
, redirect_form_id # Empty the selection (uid)
, make_query(kw) REQUEST.form = kw # New request form
) # Define new HTTP_REFERER
REQUEST[ 'RESPONSE' ].redirect( redirect_url ) REQUEST.HTTP_REFERER = '%s/Base_viewRelatedObjectList' % o.absolute_url()
# Return the search dialog
return getattr(o, redirect_form_id)(REQUEST=REQUEST)
def _aq_dynamic(self, name): def _aq_dynamic(self, name):
""" """
......
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