diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 8e926354841..c3ec8400510 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -897,6 +897,8 @@ class Form
function select_produits($selected='',$htmlname='productid',$filtertype='',$limit=20,$price_level=0,$status=1,$finished=2,$selected_input_value='',$hidelabel=0)
{
global $langs,$conf;
+
+ $price_level = (! empty($price_level) ? $price_level : 0);
if ($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)
{
@@ -911,12 +913,13 @@ class Form
print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/product/ajaxproducts.php', 'htmlname='.$htmlname.'&outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=1&status='.$status.'&finished='.$finished, $conf->global->PRODUIT_USE_SEARCH_TO_SELECT);
if (! $hidelabel) print $langs->trans("RefOrLabel").' : ';
print '';
- print '
';
}
else
{
$this->select_produits_do($selected,$htmlname,$filtertype,$limit,$price_level,'',$status,$finished,0);
}
+
+ print '
';
}
/**
diff --git a/htdocs/core/tpl/freeproductline_create.tpl.php b/htdocs/core/tpl/freeproductline_create.tpl.php
index bd1b8e77672..e329b0e669d 100644
--- a/htdocs/core/tpl/freeproductline_create.tpl.php
+++ b/htdocs/core/tpl/freeproductline_create.tpl.php
@@ -49,7 +49,7 @@
if (is_object($hookmanager))
{
$parameters=array();
- $hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action);
+ echo $hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action);
}
// Editor wysiwyg
diff --git a/htdocs/core/tpl/freeproductline_edit.tpl.php b/htdocs/core/tpl/freeproductline_edit.tpl.php
index b2b4e7d2ce0..a17b510fc21 100644
--- a/htdocs/core/tpl/freeproductline_edit.tpl.php
+++ b/htdocs/core/tpl/freeproductline_edit.tpl.php
@@ -41,7 +41,7 @@
if (is_object($hookmanager))
{
$parameters=array('fk_parent_line'=>$line->fk_parent_line);
- $hookmanager->executeHooks('formEditProductOptions',$parameters,$this,$action);
+ echo $hookmanager->executeHooks('formEditProductOptions',$parameters,$this,$action);
}
// editeur wysiwyg
diff --git a/htdocs/core/tpl/predefinedproductline_create.tpl.php b/htdocs/core/tpl/predefinedproductline_create.tpl.php
index 59fe2756602..4660a93589d 100644
--- a/htdocs/core/tpl/predefinedproductline_create.tpl.php
+++ b/htdocs/core/tpl/predefinedproductline_create.tpl.php
@@ -50,18 +50,13 @@