fix: exception if no bookings in cashbook used for evaluation
This commit is contained in:
parent
07b339914d
commit
0191db91c3
1 changed files with 2 additions and 0 deletions
2
line.py
2
line.py
|
@ -150,6 +150,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