[Erp5-report] r15791 - /erp5/trunk/products/ERP5/Document/AccountingTransactionLine.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Aug 22 19:03:46 CEST 2007


Author: jerome
Date: Wed Aug 22 19:03:46 2007
New Revision: 15791

URL: http://svn.erp5.org?rev=15791&view=rev
Log:
don't force destination to None on Balance Transaction Line

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

Modified: erp5/trunk/products/ERP5/Document/AccountingTransactionLine.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/AccountingTransactionLine.py?rev=15791&r1=15790&r2=15791&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/AccountingTransactionLine.py (original)
+++ erp5/trunk/products/ERP5/Document/AccountingTransactionLine.py Wed Aug 22 19:03:46 2007
@@ -80,9 +80,6 @@
         mirror_list = []
       if len(mirror_list) > 0 and destination not in mirror_list:
         self._setCategoryMembership('destination', mirror_list[0], base=0)
-    else:
-      # Force to set the destination to None.
-      self._setCategoryMembership('destination', None, base=0)
 
   security.declareProtected(Permissions.ModifyPortalContent, 'setSource')
   def setSource(self, value):
@@ -99,10 +96,10 @@
       Set the destination Account and implicitely the source Account
     using the source's mirror account.
     """
+    self._setCategoryMembership('destination', value, base=0)
     if self.getPortalType() not in \
             self.getPortalBalanceTransactionLineTypeList()\
             and value not in (None, ''):
-      self._setCategoryMembership('destination', value, base=0)
       destination = self.getPortalObject().\
                         portal_categories.resolveCategory(value)
       source = self.getSource()
@@ -112,9 +109,6 @@
         mirror_list = []
       if len(mirror_list) > 0 and source not in mirror_list:
         self._setCategoryMembership('source', mirror_list[0], base=0)
-    else:
-      # Force to set the destination to None.
-      self._setCategoryMembership('destination', None, base=0)
 
   security.declareProtected(Permissions.ModifyPortalContent, 'setDestination')
   def setDestination(self, value):




More information about the Erp5-report mailing list