From 5f258939eaf8241c463396c1c1c5e78eb435d18f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Mon, 23 Feb 2009 15:29:14 +0000
Subject: [PATCH] use node_uid, section_uid, payment_uid, function_uid,
 project_uid, mirror_section_uid and mirror_node_uid instead of node, section,
 payment, function, project, mirror_section, mirror_node

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25668 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/CategoryBudgetVariation.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/Document/CategoryBudgetVariation.py b/product/ERP5/Document/CategoryBudgetVariation.py
index 72b45168c6..6584039e4a 100644
--- a/product/ERP5/Document/CategoryBudgetVariation.py
+++ b/product/ERP5/Document/CategoryBudgetVariation.py
@@ -85,10 +85,14 @@ class CategoryBudgetVariation(BudgetVariation):
         continue
       criterion_base_category, category_url = criterion_category.split('/', 1)
       if criterion_base_category == base_category:
+        category_uid = self.getPortalObject().portal_categories\
+                                .getCategoryUid(criterion_category)
         # Different possible inventory axis here
         if axis == 'movement':
-          return {'default_%s_uid' % base_category:
-                    self.getPortalObject().portal_categories.getCategoryUid(criterion_category)}
+          return {'default_%s_uid' % base_category: category_uid}
+        if axis in ('node', 'section', 'payment', 'function', 'project',
+                    'mirror_section', 'mirror_node' ):
+          return {'%s_uid' % axis: category_uid}
         return {axis: criterion_category}
     return dict()
 
-- 
2.30.9