details:   https://code.tryton.org/tryton/commit/a7ac85d9e3a5
branch:    7.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 6c9c1d7cf62d -r a7ac85d9e3a5 modules/account/move.py
--- a/modules/account/move.py   Thu Oct 15 19:24:32 2026 +0200
+++ b/modules/account/move.py   Thu Oct 15 13:11:54 2026 +0000
@@ -2818,7 +2818,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,

Reply via email to