[Erp5-report] r41994 aurel - /erp5/trunk/products/ERP5/Document/

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jan 4 15:07:55 CET 2011


Author: aurel
Date: Tue Jan  4 15:07:55 2011
New Revision: 41994

URL: http://svn.erp5.org?rev=41994&view=rev
Log:
getPriceCurrency does not always exists

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

Modified: erp5/trunk/products/ERP5/Document/InvoiceTransactionSimulationRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/InvoiceTransactionSimulationRule.py?rev=41994&r1=41993&r2=41994&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/InvoiceTransactionSimulationRule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/InvoiceTransactionSimulationRule.py [utf8] Tue Jan  4 15:07:55 2011
@@ -138,7 +138,10 @@ class InvoiceTransactionRuleMovementGene
       for arrow in 'destination', 'source':
         section = input_movement.getDefaultAcquiredValue(arrow + '_section')
         if section is not None:
-          currency_url = section.getPriceCurrency()
+          try:
+            currency_url = section.getPriceCurrency()
+          except AttributeError:
+            currency_url = None
           if currency_url not in (None, resource):
             currency = portal.unrestrictedTraverse(currency_url)
             exchange_ratio = currency.getPrice(



More information about the Erp5-report mailing list