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
This commit is contained in:
1 parent
4525f90d7f
commit
8d61e68c0b
1 file changed
+1
-1
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user