Commit 7de37f84 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Add getRedirectParameterDictAfterAdd to customize the behavior of some portal...

Add getRedirectParameterDictAfterAdd to customize the behavior of some portal types after being added.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35713 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2d7d9371
......@@ -3041,6 +3041,20 @@ class Base( CopyContainer,
# LOG('Base.setBinaryData',0,'data for : %s' % str(self))
# self.data = data
security.declareProtected(Permissions.AccessContentsInformation,
'getRedirectParameterDictAfterAdd')
def getRedirectParameterDictAfterAdd(self, container, **kw):
"""Return a dict of parameters to specify where the user is redirected
to after a new object is added in the UI."""
method = self._getTypeBasedMethod('getRedirectParameterDictAfterAdd',
'Base_getRedirectParameterDictAfterAdd')
if method is not None:
return method(container, **kw)
# XXX this should not happen, unless the Business Template is broken.
return dict(redirect_url=context.absolute_url() + '/view',
selection_index=None, selection_name=None)
# Hash method
def __hash__(self):
return hash(self.getUid())
......
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