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

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Jan 12 11:28:40 CET 2009


Author: jerome
Date: Mon Jan 12 11:28:37 2009
New Revision: 25072

URL: http://svn.erp5.org?rev=25072&view=rev
Log:
call Select Method on the budget line

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

Modified: erp5/trunk/products/ERP5/Document/NodeBudgetVariation.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/NodeBudgetVariation.py?rev=25072&r1=25071&r2=25072&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/NodeBudgetVariation.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/NodeBudgetVariation.py [utf8] Mon Jan 12 11:28:37 2009
@@ -61,12 +61,12 @@
     """This budget variation in a predicate
     """
 
-  def _getNodeList(self):
+  def _getNodeList(self, context):
     """Returns the list of possible nodes
     """
     node_select_method_id = self.getProperty('node_select_method_id')
     if node_select_method_id:
-      return guarded_getattr(self, node_select_method_id)()
+      return guarded_getattr(context, node_select_method_id)()
     return ()
 
   def _getNodeTitle(self, node):
@@ -85,7 +85,7 @@
 
     node_item_list = [('%s%s' % (prefix, node.getRelativeUrl()),
                        self._getNodeTitle(node))
-                           for node in self._getNodeList()]
+                           for node in self._getNodeList(budget_line)]
     variation_category_list = budget_line.getVariationCategoryList()
     if matrixbox:
       return [[i for i in node_item_list if i[0] in variation_category_list]]
@@ -115,7 +115,7 @@
     if base_category:
       prefix = '%s/' % base_category
     return [(self._getNodeTitle(node), '%s%s' % (prefix, node.getRelativeUrl()))
-                for node in self._getNodeList()]
+                for node in self._getNodeList(budget_line)]
 
   def initializeBudgetLine(self, budget_line):
     """Initialize a budget line




More information about the Erp5-report mailing list