[Erp5-report] r12927 - /erp5/trunk/products/ERP5/Document/Movement.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Feb 21 10:19:35 CET 2007


Author: jerome
Date: Wed Feb 21 10:19:33 2007
New Revision: 12927

URL: http://svn.erp5.org?rev=12927&view=rev
Log:
added getExplanationTitle & getExplanationReference methods.


Modified:
    erp5/trunk/products/ERP5/Document/Movement.py

Modified: erp5/trunk/products/ERP5/Document/Movement.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Movement.py?rev=12927&r1=12926&r2=12927&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Movement.py (original)
+++ erp5/trunk/products/ERP5/Document/Movement.py Wed Feb 21 10:19:33 2007
@@ -475,7 +475,29 @@
       Returns the object explanation of this movement.
     """
     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,
                              'getRootCausalityValueList')
   def getRootCausalityValueList(self):




More information about the Erp5-report mailing list