[FIX] account: aged partner report

The aged reports were wrongly taking the previous day of the requested date to compute the different report periods.
E.g: An aged balance requested for the 31-12-2018 was excluding entries made on the that exact date and was starting from the 30-12-2018

closes odoo/odoo#30195
This commit is contained in:
qdp-odoo
2019-01-14 14:33:52 +00:00
parent 500b0191ab
commit 98313838da
@@ -28,7 +28,7 @@ class ReportAgedPartnerBalance(models.AbstractModel):
ctx = self._context
periods = {}
date_from = fields.Date.from_string(date_from)
start = date_from - relativedelta(days=1)
start = date_from
for i in range(5)[::-1]:
stop = start - relativedelta(days=period_length)
period_name = str((5-(i+1)) * period_length + 1) + '-' + str((5-i) * period_length)