diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php
index 6b49f3b090b..1cf450b633e 100644
--- a/htdocs/html.form.class.php
+++ b/htdocs/html.form.class.php
@@ -972,7 +972,7 @@ class Form
if ($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)
{
print $langs->trans("RefOrLabel").' : ';
- print ajax_updater($htmlname,'keysearch','/product/ajaxproducts.php','&type=2','ajaxworking');
+ print ajax_updater($htmlname,'keysearch','/product/ajaxproducts.php','&socid='.$socid.'&type=2','ajaxworking');
}
else
{
diff --git a/htdocs/product/ajaxproducts.php b/htdocs/product/ajaxproducts.php
index 1accd8d0ac4..68fc633043e 100644
--- a/htdocs/product/ajaxproducts.php
+++ b/htdocs/product/ajaxproducts.php
@@ -48,7 +48,7 @@ if(isset($_GET['keysearch']) && !empty($_GET['keysearch']))
}
else if ($_GET['type'] == 2)
{
- $form->select_produits_fournisseurs_do("","",$_GET["htmlname"],"","",$_GET["keysearch"]);
+ $form->select_produits_fournisseurs_do($_GET["socid"],"",$_GET["htmlname"],"","",$_GET["keysearch"]);
}
}