From 1ecb43f57105fd6c03e94a6cfbc8c1aa652ddfa2 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Mon, 12 Feb 2024 23:45:14 +0100 Subject: [PATCH] Reset amount to pay with Decimal Otherwise amount to pay can not copy sign from line. Closes #13023 (grafted from 30926e7b8b6fe5deaffeea6a9c8efb120ff2b638) --HG-- branch : 6.0 --- modules/account_statement/statement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/account_statement/statement.py b/modules/account_statement/statement.py index 3b99edac76..1fed8eb131 100644 --- a/modules/account_statement/statement.py +++ b/modules/account_statement/statement.py @@ -349,7 +349,7 @@ class Statement(Workflow, ModelSQL, ModelView): new_line.invoice = None line_offset += 1 lines.insert(index + line_offset, new_line) - invoice_id2amount_to_pay[line.invoice.id] = 0 + invoice_id2amount_to_pay[line.invoice.id] = Decimal(0) line.amount = amount_to_pay.copy_sign(line.amount) else: invoice_id2amount_to_pay[line.invoice.id] = (