[Erp5-report] r33311 kazuhiko - /erp5/trunk/products/ERP5/Document/TradeModelLine.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Mar 3 10:11:03 CET 2010


Author: kazuhiko
Date: Wed Mar  3 10:11:02 2010
New Revision: 33311

URL: http://svn.erp5.org?rev=33311&view=rev
Log:
support the case where both base_application and base_contribution are empty, that happens for using Trade Model Line as a base class of Payment Condition.

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

Modified: erp5/trunk/products/ERP5/Document/TradeModelLine.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TradeModelLine.py?rev=33311&r1=33310&r2=33311&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TradeModelLine.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TradeModelLine.py [utf8] Wed Mar  3 10:11:02 2010
@@ -308,8 +308,10 @@
           # movements (current_aggregated_amount_list).
           # if the quantity is not defined, take it by searching all movements
           # that used this base_amount
-          if set(base_application_list)\
-              .intersection(set(movement.getBaseContributionList())) and \
+          if (len(base_application_list) == 0 or \
+              len(movement.getBaseContributionList()) == 0 or \
+              set(base_application_list).intersection( \
+              set(movement.getBaseContributionList()))) and \
               (len(movement.getVariationCategoryList()) == 0 or \
                len(tmp_movement.getVariationCategoryList()) == 0 or \
               set(movement.getVariationCategoryList()).intersection( \




More information about the Erp5-report mailing list