changeset 8473ebbe4f85 in modules/sale_supply_drop_shipment:default details: https://hg.tryton.org/modules/sale_supply_drop_shipment?cmd=changeset;node=8473ebbe4f85 description: Ensure customer field is not empty
issue9697 review328301002 diffstat: stock.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diffs (13 lines): diff -r 701f92f093a0 -r 8473ebbe4f85 stock.py --- a/stock.py Mon Oct 12 23:19:54 2020 +0200 +++ b/stock.py Mon Oct 12 23:39:48 2020 +0200 @@ -582,7 +582,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):