Commit bd3db5cc authored by Sebastien Robin's avatar Sebastien Robin

do not look only at local categories, we must also look at acquired categories


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3117 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3538d362
...@@ -248,13 +248,14 @@ class PredicateGroup(Folder, Predicate): ...@@ -248,13 +248,14 @@ class PredicateGroup(Folder, Predicate):
category_tool = getToolByName(self,'portal_categories') category_tool = getToolByName(self,'portal_categories')
membership_criterion_category_list = list(self.getMembershipCriterionCategoryList()) membership_criterion_category_list = list(self.getMembershipCriterionCategoryList())
multimembership_criterion_base_category_list = list(self.getMultimembershipCriterionBaseCategoryList()) multimembership_criterion_base_category_list = list(self.getMultimembershipCriterionBaseCategoryList())
# Look at local categories and make it criterion membership # Look at local and acquired categories and make it criterion membership
for category in self.getCategoryList(): for base_category in self.getPortalCriterionBaseCategoryList():
base_category = category_tool.getBaseCategoryId(category) category_list = self.getProperty(base_category + '_list')
if base_category not in multimembership_criterion_base_category_list: if category_list is not None and len(category_list)>0:
if base_category in self.getPortalCriterionBaseCategoryList(): for category in category_list:
membership_criterion_category_list.append(base_category + '/' + category)
if base_category not in multimembership_criterion_base_category_list:
multimembership_criterion_base_category_list.append(base_category) multimembership_criterion_base_category_list.append(base_category)
membership_criterion_category_list.append(category)
criterion_property_list = list(self.getCriterionPropertyList()) criterion_property_list = list(self.getCriterionPropertyList())
identity_criterion = getattr(self,'_identity_criterion',{}) identity_criterion = getattr(self,'_identity_criterion',{})
range_criterion = getattr(self,'_range_criterion',{}) range_criterion = getattr(self,'_range_criterion',{})
......
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