[Erp5-report] r30410 - /erp5/trunk/products/ERP5/Document/

nobody at svn.erp5.org nobody at svn.erp5.org
Sun Nov 8 18:25:11 CET 2009


Author: jp
Date: Sun Nov  8 18:25:10 2009
New Revision: 30410

URL: http://svn.erp5.org?rev=30410&view=rev
Log:
Deliveries  can act as IDivergenceController

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

Modified: erp5/trunk/products/ERP5/Document/Delivery.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Delivery.py?rev=30410&r1=30409&r2=30410&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Delivery.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Delivery.py [utf8] Sun Nov  8 18:25:10 2009
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 ##############################################################################
 #
 # Copyright (c) 2002-2009 Nexedi SA and Contributors. All Rights Reserved.
@@ -27,10 +28,12 @@
 #
 ##############################################################################
 
+import zope.interface
+
 from Products.CMFCore.utils import getToolByName
 from Products.ERP5Type.Base import WorkflowMethod
 from AccessControl import ClassSecurityInfo
-from Products.ERP5Type import Permissions, PropertySheet
+from Products.ERP5Type import Permissions, PropertySheet, interfaces
 from Products.ERP5Type.XMLObject import XMLObject
 from Products.ERP5.Document.ImmobilisationDelivery import ImmobilisationDelivery
 from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
@@ -66,6 +69,9 @@
                       , PropertySheet.Reference
                       , PropertySheet.Price
                       )
+
+    # Declarative interfaces
+    zope.interface.implements(interfaces.IDivergenceController,)
 
     security.declareProtected(Permissions.AccessContentsInformation, 'isAccountable')
     def isAccountable(self):
@@ -865,6 +871,11 @@
     def getBuilderList(self):
       """Returns appropriate builder list."""
       return self._getTypeBasedMethod('getBuilderList')()
+      # XXX - quite a hack, since no way to know...
+      #       propper implementation should use business path definition
+      #       however, the real question is "is this really necessary"
+      #       since the main purpose of this method is superceded
+      #       by IDivergenceController
 
     def getRuleReference(self):
       """Returns an appropriate rule reference."""

Modified: erp5/trunk/products/ERP5/Document/DeliveryCell.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/DeliveryCell.py?rev=30410&r1=30409&r2=30410&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/DeliveryCell.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/DeliveryCell.py [utf8] Sun Nov  8 18:25:10 2009
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 ##############################################################################
 #
 # Copyright (c) 2002, 2004 Nexedi SARL and Contributors. All Rights Reserved.
@@ -26,6 +27,8 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #
 ##############################################################################
+
+import zope.interface
 
 from Products.ERP5Type.Globals import InitializeClass, PersistentMapping
 from AccessControl import ClassSecurityInfo
@@ -69,6 +72,8 @@
                       , PropertySheet.ItemAggregation
                       )
 
+    # Declarative interfaces
+    zope.interface.implements(interfaces.IDivergenceController,)
     
     # MatrixBox methods      
     security.declareProtected( Permissions.AccessContentsInformation,

Modified: erp5/trunk/products/ERP5/Document/DeliveryLine.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/DeliveryLine.py?rev=30410&r1=30409&r2=30410&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/DeliveryLine.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/DeliveryLine.py [utf8] Sun Nov  8 18:25:10 2009
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 ##############################################################################
 #
 # Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
@@ -68,7 +69,8 @@
                       , PropertySheet.SortIndex
                       )
 
-    #zope.interface.implements(interfaces.IDivergenceSolver,)
+    # Declarative interfaces
+    zope.interface.implements(interfaces.IDivergenceController,)
 
     # Multiple inheritance definition
     updateRelatedContent = XMLMatrix.updateRelatedContent




More information about the Erp5-report mailing list