Commit 7c4cebef authored by Aurel's avatar Aurel

getPriceCurrency does not always exists

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41994 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7937b94f
No related merge requests found
......@@ -138,7 +138,10 @@ class InvoiceTransactionRuleMovementGenerator(MovementGeneratorMixin):
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(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment