[Erp5-report] r12081 - /erp5/trunk/products/ERP5Form/SelectionTool.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Sun Jan 14 11:34:24 CET 2007
Author: jp
Date: Sun Jan 14 11:34:21 2007
New Revision: 12081
URL: http://svn.erp5.org?rev=12081&view=rev
Log:
Make relation fields compatible with Web layouts. (Web Site, Web Section)
Modified:
erp5/trunk/products/ERP5Form/SelectionTool.py
Modified: erp5/trunk/products/ERP5Form/SelectionTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/SelectionTool.py?rev=12081&r1=12080&r2=12081&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/SelectionTool.py (original)
+++ erp5/trunk/products/ERP5Form/SelectionTool.py Sun Jan 14 11:34:21 2007
@@ -1148,6 +1148,11 @@
# Define new HTTP_REFERER
REQUEST.HTTP_REFERER = '%s/%s' % (o.absolute_url(),
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 getattr(o, dialog_id)(REQUEST=REQUEST)
More information about the Erp5-report
mailing list