changeset acce483556de in modules/sale_supply_drop_shipment:5.6
details: 
https://hg.tryton.org/modules/sale_supply_drop_shipment?cmd=changeset;node=acce483556de
description:
        Ensure customer field is not empty

        issue9697
        review328301002
        (grafted from 8473ebbe4f850109e7f55d721fa6890b2e9a7647)
diffstat:

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

diffs (13 lines):

diff -r 7ad4635b734f -r acce483556de stock.py
--- a/stock.py  Thu Jul 16 19:15:38 2020 +0200
+++ b/stock.py  Mon Oct 12 23:39:48 2020 +0200
@@ -584,7 +584,8 @@
         if isinstance(self.origin, SaleLine):
             return self.origin.sale.party.id
         elif isinstance(self.origin, PurchaseLine):
-            return self.origin.purchase.customer.id
+            if self.origin.purchase.customer:
+                return self.origin.purchase.customer.id
 
     @classmethod
     def search_customer_drop(cls, name, clause):

Reply via email to