Test if a product supplier was found before using it
Closes #13423 (grafted from b8885f0fb3335138d415f6bade5c8077dc3e718c) --HG-- branch : 6.0
This commit is contained in:
1 parent
e5d7077f82
commit
e2c9abe21e
1 file changed
+1
-1
@@ -139,7 +139,7 @@ class Line(metaclass=PoolMeta):
|
||||
product_supplier = request.find_best_product_supplier(
|
||||
self.product, self.shipping_date,
|
||||
**self._get_purchase_request_product_supplier_pattern())
|
||||
if product_supplier.drop_shipment:
|
||||
if product_supplier and product_supplier.drop_shipment:
|
||||
request.customer = (
|
||||
self.sale.shipment_party or self.sale.party)
|
||||
request.delivery_address = self.sale.shipment_address
|
||||
|
||||
Reference in new issue
Block a user