diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index a9d215da757..8582cb1a498 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -2903,8 +2903,9 @@ class Form
function load_cache_vatrates($country_code)
{
global $langs;
-
- if (count($this->cache_vatrates)) return 0; // Cache deja charge
+
+ $num = count($this->cache_vatrates);
+ if ($num > 0) return $num; // Cache deja charge
$sql = "SELECT DISTINCT t.taux, t.recuperableonly";
$sql.= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p";
diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php
index f025a34e045..b5c5f822673 100644
--- a/htdocs/core/lib/product.lib.php
+++ b/htdocs/core/lib/product.lib.php
@@ -139,35 +139,42 @@ function product_prepare_head($object, $user)
* Return array head with list of tabs to view object informations.
*
* @param Object $object Product
-* @param string $tab Tab id
* @return array head array with tabs
*/
-function product_admin_prepare_head($object, $tab)
+function product_admin_prepare_head($object=null)
{
- global $langs, $conf, $user;
-
- $h = 0;
- $head = array();
-
- $head[$h][0] = DOL_URL_ROOT."/product/admin/product.php";
- $head[$h][1] = $tab;
- $head[$h][2] = 'general';
- $h++;
-
- // Show more tabs from modules
- // Entries must be declared in modules descriptor with line
- // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
- // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
- complete_head_from_modules($conf,$langs,$object,$head,$h,'product_admin');
-
- $head[$h][0] = DOL_URL_ROOT.'/product/admin/product_extrafields.php';
- $head[$h][1] = $langs->trans("ExtraFields");
- $head[$h][2] = 'attributes';
- $h++;
-
- complete_head_from_modules($conf,$langs,$object,$head,$h,'product_admin','remove');
-
- return $head;
+ global $langs, $conf, $user;
+
+ $h = 0;
+ $head = array();
+
+ $head[$h][0] = DOL_URL_ROOT."/product/admin/product.php";
+ $head[$h][1] = $langs->trans('Parameters');
+ $head[$h][2] = 'general';
+ $h++;
+
+ if ($conf->global->MAIN_FEATURES_LEVEL > 1)
+ {
+ $head[$h][0] = DOL_URL_ROOT.'/product/admin/product_tools.php';
+ $head[$h][1] = $langs->trans("Tools");
+ $head[$h][2] = 'tools';
+ $h++;
+ }
+
+ // Show more tabs from modules
+ // Entries must be declared in modules descriptor with line
+ // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
+ // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
+ complete_head_from_modules($conf,$langs,$object,$head,$h,'product_admin');
+
+ $head[$h][0] = DOL_URL_ROOT.'/product/admin/product_extrafields.php';
+ $head[$h][1] = $langs->trans("ExtraFields");
+ $head[$h][2] = 'attributes';
+ $h++;
+
+ complete_head_from_modules($conf,$langs,$object,$head,$h,'product_admin','remove');
+
+ return $head;
}
diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php
index 5e4acbea39d..7340502119c 100644
--- a/htdocs/product/admin/product.php
+++ b/htdocs/product/admin/product.php
@@ -131,7 +131,7 @@ llxHeader('',$title);
$linkback=''.$langs->trans("BackToModuleList").'';
print_fiche_titre($title,$linkback,'setup');
-$head = product_admin_prepare_head(null, $tab);
+$head = product_admin_prepare_head();
dol_fiche_head($head, 'general', $tab, 0, 'product');
$form=new Form($db);
diff --git a/htdocs/product/admin/product_extrafields.php b/htdocs/product/admin/product_extrafields.php
index c24782a9396..d417b7319c5 100755
--- a/htdocs/product/admin/product_extrafields.php
+++ b/htdocs/product/admin/product_extrafields.php
@@ -82,7 +82,7 @@ $linkback=''.$langs->trans("BackToM
print_fiche_titre($title,$linkback,'setup');
-$head = product_admin_prepare_head(null, $tab);
+$head = product_admin_prepare_head();
dol_fiche_head($head, 'attributes', $tab, 0, 'product');
diff --git a/htdocs/product/admin/product_tools.php b/htdocs/product/admin/product_tools.php
new file mode 100644
index 00000000000..85299312e4b
--- /dev/null
+++ b/htdocs/product/admin/product_tools.php
@@ -0,0 +1,177 @@
+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see