From 545ef195f26e96fe879eb3fddc0302407329e547 Mon Sep 17 00:00:00 2001 From: "Ali Alfie (alal)" Date: Tue, 2 May 2023 11:18:07 +0000 Subject: [PATCH] [FIX] account dashboard graph data closes odoo/odoo#124457 Before: in the accounting journal dashboard, for bank and cash graph data the date comparison was done with a date object and a formatted date object resulting in them never being equal and duplicating data. Now: both dates are formatted in the same way X-original-commit: 0e2594c88dadb91acb1470dbc55b8ab37f6166c1 Signed-off-by: Quentin De Paoli --- 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 8b19078b37f..f8057d064e3 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -194,7 +194,7 @@ class account_journal(models.Model): #(graph is drawn backward) for val in journal_result: date = val['date'] - if date != today.strftime(DF): # make sure the last point in the graph is today + if date.strftime(DF) != today.strftime(DF): # make sure the last point in the graph is today data[:0] = [build_graph_data(date, amount, currency)] amount -= val['amount']