changeset 922662632fbd in modules/sale_product_customer:default
details: 
https://hg.tryton.org/modules/sale_product_customer?cmd=changeset&node=922662632fbd
description:
        Do not read product customers's data when product is empty

        issue11172
        review381761002
diffstat:

 sale.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 80a8102154bb -r 922662632fbd sale.py
--- a/sale.py   Sat Dec 18 16:34:36 2021 +0100
+++ b/sale.py   Mon Jan 24 17:21:33 2022 +0100
@@ -95,7 +95,7 @@
             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()))

Reply via email to