diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index a4716ba40cc..87d177e5d7d 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -4696,7 +4696,7 @@ class Form
if ($rendermode == 0)
{
- $cate_arbo = $this->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1);
+ $cate_arbo = $this->select_all_categories($type, '', 'parent', 64, 0, 1);
foreach($categories as $c) {
$arrayselected[] = $c->id;
}