From 8d4043edf8e3086ec9fd5d9fa5df882990a5b523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Tarroja=20Caubet?= Date: Thu, 9 Mar 2023 15:26:25 +0100 Subject: [PATCH] Skip sale lines without the type line to compute credit amount Closes #12130 --- modules/sale_credit_limit/party.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sale_credit_limit/party.py b/modules/sale_credit_limit/party.py index 16c6dff287..ea1a823053 100644 --- a/modules/sale_credit_limit/party.py +++ b/modules/sale_credit_limit/party.py @@ -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':