Test if a product supplier was found before using it

Closes #13423
(grafted from b8885f0fb3335138d415f6bade5c8077dc3e718c)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier committed 2024-07-27 12:13:12 +02:00
1 parent 846a6a8549
commit d2a2bedeed
1 file changed
+1 -1
+1 -1
View File
@@ -116,7 +116,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