From 8d61e68c0b2d700c96ebe7685adfd9e06e15c2f5 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Thu, 15 Apr 2021 10:10:55 +0200 Subject: [PATCH] Do read amount value inside subtotal computation The field can not be used because the server will read the values of all lines in the invoice and cause a recursion error issue10284 review363151002 --- invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 20b4c5dbdb..af7f861e0e 100644 --- a/invoice.py +++ b/invoice.py @@ -2042,7 +2042,7 @@ class InvoiceLine(sequence_ordered(), ModelSQL, ModelView, TaxableMixin): subtotal = Decimal(0) for line2 in self.invoice.lines: if line2.type == 'line': - subtotal += line2.amount + subtotal += line2.on_change_with_amount() elif line2.type == 'subtotal': if self == line2: break