From c098c2af372ae3cf4aed20ff7a647a12ea7d689f Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Mon, 24 Jan 2022 17:21:33 +0100 Subject: [PATCH] Do not read product customers's data when product is empty issue11172 review381761002 --- sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sale.py b/sale.py index 3ee5d9e995..fa4a93f9e2 100644 --- a/sale.py +++ b/sale.py @@ -95,7 +95,7 @@ class AmendmentLine(metaclass=PoolMeta): super().on_change_product() except AttributeError: pass - if not self.product and not self.line: + if not self.product or not self.line: return product_customers = list(self.product.product_customer_used( **self.line._get_product_customer_pattern()))