changeset a235a6b500c3 in modules/account_invoice:default
details:
https://hg.tryton.org/modules/account_invoice?cmd=changeset&node=a235a6b500c3
description:
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
diffstat:
invoice.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 3af4ee8c3b8b -r a235a6b500c3 invoice.py
--- a/invoice.py Mon Apr 12 22:01:27 2021 +0200
+++ b/invoice.py Thu Apr 15 10:10:55 2021 +0200
@@ -2042,7 +2042,7 @@
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