[Erp5-report] r9957 - /erp5/trunk/products/ERP5Form/ListBox.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Sep 15 10:24:44 CEST 2006


Author: vincent
Date: Fri Sep 15 10:24:41 2006
New Revision: 9957

URL: http://svn.erp5.org?rev=9957&view=rev
Log:
When 'here' is not set in the request, fallback on aq_parent of containing form. This allows to write clean code to render the listbox - ie without requiring toi edit the request.

Modified:
    erp5/trunk/products/ERP5Form/ListBox.py

Modified: erp5/trunk/products/ERP5Form/ListBox.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/ListBox.py?rev=9957&r1=9956&r2=9957&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ListBox.py (original)
+++ erp5/trunk/products/ERP5Form/ListBox.py Fri Sep 15 10:24:41 2006
@@ -460,7 +460,8 @@
   def getContext(self):
     """Return the context of rendering this ListBox.
     """
-    return self.request['here']
+    here = self.request.get('here')
+    return here is not None and here or self.getForm().aq_parent
 
   getContext = VolatileCachingMethod(getContext)
 




More information about the Erp5-report mailing list