From 50bae1c0c591b043ae995cafff905bffdc6f56f1 Mon Sep 17 00:00:00 2001 From: wan Date: Fri, 4 Jan 2019 12:31:13 +0000 Subject: [PATCH] [FIX] account: journal dashboard graph wrong value OPW 1918926 Current behavior: The sql query groups by date,id in a intermediary table instead of the result. This allows to get data in the wrong order if the statements were not produced sequentially. The fill values are computed in the wrong order and may override correct values. Desired behavior: There is no override of the values correctly computed. closes odoo/odoo#29936 --- addons/account/models/account_journal_dashboard.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account/models/account_journal_dashboard.py b/addons/account/models/account_journal_dashboard.py index bae1dee416c..31a85def5fd 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -46,9 +46,9 @@ class account_journal(models.Model): WHERE c.journal_id = %s AND c.date > %s AND c.date <= %s - GROUP BY date, id - ORDER BY date, id) AS b - WHERE a.id = b.stmt_id;""" + GROUP BY date) AS b + WHERE a.id = b.stmt_id + ORDER BY date;""" self.env.cr.execute(query, (self.id, last_month, today)) bank_stmt = self.env.cr.dictfetchall()