[Erp5-report] r13681 - /erp5/trunk/products/ERP5/Document/Document.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Mar 26 21:10:36 CEST 2007


Author: jp
Date: Mon Mar 26 21:10:36 2007
New Revision: 13681

URL: http://svn.erp5.org?rev=13681&view=rev
Log:
Fixed bug for method properties in getSearchableText.

Modified:
    erp5/trunk/products/ERP5/Document/Document.py

Modified: erp5/trunk/products/ERP5/Document/Document.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Document.py?rev=13681&r1=13680&r2=13681&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Document.py (original)
+++ erp5/trunk/products/ERP5/Document/Document.py Mon Mar 26 21:10:36 2007
@@ -455,6 +455,13 @@
       """
         we try to get a list, else we get value and convert to list
       """
+      method = getattr(self, property, None)
+      if method is not None:
+        if callable(method):
+          val = method()
+          if isinstance(val, list) or isinstance(val, tuple):
+            return list(val)
+          return [str(val)]
       val = self.getPropertyList(property)
       if val is None:
         val = self.getProperty(property)




More information about the Erp5-report mailing list