From e0461c6b7a1a2e4b2a2c40410a22dc90341ab5d6 Mon Sep 17 00:00:00 2001
From: Romain Courteaud <romain@nexedi.com>
Date: Wed, 19 Jan 2005 13:37:15 +0000
Subject: [PATCH] Add getVariationCategoryTitleOrIdItemList.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2240 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Variated.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/product/ERP5/Variated.py b/product/ERP5/Variated.py
index fe76ab9790..2cc836c76c 100755
--- a/product/ERP5/Variated.py
+++ b/product/ERP5/Variated.py
@@ -89,6 +89,13 @@ class Variated(Base):
         label = variation_category[index:]
       variation_category_item_list.append((label, label))  # We do not know if value is on left or right
     return variation_category_item_list
+  
+  def getVariationCategoryTitleOrIdItemList(self, base_category_list=(), base=1, **kw):
+    """
+    Returns a list of tuples by parsing recursively all categories in a
+    given list of base categories. Uses getTitleOrId as method
+    """
+    return self.getVariationCategoryItemList(display_id='title_or_id', base_category_list=base_category_list, base=base, **kw)
 
   security.declareProtected(Permissions.ModifyPortalContent, '_setVariationCategoryList')
   def _setVariationCategoryList(self, node_list, base_category_list = ()):
-- 
2.30.9