[Erp5-report] r31762 jerome - /erp5/trunk/products/ERP5/Document/

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jan 14 18:41:36 CET 2010


Author: jerome
Date: Thu Jan 14 18:41:33 2010
New Revision: 31762

URL: http://svn.erp5.org?rev=31762&view=rev
Log:
Supply Line and Supply Cell are not movements, they are paths.
Also clean up a few imports in the process

Modified:
    erp5/trunk/products/ERP5/Document/SupplyCell.py
    erp5/trunk/products/ERP5/Document/SupplyLine.py

Modified: erp5/trunk/products/ERP5/Document/SupplyCell.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/SupplyCell.py?rev=31762&r1=31761&r2=31762&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/SupplyCell.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/SupplyCell.py [utf8] Thu Jan 14 18:41:33 2010
@@ -26,21 +26,13 @@
 #
 ##############################################################################
 
-from Products.ERP5Type.Globals import InitializeClass, PersistentMapping
 from AccessControl import ClassSecurityInfo
 
-from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces
+from Products.ERP5Type import Permissions, PropertySheet
+from Products.ERP5.Document.Path import Path
 
-from Products.ERP5.Document.DeliveryCell import DeliveryCell
-from Products.ERP5.Document.Path import Path
-from Products.ERP5.Document.Predicate import Predicate
-
-class SupplyCell(Predicate, DeliveryCell, Path):
-    """
-      A DeliveryCell allows to define specific quantities
-      for each variation of a resource in a delivery line.
-
-      (PATH)
+class SupplyCell(Path):
+    """A Supply Cell is used for different variations in a supply line.
     """
 
     meta_type = 'ERP5 Supply Cell'
@@ -67,3 +59,9 @@
                       , PropertySheet.Reference
                       )
 
+    security.declareProtected( Permissions.AccessContentsInformation,
+                               'hasCellContent' )
+    def hasCellContent(self, base_id='movement'):
+      """A cell cannot have cell content itself.
+      """
+      return 0

Modified: erp5/trunk/products/ERP5/Document/SupplyLine.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/SupplyLine.py?rev=31762&r1=31761&r2=31762&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/SupplyLine.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/SupplyLine.py [utf8] Thu Jan 14 18:41:33 2010
@@ -28,16 +28,14 @@
 ##############################################################################
 
 from AccessControl import ClassSecurityInfo
-from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces
+from Products.ERP5Type import Permissions, PropertySheet
 from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
 from Products.ERP5Type.XMLMatrix import XMLMatrix
-from Products.ERP5.Document.DeliveryLine import DeliveryLine
 from Products.ERP5.Document.Path import Path
 from Products.ERP5Type.Utils import convertToUpperCase
 
-from zLOG import LOG
-
-class SupplyLine(DeliveryLine, Path):
+
+class SupplyLine(Path, XMLMatrix):
     """A Supply Line is a path to define price 
     """
 
@@ -73,7 +71,6 @@
     security.declareProtected(Permissions.AccessContentsInformation,
                               'getPrice')
     def getPrice(self):
-      # If price not defined, look up price
       if getattr(self, 'price', None) is None:
         self.price = 0.0
       # Return the price




More information about the Erp5-report mailing list