[Erp5-report] r12892 - in /erp5/trunk/products/ERP5Form: PlanningBox.py SelectionTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Feb 19 16:39:01 CET 2007


Author: kazuhiko
Date: Mon Feb 19 16:38:52 2007
New Revision: 12892

URL: http://svn.erp5.org?rev=12892&view=rev
Log:
* revise some docstrings.
* use list comprehension instead of map().
* remove needress import of DomainSelection from PlanningBox.py.

Modified:
    erp5/trunk/products/ERP5Form/PlanningBox.py
    erp5/trunk/products/ERP5Form/SelectionTool.py

Modified: erp5/trunk/products/ERP5Form/PlanningBox.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/PlanningBox.py?rev=12892&r1=12891&r2=12892&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/PlanningBox.py (original)
+++ erp5/trunk/products/ERP5Form/PlanningBox.py Mon Feb 19 16:38:52 2007
@@ -54,7 +54,7 @@
 from Products.Formulator import Widget, Validator
 from Products.Formulator.Errors import FormValidationError, ValidationError
 from SelectionTool import makeTreeList,TreeListLine
-from Selection import Selection, DomainSelection
+from Selection import Selection
 import OFS
 from AccessControl import ClassSecurityInfo
 from zLOG import LOG

Modified: erp5/trunk/products/ERP5Form/SelectionTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/SelectionTool.py?rev=12892&r1=12891&r2=12892&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/SelectionTool.py (original)
+++ erp5/trunk/products/ERP5Form/SelectionTool.py Mon Feb 19 16:38:52 2007
@@ -251,7 +251,8 @@
 
     def updateSelectionCheckedUidList(self, selection_name, listbox_uid, uids, REQUEST=None):
       """
-        Updates the checked uids for a given selection_name
+        Updates the unchecked uids(listbox_uids) and checked uids (uids)
+        for a given selection_name
       """
       if listbox_uid is None:
         listbox_uid = []
@@ -425,7 +426,8 @@
     security.declareProtected(ERP5Permissions.View, 'getSelectionColumns')
     def getSelectionColumns(self, selection_name, columns=None, REQUEST=None):
       """
-        Returns the columns in the selection
+        Returns the columns in the selection if not empty, otherwise
+        returns the value of columns argument
       """
       if columns is None: columns = []
       selection = self.getSelectionFor(selection_name, REQUEST=REQUEST)
@@ -906,7 +908,7 @@
       """
         Get the list of values checked or selected for 'selection_name'
       """
-      return map(lambda x:x.getObject().getUid(), self.getSelectionValueList(selection_name, REQUEST=REQUEST, selection_method=selection_method, context=context))
+      return [x.getObject().getUid() for x in self.getSelectionValueList(selection_name, REQUEST=REQUEST, selection_method=selection_method, context=context)]
 
     security.declareProtected(ERP5Permissions.View, 'selectionHasChanged')
     def selectionHasChanged(self, md5_string, object_uid_list):




More information about the Erp5-report mailing list