details: https://code.tryton.org/tryton/commit/93b171de6984
branch: 7.8
user: Eva Luadora <[email protected]>
date: Thu Oct 15 13:11:54 2026 +0000
description:
Compare absolute amounts when previewing rescheduled lines
Compare the magnitudes of the remaining balance and installment amount
while preserving the sign of generated terms.
Closes #15164
(grafted from 8ccfba71121466c765adb5dcd8dba4fe836aec03)
diffstat:
modules/account/move.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r fcda7f8e0b78 -r 93b171de6984 modules/account/move.py
--- a/modules/account/move.py Mon Oct 19 12:20:05 2026 +0200
+++ b/modules/account/move.py Thu Oct 15 13:11:54 2026 +0000
@@ -2928,7 +2928,7 @@
if self.start.amount:
interval = self.start.interval
amount = self.start.amount.copy_sign(remaining)
- while remaining - amount > 0:
+ while abs(remaining) > abs(amount):
terms.append({
'date': date,
'amount': amount,