Commit b00efcde authored by Jean-Paul Smets's avatar Jean-Paul Smets

related based on selection_domain


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1374 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent db4d3dd8
......@@ -1181,12 +1181,13 @@ class CategoryTool( UniqueObject, Folder, Base ):
This returns a catalog_search resource with can then be used by getCategoryMemberItemList
"""
cat_sql = context.asSqlExpression()
from Products.ERP5Form.Selection import DomainSelection
if base_category is None: base_category = 'related'
if spec is ():
catalog_search = self.portal_catalog(where_expression = cat_sql)
catalog_search = self.portal_catalog(selection_domain = DomainSelection(domain_dict = {base_category:context}))
else:
catalog_search = self.portal_catalog(portal_type = portal_type, where_expression = cat_sql)
catalog_search = self.portal_catalog(portal_type = portal_type,
selection_domain = DomainSelection(domain_dict = {base_category:context}))
return catalog_search
......
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