From 376485ee9d337239cac43d9ff63f2731265e875e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Tarroja=20Caubet?= Date: Tue, 14 Feb 2023 12:48:01 +0100 Subject: [PATCH] Include in credit amount only invoice lines of type line Closes #12076 (grafted from df5b4734b8f288058a4074b3bbebd5f97b3f9d88) --HG-- branch : 6.0 --- modules/sale_credit_limit/party.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/sale_credit_limit/party.py b/modules/sale_credit_limit/party.py index 3a5ef12315..16c6dff287 100644 --- a/modules/sale_credit_limit/party.py +++ b/modules/sale_credit_limit/party.py @@ -35,6 +35,8 @@ class Party(metaclass=PoolMeta): if not quantity: continue for invoice_line in line.invoice_lines: + if invoice_line.type != 'line': + continue invoice = invoice_line.invoice if invoice and invoice.move: quantity -= Uom.compute_qty(