Skip to content

Commit

Permalink
[FIX] account: journal dashboard graph wrong value
Browse files Browse the repository at this point in the history
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#29936
  • Loading branch information
william-andre committed Jan 17, 2019
1 parent ba39efd commit 50bae1c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addons/account/models/account_journal_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def get_line_graph_datas(self):
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()
Expand Down

0 comments on commit 50bae1c

Please sign in to comment.