[Erp5-report] r16158 - /erp5/trunk/products/ERP5/Document/InvoiceTransactionRule.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Sep 7 14:37:19 CEST 2007


Author: yo
Date: Fri Sep  7 14:37:18 2007
New Revision: 16158

URL: http://svn.erp5.org?rev=16158&view=rev
Log:
Specify 0.0 to getPrice, because it can return None and just crash.

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

Modified: erp5/trunk/products/ERP5/Document/InvoiceTransactionRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/InvoiceTransactionRule.py?rev=16158&r1=16157&r2=16158&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/InvoiceTransactionRule.py (original)
+++ erp5/trunk/products/ERP5/Document/InvoiceTransactionRule.py Fri Sep  7 14:37:18 2007
@@ -154,7 +154,7 @@
 #               'price_currency': transaction_line.getPriceCurrency(),
             # calculate (quantity * price) * cell_quantity
             'quantity': (context_movement.getCorrectedQuantity() *
-              context_movement.getPrice()) * transaction_line.getQuantity(),
+              context_movement.getPrice(0.0)) * transaction_line.getQuantity(),
 #               'quantity_unit': transaction_line.getQuantityUnit(),
             'force_update': 1,
             }




More information about the Erp5-report mailing list