changeset 15a9daf4cd52 in modules/account:5.4 details: https://hg.tryton.org/modules/account?cmd=changeset;node=15a9daf4cd52 description: Test that balance line exists when grouping payment lines
issue8754 review284281003 (grafted from 53a52828acac0a36e4e279b81046f9fc3772c669) diffstat: move.py | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diffs (24 lines): diff -r 18182deae742 -r 15a9daf4cd52 move.py --- a/move.py Sun Mar 01 21:03:13 2020 +0100 +++ b/move.py Fri Mar 06 11:21:30 2020 +0100 @@ -1860,8 +1860,9 @@ if line.account.reconcile: to_reconcile[line.account].append(line) - balance_line.move = move - balance_line.save() + if balance_line: + balance_line.move = move + balance_line.save() for lines in to_reconcile.values(): Line.reconcile(lines, delegate_to=balance_line) @@ -1974,7 +1975,7 @@ balance_line.second_currency = grouping['second_currency'] balance_line.amount_second_currency = ( -amount_second_currency) - balance_line.maturity_date = maturity_dates[balance_line.account] + balance_line.maturity_date = maturity_dates[balance_line.account] return move, balance_line def _counterpart_line(self, line):