details: https://code.tryton.org/tryton/commit/4a39505e53aa
branch: 8.0
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 95e0a323def3 -r 4a39505e53aa 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
@@ -2970,7 +2970,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,