details: https://code.tryton.org/tryton/commit/13b05f489335
branch: 8.2
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 5abc0617939c -r 13b05f489335 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
@@ -2919,7 +2919,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,