From 2b844a7f6ca91ba2865453ae159beed4a9a5d56e Mon Sep 17 00:00:00 2001 From: Sanjay Jamod Date: Mon, 4 Feb 2019 09:47:47 +0000 Subject: [PATCH] [FIX] account: add fallback value there was a traceback, when value of amount_total is None closes odoo/odoo#30797 --- addons/account/models/account_journal_dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_journal_dashboard.py b/addons/account/models/account_journal_dashboard.py index ee8087a33b0..975659cc377 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -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