From e4c7f584e3cf21108cad67b389eecf5b3d6b93bf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 13 Jun 2017 11:45:21 +0200 Subject: [PATCH] Fix option STOCK_SUPPORTS_SERVICES (stock not visible when it should) --- htdocs/product/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 40dcd116ab4..7fd4135bd4a 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -628,9 +628,9 @@ else $product_static->status = $objp->tosell; $product_static->entity = $objp->entity; - if (! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) // To optimize call of load_stock + if ((! empty($conf->stock->enabled) && $user->rights->stock->lire && $type != 1) || ! empty($conf->global->STOCK_DISABLE_OPTIM_LOAD)) // To optimize call of load_stock { - if ($objp->fk_product_type != 1) // Not a service + if ($objp->fk_product_type != 1 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) // Not a service { $product_static->load_stock('nobatch'); // Load stock_reel + stock_warehouse. This also call load_virtual_stock() }