fix for aged partner balance na

This commit is contained in:
Marc Durepos 2024-05-28 15:26:30 -04:00
parent 7c51f05088
commit 6ffd75f299
2 changed files with 2 additions and 2 deletions

View file

@ -2,7 +2,7 @@ from . import models
def post_init(env):
env['account.report'].search([('name', 'ilike', 'aged_%_report_na')]).unlink()
env['account.report'].search([('name', 'ilike', 'Aged % - North America')]).unlink()
new_receivable_report = env.ref('account_reports.aged_receivable_report').copy()
new_payable_report = env.ref('account_reports.aged_payable_report').copy()
new_receivable_report.line_ids.mapped('expression_ids').write({

View file

@ -131,7 +131,7 @@ class AgedPartnerBalanceCustomHandler(models.AbstractModel):
- COALESCE(SUM(ROUND(part_debit.amount * currency_table.rate, currency_table.precision)), 0)
+ COALESCE(SUM(ROUND(part_credit.amount * currency_table.rate, currency_table.precision)), 0)
)
ELSE 5 END AS period{i}
ELSE 0 END AS period{i}
"""
for i in range(len(periods))
)