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

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jul 19 14:19:17 CEST 2006


Author: jerome
Date: Wed Jul 19 14:19:16 2006
New Revision: 8585

URL: http://svn.erp5.org?rev=8585&view=rev
Log:
Setting URL Column to an empty string or None disable link generation.


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=8585&r1=8584&r2=8585&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ListBox.py (original)
+++ erp5/trunk/products/ERP5Form/ListBox.py Wed Jul 19 14:19:16 2006
@@ -1884,13 +1884,13 @@
       if url_column_dict.has_key(sql):
         url_method_id = url_column_dict.get(sql)
         if url_method_id != sql:
-          if url_method_id is not None:
+          if url_method_id not in (None, ''):
             url_method = getattr(brain, url_method_id, None)
             if url_method is None:
               LOG('ListBox', WARNING, 'could not find the url method %s' % (url_method_id,))
               no_link = True
           else:
-            # If the value is None, generate no link.
+            # If the URL Method is empty, generate no link.
             no_link = True
 
       if url_method is not None:




More information about the Erp5-report mailing list