Commit 547818b0 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Make relation fields compatible with Web layouts. (Web Site, Web Section)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12081 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c4bae2ec
...@@ -1148,6 +1148,11 @@ class SelectionTool( UniqueObject, SimpleItem ): ...@@ -1148,6 +1148,11 @@ class SelectionTool( UniqueObject, SimpleItem ):
# Define new HTTP_REFERER # Define new HTTP_REFERER
REQUEST.HTTP_REFERER = '%s/%s' % (o.absolute_url(), REQUEST.HTTP_REFERER = '%s/%s' % (o.absolute_url(),
dialog_id) dialog_id)
# If we are called from a Web Site, we should return
# in the context of the Web Section
if self.getApplicableLayout() is not None:
return getattr(o.__of__(self.getWebSectionValue()), dialog_id)(REQUEST=REQUEST)
# Return the search dialog # Return the search dialog
return getattr(o, dialog_id)(REQUEST=REQUEST) return getattr(o, dialog_id)(REQUEST=REQUEST)
......
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