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

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jul 8 16:35:35 CEST 2009


Author: fabien
Date: Wed Jul  8 16:35:32 2009
New Revision: 28029

URL: http://svn.erp5.org?rev=28029&view=rev
Log:
the calculation script part was not at the good place, sorry

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=28029&r1=28028&r2=28029&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TradeModelLine.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TradeModelLine.py [utf8] Wed Jul  8 16:35:32 2009
@@ -266,19 +266,19 @@
             modified = 1
             tmp_movement.setQuantity(quantity + movement.getTotalPrice())
 
+      else:
+        # if the quantity is defined, use it
+        modified = 1
+        if tmp_movement.getPrice() is None:
+          # if price is not defined, it the same as 100 %
+          tmp_movement.setPrice(1)
+
       # if a calculation script is defined, use it
       calculation_script = self.getCalculationScript(context)
       if calculation_script is not None:
         tmp_movement = calculation_script(\
             current_aggregated_amount_list=movement_list,
             current_movement=tmp_movement)
-
-      else:
-        # if the quantity is defined, use it
-        modified = 1
-        if tmp_movement.getPrice() is None:
-          # if price is not defined, it the same as 100 %
-          tmp_movement.setPrice(1)
 
       # check if slices are used
       salary_range_list = tmp_movement.getVariationCategoryList(\




More information about the Erp5-report mailing list