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

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Sep 18 13:26:44 CEST 2006


Author: jp
Date: Mon Sep 18 13:26:41 2006
New Revision: 10085

URL: http://svn.erp5.org?rev=10085&view=rev
Log:
Merged all generic methods into AccountingTransaction

Removed:
    erp5/trunk/products/ERP5/Document/Transaction.py
Modified:
    erp5/trunk/products/ERP5/Document/AccountingTransaction.py
    erp5/trunk/products/ERP5/Document/Invoice.py

Modified: erp5/trunk/products/ERP5/Document/AccountingTransaction.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/AccountingTransaction.py?rev=10085&r1=10084&r2=10085&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/AccountingTransaction.py (original)
+++ erp5/trunk/products/ERP5/Document/AccountingTransaction.py Mon Sep 18 13:26:41 2006
@@ -75,4 +75,14 @@
         raise BeforeDeleteException, \
               "%s can only be deleted in draft or cancelled states." % self.getPortalType()
       Delivery.manage_beforeDelete(self, item, container) 
-    
+
+    def manage_afterClone(self, item):
+      # Reset reference on paste
+      # XXX This implementation is quite bad because it is not generic
+      if self.getReference != None:
+        self.setReference(None)
+      AccountingTransaction.manage_afterClone(self, item)
+
+# Compatibility
+# It may be necessary to create an alias after removing the Transaction class
+# Products.ERP5Type.Document.Transaction = AccountingTransaction

Modified: erp5/trunk/products/ERP5/Document/Invoice.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Invoice.py?rev=10085&r1=10084&r2=10085&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Invoice.py (original)
+++ erp5/trunk/products/ERP5/Document/Invoice.py Mon Sep 18 13:26:41 2006
@@ -85,10 +85,4 @@
     def getTotalNetPrice(self):
       """ Returns the total net price for this invoice """
       raise NotImplemented
-      return self.Invoice_zGetTotalNetPrice()
-
-    def manage_afterClone(self, item):
-      # Reset reference on paste
-      if self.getReference != None:
-        self.setReference(None)
-      AccountingTransaction.manage_afterClone(self, item)
+      return self.Invoice_zGetTotalNetPrice()




More information about the Erp5-report mailing list