[Erp5-report] r19834 - /erp5/trunk/products/ERP5/Document/DeliveryLine.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Mar 12 18:38:58 CET 2008


Author: alex
Date: Wed Mar 12 18:38:57 2008
New Revision: 19834

URL: http://svn.erp5.org?rev=19834&view=rev
Log:
An order line or delivery line that contains movements should not be
considered as a movement itself.

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

Modified: erp5/trunk/products/ERP5/Document/DeliveryLine.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/DeliveryLine.py?rev=19834&r1=19833&r2=19834&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/DeliveryLine.py (original)
+++ erp5/trunk/products/ERP5/Document/DeliveryLine.py Wed Mar 12 18:38:57 2008
@@ -181,6 +181,15 @@
       # If we modify the cell range, we need to move the quantity to a new
       # cell, which define the same variated resource.
 #       return XMLMatrix.hasCellContent(self, base_id=base_id)
+
+    security.declareProtected( Permissions.AccessContentsInformation,
+        'isMovement' )
+    def isMovement(self):
+      """
+      returns true is the object contains no submovement (line or cell)
+      """
+      portal_type = self.getPortalMovementTypeList()
+      return len(self.contentValues(filter={'portal_type': portal_type})) == 0
 
     security.declareProtected( Permissions.AccessContentsInformation, 'getCellValueList' )
     def getCellValueList(self, base_id='movement'):




More information about the Erp5-report mailing list