Commit 532a963a authored by Jérome Perrin's avatar Jérome Perrin

don't fail if section has no accounting currency


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32323 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 09d8b399
......@@ -149,8 +149,10 @@ class BalanceTransaction(AccountingTransaction, Inventory):
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,
......
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