Commit 7c7f87b8 authored by Sebastien Robin's avatar Sebastien Robin

added method getParentTitleOrId


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2321 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 85cf47d5
......@@ -911,6 +911,12 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
raise DeferredCatalogError('Could neither access parent uid nor generate it', self)
return uid
security.declareProtected( Permissions.AccessContentsInformation, 'getParentTitleOrId' )
def getParentTitleOrId(self):
"""
Returns the title or the id of the parent
"""
return self.getParent().getTitleOrId()
security.declareProtected( Permissions.AccessContentsInformation, 'getParent' )
def getParent(self):
......
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