[Erp5-report] r32323 jerome - /erp5/trunk/products/ERP5/Document/BalanceTransaction.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Feb 8 16:57:20 CET 2010


Author: jerome
Date: Mon Feb  8 16:57:17 2010
New Revision: 32323

URL: http://svn.erp5.org?rev=32323&view=rev
Log:
don't fail if section has no accounting currency

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

Modified: erp5/trunk/products/ERP5/Document/BalanceTransaction.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BalanceTransaction.py?rev=32323&r1=32322&r2=32323&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BalanceTransaction.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BalanceTransaction.py [utf8] Mon Feb  8 16:57:17 2010
@@ -149,8 +149,10 @@
     section_uid = self.getDestinationSectionUid()
     precision = 2
     if section_uid is not None:
-      precision =  self.getDestinationSectionValue()\
-                        .getPriceCurrencyValue().getQuantityPrecision()
+      accounting_currency = \
+          self.getDestinationSectionValue().getPriceCurrencyValue()
+      if accounting_currency is not None:
+        precision = accounting_currency.getQuantityPrecision()
     default_inventory_params = dict(
                         to_date=self.getStartDate().earliestTime(),
                         section_uid=section_uid,




More information about the Erp5-report mailing list