diff --git a/product/ERP5/Tool/RuleTool.py b/product/ERP5/Tool/RuleTool.py index 33c075b5a7282c2b9bd5063c993acb8ad0fd12b8..52cf4d27b3e29d21e7c2d169f1c0232249ed2b5d 100644 --- a/product/ERP5/Tool/RuleTool.py +++ b/product/ERP5/Tool/RuleTool.py @@ -99,7 +99,13 @@ class RuleTool(BaseTool): domain_tool = getToolByName(self.getPortalObject(), "portal_domains") if tested_base_category_list is None: - tested_base_category_list = [] + # get all base categories currently stored in the movement + # + # XXX isn't there a method for this already? + # movement.getBaseCategoryList() returns ALL possible + # categories, not only those that are set on the object + tested_base_category_list = [category.split('/', 1)[0] + for category in movement.categories] rule_list = domain_tool.searchPredicateList(context=movement, tested_base_category_list=tested_base_category_list,