[IMP] account: Correct term/amount information in aged receivable/payable.
Was PR #14820 Was task: 28716
This commit is contained in:
committed by
qdp-odoo
parent
1f5d65e74a
commit
e095733a3a
@@ -19,7 +19,7 @@ class ReportAgedPartnerBalance(models.AbstractModel):
|
||||
# The context key allow it to appear
|
||||
ctx = self._context
|
||||
periods = {}
|
||||
start = datetime.strptime(date_from, "%Y-%m-%d")
|
||||
start = datetime.strptime(date_from, "%Y-%m-%d") - relativedelta(days=1)
|
||||
for i in range(5)[::-1]:
|
||||
stop = start - relativedelta(days=period_length)
|
||||
periods[str(i)] = {
|
||||
@@ -86,7 +86,7 @@ class ReportAgedPartnerBalance(models.AbstractModel):
|
||||
WHERE (l.account_id = account_account.id) AND (l.move_id = am.id)
|
||||
AND (am.state IN %s)
|
||||
AND (account_account.internal_type IN %s)
|
||||
AND (COALESCE(l.date_maturity,l.date) > %s)\
|
||||
AND (COALESCE(l.date_maturity,l.date) >= %s)\
|
||||
AND ((l.partner_id IN %s) OR (l.partner_id IS NULL))
|
||||
AND (l.date <= %s)
|
||||
AND l.company_id IN %s'''
|
||||
|
||||
@@ -32,7 +32,7 @@ class AccountAgedTrialBalance(models.TransientModel):
|
||||
for i in range(5)[::-1]:
|
||||
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))),
|
||||
'name': (i!=0 and (str((5-(i+1)) * period_length +1) + '-' + str((5-i) * period_length)) or ('+'+str(4 * period_length))),
|
||||
'stop': start.strftime('%Y-%m-%d'),
|
||||
'start': (i!=0 and stop.strftime('%Y-%m-%d') or False),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user