Reset amount to pay with Decimal

Otherwise amount to pay can not copy sign from line.

Closes #13023
(grafted from 30926e7b8b6fe5deaffeea6a9c8efb120ff2b638)

--HG--
branch : 7.0
This commit is contained in:
Sergi Almacellas Abellana committed 2024-02-12 23:45:14 +01:00
1 parent 8f44c6b46a
commit 212662bb6e
1 file changed
+1 -1
+1 -1
View File
@@ -302,7 +302,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] = (