From 48fa0a5f6c97f84222a4854049c4e596aad8ce41 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 4 Aug 2016 10:47:35 +0200 Subject: [PATCH] [FIX] account: get_bar_graph_datas The function range(0, 6) only returns [0, 1, 2, 3, 4, 5], then the condition if i == 6 was never reached. opw:685021 --- 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 a4b29bedcfc..3c81cb603e3 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -114,7 +114,7 @@ class account_journal(models.Model): select_sql_clause = """SELECT sum(residual_company_signed) as total, min(date) as aggr_date from account_invoice where journal_id = %(journal_id)s and state = 'open'""" query = '' start_date = (first_day_of_week + timedelta(days=-7)) - for i in range(0,6): + for i in range(0, 7): if i == 0: query += "("+select_sql_clause+" and date < '"+start_date.strftime(DF)+"')" elif i == 6: