[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
This commit is contained in:
Goffin Simon
2016-08-04 15:02:33 +02:00
parent 0db52fa2f1
commit 48fa0a5f6c
@@ -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: