FIX No check warehouse is provided if module stock is not enabled.

This commit is contained in:
Laurent Destailleur 2015-06-03 21:21:20 +02:00
parent 6e72d3c8cc
commit f437bd2d6d

View File

@ -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");