From f437bd2d6da63002ad366ea5bead1253d27fa98a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 3 Jun 2015 21:21:20 +0200 Subject: [PATCH] FIX No check warehouse is provided if module stock is not enabled. --- htdocs/expedition/class/expedition.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 9b3b1018f50..4716ba4ae88 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -752,10 +752,11 @@ class Expedition extends CommonObject $orderline = new OrderLine($this->db); $orderline->fetch($id); - $fk_product = $orderline->fk_product; - if (! empty($orderline->fk_product)) + if (! empty($conf->stock->enabled) && ! empty($orderline->fk_product)) { + $fk_product = $orderline->fk_product; + if (! ($entrepot_id > 0) && empty($conf->global->STOCK_WAREHOUSE_NOT_REQUIRED_FOR_SHIPMENTS)) { $this->error=$langs->trans("ErrorWarehouseRequiredIntoShipmentLine");