diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php
index fa9801d754f..10e4f6d56f9 100644
--- a/htdocs/html.form.class.php
+++ b/htdocs/html.form.class.php
@@ -2937,16 +2937,16 @@ class Form
/**
- \brief Affiche un select à partir d'un tableau
- \param htmlname Nom de la zone select
- \param array Tableau de key+valeur
- \param id Preselected key
- \param show_empty 1 si il faut ajouter une valeur vide dans la liste, 0 sinon
- \param key_in_label 1 pour afficher la key dans la valeur "[key] value"
- \param value_as_key 1 pour utiliser la valeur comme clé
- \param optionType Type de l'option: 1 pour des fonctions javascript
- \param option Valeur de l'option en fonction du type choisi
- \param translate Traduire la valeur
+ * \brief Show a select form from an array
+ * \param htmlname Nom de la zone select
+ * \param array Tableau de key+valeur
+ * \param id Preselected key
+ * \param show_empty 1 si il faut ajouter une valeur vide dans la liste, 0 sinon
+ * \param key_in_label 1 pour afficher la key dans la valeur "[key] value"
+ * \param value_as_key 1 pour utiliser la valeur comme clé
+ * \param optionType Type de l'option: 1 pour des fonctions javascript
+ * \param option Valeur de l'option en fonction du type choisi
+ * \param translate Traduire la valeur
*/
function select_array($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $optionType=0, $option='', $translate=0)
{
diff --git a/htdocs/html.formproduct.class.php b/htdocs/html.formproduct.class.php
new file mode 100644
index 00000000000..73bfbc49076
--- /dev/null
+++ b/htdocs/html.formproduct.class.php
@@ -0,0 +1,123 @@
+
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * \file htdocs/html.formproduct.class.php
+ * \brief Fichier de la classe des fonctions prédéfinie de composants html
+ * \version $Id$
+ */
+
+
+/**
+ * \class FormProduct
+ * \brief Classe permettant la génération de composants html
+ * \remarks Only common components must be here.
+ */
+class FormProduct
+{
+ var $db;
+ var $error;
+
+ // Cache arrays
+ var $cache_warehouses=array();
+
+ var $tva_taux_value;
+ var $tva_taux_libelle;
+
+
+ /**
+ \brief Constructeur
+ \param DB handler d'accès base de donnée
+ */
+ function FormProduct($DB)
+ {
+ $this->db = $DB;
+
+ return 1;
+ }
+
+
+ /**
+ * \brief Load in cache array list of warehouses
+ * \return int Nb of loaded lines, 0 if already loaded, <0 if KO
+ */
+ function loadWarehouses()
+ {
+ global $langs;
+
+ if (sizeof($this->cache_warehouses)) return 0; // Cache already loaded
+
+ $sql = "SELECT e.rowid, e.label FROM ".MAIN_DB_PREFIX."entrepot as e";
+ $sql .= " WHERE statut = 1";
+ $sql .= " ORDER BY e.label";
+
+ dolibarr_syslog('FormProduct::loadWarehouses sql='.$sql,LOG_DEBUG);
+ $resql = $this->db->query($sql);
+ if ($resql)
+ {
+ $num = $this->db->num_rows($resql);
+ $i = 0;
+ while ($i < $num)
+ {
+ $obj = $this->db->fetch_object($resql);
+
+ $this->cache_warehouses[$obj->rowid]['id'] =$obj->rowid;
+ $this->cache_warehouses[$obj->rowid]['label']=$obj->label;
+ $i++;
+ }
+ return $num;
+ }
+ else
+ {
+ dolibarr_print_error($this->db);
+ return -1;
+ }
+ }
+
+ /**
+ * \brief Retourne la liste des modes de paiements possibles
+ * \param selected Id du mode de paiement pré-sélectionné
+ * \param htmlname Nom de la zone select
+ * \param filtertype Pour filtre
+ * \param empty 1=peut etre vide, 0 sinon
+ */
+ function selectWarehouses($selected='',$htmlname='idwarehouse',$filtertype='',$empty=0)
+ {
+ global $langs,$user;
+
+ dolibarr_syslog("Form::selectWarehouses $selected, $htmlname, $filtertype, $format",LOG_DEBUG);
+
+ $this->loadWarehouses();
+
+ print '';
+ }
+
+}
+
+?>