Commit 46fdd472 authored by Jérome Perrin's avatar Jérome Perrin

added getExplanationTitle & getExplanationReference methods.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12927 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 06bee4b8
...@@ -475,7 +475,29 @@ class Movement(XMLObject, Amount): ...@@ -475,7 +475,29 @@ class Movement(XMLObject, Amount):
Returns the object explanation of this movement. Returns the object explanation of this movement.
""" """
return self.getDeliveryValue() return self.getDeliveryValue()
security.declareProtected( Permissions.AccessContentsInformation,
'getExplanationTitle')
def getExplanationTitle(self, default=''):
"""
Returns the title of the explanation of this movement.
"""
explanation_value = self.getExplanationValue()
if explanation_value is not None:
return explanation_value.getTitle()
return default
security.declareProtected( Permissions.AccessContentsInformation,
'getExplanationReference')
def getExplanationReference(self, default=''):
"""
Returns the reference of the explanation of this movement.
"""
explanation_value = self.getExplanationValue()
if explanation_value is not None:
return explanation_value.getReference()
return default
security.declareProtected( Permissions.AccessContentsInformation, security.declareProtected( Permissions.AccessContentsInformation,
'getRootCausalityValueList') 'getRootCausalityValueList')
def getRootCausalityValueList(self): def getRootCausalityValueList(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