Commit 0e2946a3 authored by Jérome Perrin's avatar Jérome Perrin

call Select Method on the budget line


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25072 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c6ec6c3d
...@@ -61,12 +61,12 @@ class NodeBudgetVariation(BudgetVariation): ...@@ -61,12 +61,12 @@ class NodeBudgetVariation(BudgetVariation):
"""This budget variation in a predicate """This budget variation in a predicate
""" """
def _getNodeList(self): def _getNodeList(self, context):
"""Returns the list of possible nodes """Returns the list of possible nodes
""" """
node_select_method_id = self.getProperty('node_select_method_id') node_select_method_id = self.getProperty('node_select_method_id')
if 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 () return ()
def _getNodeTitle(self, node): def _getNodeTitle(self, node):
...@@ -85,7 +85,7 @@ class NodeBudgetVariation(BudgetVariation): ...@@ -85,7 +85,7 @@ class NodeBudgetVariation(BudgetVariation):
node_item_list = [('%s%s' % (prefix, node.getRelativeUrl()), node_item_list = [('%s%s' % (prefix, node.getRelativeUrl()),
self._getNodeTitle(node)) self._getNodeTitle(node))
for node in self._getNodeList()] for node in self._getNodeList(budget_line)]
variation_category_list = budget_line.getVariationCategoryList() variation_category_list = budget_line.getVariationCategoryList()
if matrixbox: if matrixbox:
return [[i for i in node_item_list if i[0] in variation_category_list]] return [[i for i in node_item_list if i[0] in variation_category_list]]
...@@ -115,7 +115,7 @@ class NodeBudgetVariation(BudgetVariation): ...@@ -115,7 +115,7 @@ class NodeBudgetVariation(BudgetVariation):
if base_category: if base_category:
prefix = '%s/' % base_category prefix = '%s/' % base_category
return [(self._getNodeTitle(node), '%s%s' % (prefix, node.getRelativeUrl())) 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): def initializeBudgetLine(self, budget_line):
"""Initialize a budget line """Initialize a budget line
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment