Skip sale lines without the type line to compute credit amount

Closes #12130
This commit is contained in:
Adrià Tarroja Caubet
2023-03-09 15:26:25 +01:00
parent cb93430699
commit 8d4043edf8
+1 -1
View File
@@ -32,7 +32,7 @@ class Party(metaclass=PoolMeta):
amount = 0
for line in sale.lines:
quantity = line.quantity
if not quantity:
if not quantity or (line.type != 'line'):
continue
for invoice_line in line.invoice_lines:
if invoice_line.type != 'line':