Commit 1ce1af7a authored by Romain Courteaud's avatar Romain Courteaud

erp5_core: support "parent" relation in jump

parent 1bc2768d
...@@ -23,7 +23,7 @@ if related: ...@@ -23,7 +23,7 @@ if related:
# get[Category]RelatedList returning a lazy list directly. # get[Category]RelatedList returning a lazy list directly.
if len(portal_type) == 1: if len(portal_type) == 1:
catalog_list = portal.portal_catalog(portal_type=portal_type, limit=2, catalog_list = portal.portal_catalog(portal_type=portal_type, limit=2,
**{'default_%s_uid' % base_category: relation.getUid()}) **{'%s__uid' % base_category: relation.getUid()})
if len(catalog_list) == 2: if len(catalog_list) == 2:
related_list = catalog_list related_list = catalog_list
module_id = portal.getDefaultModuleId(portal_type[0], None) module_id = portal.getDefaultModuleId(portal_type[0], None)
...@@ -37,7 +37,7 @@ if related: ...@@ -37,7 +37,7 @@ if related:
mapping={"that_portal_type": context.getTranslatedPortalType(), mapping={"that_portal_type": context.getTranslatedPortalType(),
"that_title": context.getTitleOrId() }),) "that_title": context.getTitleOrId() }),)
return module.Base_redirect( return module.Base_redirect(
'view', keep_items={'default_%s_uid' % base_category: relation.getUid(), 'view', keep_items={'%s__uid' % base_category: relation.getUid(),
'ignore_hide_rows': 1, 'ignore_hide_rows': 1,
'reset': 1, 'reset': 1,
'portal_status_message': message}) 'portal_status_message': message})
......
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