search rules on all categories actually stored on the movement, so as to allow...

search rules on all categories actually stored on the movement, so as to allow rules that match on, for instance, trade_phase

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45102 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5a9f1cb0
...@@ -99,7 +99,13 @@ class RuleTool(BaseTool): ...@@ -99,7 +99,13 @@ class RuleTool(BaseTool):
domain_tool = getToolByName(self.getPortalObject(), "portal_domains") domain_tool = getToolByName(self.getPortalObject(), "portal_domains")
if tested_base_category_list is None: 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, rule_list = domain_tool.searchPredicateList(context=movement,
tested_base_category_list=tested_base_category_list, tested_base_category_list=tested_base_category_list,
......
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