details:   https://code.tryton.org/tryton/commit/8ccfba711214
branch:    default
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
diffstat:

 modules/account/move.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r a98f54c8b87b -r 8ccfba711214 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,

Reply via email to