[FIX] account, aged partner balance: the period length was actually computing on (period_length+1)

This commit is contained in:
qdp-odoo
2016-02-19 17:14:54 +01:00
parent d88723ae9c
commit 3137ea1302
@@ -30,7 +30,7 @@ class AccountAgedTrialBalance(models.TransientModel):
start = datetime.strptime(data['form']['date_from'], "%Y-%m-%d")
for i in range(5)[::-1]:
stop = start - relativedelta(days=period_length)
stop = start - relativedelta(days=period_length - 1)
res[str(i)] = {
'name': (i!=0 and (str((5-(i+1)) * period_length) + '-' + str((5-i) * period_length)) or ('+'+str(4 * period_length))),
'stop': start.strftime('%Y-%m-%d'),