diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 43e610c3052..ef592df3767 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -458,7 +458,17 @@ if ($conf->use_javascript_ajax) { } print "\n"; print "\n"; - +print ''; +print ''.$langs->trans("AlwaysShowFullArbo").''; +print ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('STOCK_ALWAYS_SHOW_FULL_ARBO'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("STOCK_ALWAYS_SHOW_FULL_ARBO", $arrval, $conf->global->STOCK_ALWAYS_SHOW_FULL_ARBO); +} +print "\n"; +print "\n"; print ''; /* diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 9856649b834..54b7389aaf5 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -218,3 +218,4 @@ InventoryForASpecificWarehouse=Inventory for a specific warehouse InventoryForASpecificProduct=Inventory for a specific product StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to use ForceTo=Force to +AlwaysShowFullArbo=Always display full tree on card link \ No newline at end of file diff --git a/htdocs/langs/fr_FR/stocks.lang b/htdocs/langs/fr_FR/stocks.lang index b3ea9e04c13..63e966fc0aa 100644 --- a/htdocs/langs/fr_FR/stocks.lang +++ b/htdocs/langs/fr_FR/stocks.lang @@ -218,3 +218,4 @@ InventoryForASpecificWarehouse=Inventaire pour un entrepôt spécifique InventoryForASpecificProduct=Inventaire pour un produit spécifique StockIsRequiredToChooseWhichLotToUse=Le module Stock est requis pour choisir une lot ForceTo=Forcer à +AlwaysShowFullArbo=Toujours afficher l'arborescence complète dans le lien vers la fiche \ No newline at end of file diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index 56938d08979..b37420ffc7f 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -745,7 +745,7 @@ class Entrepot extends CommonObject $result .= $linkstart; if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= ($showfullpath ? $this->get_full_arbo() : (empty($this->label) ? $this->libelle : $this->label)); + if ($withpicto != 2) $result.= (($showfullpath || !empty($conf->global->STOCK_ALWAYS_SHOW_FULL_ARBO))? $this->get_full_arbo() : (empty($this->label)?$this->libelle:$this->label)); $result .= $linkend; return $result;