From 182ee43f1905ab27d013ed7eb573d1c526bf243f Mon Sep 17 00:00:00 2001
From: Christophe Dumez <christophe@nexedi.com>
Date: Wed, 9 Aug 2006 08:38:10 +0000
Subject: [PATCH] - Improved function getPropertiesAndCategories() to get
 categories from portal type as well as property sheet

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9096 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/ERP5Type.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/product/ERP5Type/ERP5Type.py b/product/ERP5Type/ERP5Type.py
index c581e00bf6..57a25d3736 100644
--- a/product/ERP5Type/ERP5Type.py
+++ b/product/ERP5Type/ERP5Type.py
@@ -263,13 +263,14 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase, Translation
       # from the list of property sheet defined on the portal type
       ps_list = map(lambda p: getattr(PropertySheet, p, None),
                   ptype_object.property_sheet_list)
+      cat_list = ptype_object.base_category_list
       ps_list = filter(lambda p: p is not None, ps_list)
       # from the property sheets defined on the class
       if klass is not None:
         from Products.ERP5Type.Base import getClassPropertyList
         ps_list = tuple(ps_list) + getClassPropertyList(klass)
       # get all properties from the property sheet list
-      current_list = []
+      current_list = cat_list
       for base in ps_list:
 	ps_property = getattr(base, '_properties', None)
         if type(ps_property) in (type(()), type([])):
-- 
2.30.9