[FIX] account, aged partner balance: the period length was actually computing on (period_length+1)
This commit is contained in:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user