Commit 182ee43f authored by Christophe Dumez's avatar Christophe Dumez

- Improved function getPropertiesAndCategories() to get categories from portal...

- 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
parent 7b5c1e9d
......@@ -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([])):
......
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