[FIX] account: add fallback value

there was a traceback, when value of amount_total is None

closes odoo/odoo#30797
This commit is contained in:
Sanjay Jamod
2019-02-04 09:47:47 +00:00
parent 4687faefbf
commit 2b844a7f6c
@@ -257,7 +257,7 @@ class account_journal(models.Model):
rslt_count += 1
date = result.get('date_invoice') or fields.Date.today()
amount = result.get('amount_total', 0)
amount = result.get('amount_total', 0) or 0
if cur != target_currency:
key = (cur, target_currency, company, date)
# Using setdefault will call _get_conversion_rate, so we explicitly check the