changeset f5bb06bd5685 in modules/sale_supply_drop_shipment:5.0
details:
https://hg.tryton.org/modules/sale_supply_drop_shipment?cmd=changeset;node=f5bb06bd5685
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 8c7425c1a353 -r f5bb06bd5685 stock.py
--- a/stock.py Thu Jul 16 19:17:18 2020 +0200
+++ b/stock.py Mon Oct 12 23:39:48 2020 +0200
@@ -588,7 +588,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):