fix: exception if no bookings in cashbook used for evaluation
This commit is contained in:
parent
d3407fd1c7
commit
3c964a7d51
1 changed files with 2 additions and 0 deletions
2
line.py
2
line.py
|
@ -154,6 +154,8 @@ class EvaluationLine(ModelSQL, ModelView):
|
||||||
Currency = Pool().get('currency.currency')
|
Currency = Pool().get('currency.currency')
|
||||||
|
|
||||||
exp = Decimal(Decimal(1) / 10 ** self.currency_digits)
|
exp = Decimal(Decimal(1) / 10 ** self.currency_digits)
|
||||||
|
if amount is None:
|
||||||
|
return Decimal('0.0')
|
||||||
return Currency.compute(
|
return Currency.compute(
|
||||||
from_currency,
|
from_currency,
|
||||||
amount,
|
amount,
|
||||||
|
|
Loading…
Reference in a new issue