diff --git a/product/ERP5/Document/BusinessPath.py b/product/ERP5/Document/BusinessPath.py index 43b8f6cc0d67b1761a9a86d8d13b1c0792febcea..f664c093560880b0fb1761ed277ae5110bf5dd01 100644 --- a/product/ERP5/Document/BusinessPath.py +++ b/product/ERP5/Document/BusinessPath.py @@ -144,7 +144,18 @@ class BusinessPath(Path): XXX - implementation missing TBD - look at CategoryTool._buildFilter for inspiration """ - return category_list + filtered_category_list = [] + for cat in category_list: + # basic filtering, dirty way: + # - remove categories, which are not defined in category parameter + # - support base parameter + base_cat, base_value = cat.split('/')[0] , '/'.join(cat.split('/')[1:]) + if base_cat == category: + value = base_value + if base == 1: + value = '/'.join([base_cat, value]) + filtered_category_list.append(value) + return filtered_category_list # Dynamic context based categories def _getDynamicCategoryList(self, context):