diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 1d8eb4578ca..9a8f6c1a94d 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -117,6 +117,8 @@ class FormProduct { $obj = $this->db->fetch_object($resql); if ($sumStock) $obj->stock = price2num($obj->stock,5); + $o = new Entrepot($this->db); + $o->fetch($obj->rowid); $this->cache_warehouses[$obj->rowid]['id'] =$obj->rowid; $this->cache_warehouses[$obj->rowid]['label']=$o->get_full_arbo(); $this->cache_warehouses[$obj->rowid]['description'] = $obj->description; diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 5a3c5f7249b..203288170c8 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -646,7 +646,7 @@ else // Parent entrepot print ''.$langs->trans("AddIn").''; - print $formproduct->selectWarehouses('', 'fk_parent', '', 1, 0, 0, '', 0, 0, array(), 'minwidth200', array($object->id)); + print $formproduct->selectWarehouses($object->fk_parent, 'fk_parent', '', 1, 0, 0, '', 0, 0, array(), 'minwidth200', array($object->id)); print ''; // Description diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index 539b714ec2e..0132ec68fab 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -575,7 +575,7 @@ class Entrepot extends CommonObject $linkend=''; if ($withpicto) $result.=($link.img_object($label, 'stock', 'class="classfortooltip"').$linkend.' '); - $result.=$link.(empty($this->label)?$this->libelle:$this->label).$linkend; + $result.=$link.$this->get_full_arbo().$linkend; return $result; }