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

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jul 20 12:13:14 CEST 2010


Author: yusei
Date: Tue Jul 20 12:13:12 2010
New Revision: 37200

URL: http://svn.erp5.org?rev=37200&view=rev
Log:
Use portal_categories.getCategoryValue instead.

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=37200&r1=37199&r2=37200&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/NodeBudgetVariation.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/NodeBudgetVariation.py [utf8] Tue Jul 20 12:13:12 2010
@@ -132,6 +132,8 @@ class NodeBudgetVariation(BudgetVariatio
     if not base_category:
       return dict()
     budget_line = budget_cell.getParentValue()
+    portal = self.getPortalObject()
+    portal_categories = portal.portal_categories
     for criterion_category in budget_cell.getMembershipCriterionCategoryList():
       if '/' not in criterion_category: # safe ...
         continue
@@ -149,7 +151,7 @@ class NodeBudgetVariation(BudgetVariatio
               other_uid_list.append(node.getUid())
           return {axis: NegatedQuery(Query(**{axis: other_uid_list}))}
         return {axis:
-                  self.getPortalObject().unrestrictedTraverse(node_url).getUid()}
+                portal_categories.getCategoryValue(node_url, base_category=criterion_base_category).getUid()}
 
     return dict()
 




More information about the Erp5-report mailing list