diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php
new file mode 100644
index 00000000000..82b7021e5c1
--- /dev/null
+++ b/htdocs/product/stock/index.php
@@ -0,0 +1,81 @@
+
+ *
+ * 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.
+ *
+ * $Id$
+ * $Source$
+ *
+ */
+require("./pre.inc.php");
+
+/*
+ *
+ *
+ */
+
+llxHeader("","","Stocks");
+
+print_titre("Stocks");
+
+print '
';
+print '';
+
+$sql = "SELECT e.label, e.rowid FROM llx_entrepot as e";
+$sql .= " ORDER BY e.label DESC ";
+$sql .= $db->plimit(15 ,0);
+$result = $db->query($sql) ;
+
+if ($result)
+{
+ $num = $db->num_rows();
+
+ $i = 0;
+
+ if ($num > 0)
+ {
+ print '';
+
+ print '| Entrepôts | ';
+
+ $var=True;
+ while ($i < $num)
+ {
+ $objp = $db->fetch_object( $i);
+ $var=!$var;
+ print "";
+ print "| rowid\">$objp->label | \n";
+ print " \n";
+ $i++;
+ }
+ $db->free();
+
+ print " ";
+ }
+}
+else
+{
+ print $db->error() . " " .$sql;
+}
+
+print ' | ';
+
+
+print ' |
';
+
+$db->close();
+
+llxFooter("Dernière modification $Date$ révision $Revision$");
+?>
diff --git a/htdocs/product/stock/pre.inc.php b/htdocs/product/stock/pre.inc.php
new file mode 100644
index 00000000000..188543a1e0f
--- /dev/null
+++ b/htdocs/product/stock/pre.inc.php
@@ -0,0 +1,43 @@
+
+ *
+ * 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.
+ *
+ * $Id$
+ * $Source$
+ *
+ */
+require("../../main.inc.php");
+require("./entrepot.class.php");
+function llxHeader($head = "", $urlp = "", $title="")
+{
+ /*
+ *
+ *
+ */
+ top_menu($head, $title);
+
+ $menu = new Menu();
+
+ $menu->add(DOL_URL_ROOT."/product/stock/", "Stock");
+
+ $menu->add_submenu(DOL_URL_ROOT."/product/stock/fiche.php?action=create", "Nouvel entrepôt");
+
+ $menu->add(DOL_URL_ROOT."/product/stock/mouvement.php", "Mouvements");
+
+ left_menu($menu->liste);
+
+}
+?>
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
new file mode 100644
index 00000000000..2ee9c2076cc
--- /dev/null
+++ b/htdocs/product/stock/product.php
@@ -0,0 +1,266 @@
+
+ *
+ * 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.
+ *
+ * $Id$
+ * $Source$
+ *
+ */
+
+require("./pre.inc.php");
+
+$user->getrights('produit');
+$mesg = '';
+
+if (!$user->rights->produit->lire)
+{
+ accessforbidden();
+}
+
+llxHeader("","","Fiche produit");
+
+if ($HTTP_POST_VARS["action"] == "create_stock")
+{
+ $product = new Product($db);
+ $product->id = $_GET["id"];
+ $product->create_stock($HTTP_POST_VARS["id_entrepot"], $HTTP_POST_VARS["nbpiece"]);
+}
+
+if ($HTTP_POST_VARS["action"] == "correct_stock")
+{
+ $product = new Product($db);
+ $product->id = $_GET["id"];
+ $product->correct_stock($user,
+ $HTTP_POST_VARS["id_entrepot"],
+ $HTTP_POST_VARS["nbpiece"],
+ $HTTP_POST_VARS["mouvement"]);
+}
+
+
+if ($cancel == 'Annuler')
+{
+ $action = '';
+}
+/*
+ *
+ *
+ */
+if ($id)
+{
+ if ($action <> 're-edit')
+ {
+ $product = new Product($db);
+ $result = $product->fetch($id);
+ }
+
+ if ( $result )
+ {
+ if ($action <> 'edit' && $action <> 're-edit')
+ {
+
+ print_fiche_titre('Fiche stock : '.$product->ref, $mesg);
+
+ print '';
+ print "";
+ print '| Référence | '.$product->ref.' | ';
+ print '';
+ if ($product->envente)
+ {
+ print "En vente";
+ }
+ else
+ {
+ print "Cet article n'est pas en vente";
+ }
+ print ' |
';
+ print "| Libellé | $product->libelle | ";
+ print 'Statistiques |
';
+ print '| Prix de vente | '.price($product->price).' | ';
+ print '';
+ print 'Fournisseurs [Ajouter]';
+
+ $sql = "SELECT s.nom, s.idp";
+ $sql .= " FROM llx_societe as s, llx_product_fournisseur as pf";
+ $sql .=" WHERE pf.fk_soc = s.idp AND pf.fk_product =$id";
+ $sql .= " ORDER BY lower(s.nom)";
+
+ if ( $db->query($sql) )
+ {
+ $num = $db->num_rows();
+ $i = 0;
+ print '';
+ $var=True;
+ while ($i < $num)
+ {
+ $objp = $db->fetch_object( $i);
+ $var=!$var;
+ print "";
+ print '| '.$objp->nom.' | ';
+ $i++;
+ }
+ print ' ';
+ $db->free();
+ }
+
+ print ' |
';
+
+ print '| Stock seuil | '.$product->seuil_stock_alerte.' |
';
+
+ print "
";
+ }
+ /*
+ * Contenu des stocks
+ *
+ */
+ print '
';
+ print '| Entrepôt | Valeur du stock |
';
+ $sql = "SELECT e.rowid, e.label, ps.reel FROM llx_entrepot as e, llx_product_stock as ps";
+ $sql .= " WHERE ps.fk_entrepot = e.rowid AND ps.fk_product = $product->id";
+ $sql .= " ORDER BY lower(e.label)";
+
+ if ($db->query($sql))
+ {
+ $num = $db->num_rows();
+ $i = 0; $total = 0;
+ while ($i < $num)
+ {
+ $obj = $db->fetch_object( $i);
+ print '| '.$obj->label.' | '.$obj->reel.' |
'; ;
+ $total = $total + $obj->reel;
+ $i++;
+ }
+ }
+ print '| Total : | '.$total." |
";
+
+
+
+ }
+ /*
+ * Correction du stock
+ *
+ *
+ */
+ if ($_GET["action"] == "correction")
+ {
+ print_titre ("Correction du stock");
+ print "';
+
+ }
+ /*
+ * Correction du stock
+ *
+ *
+ */
+ if ($_GET["action"] == "definir")
+ {
+ print_titre ("Créer un stock");
+ print "';
+ }
+}
+else
+{
+ print "Error";
+}
+
+
+/* ************************************************************************** */
+/* */
+/* Barre d'action */
+/* */
+/* ************************************************************************** */
+
+print '
';
+
+print '| - | ';
+
+print '- | ';
+
+if ($action == '')
+{
+ if ($user->rights->produit->modifier || $user->rights->produit->creer)
+ {
+ print 'Editer | ';
+ }
+ else
+ {
+ print '- | ';
+ }
+}
+else
+{
+ print '- | ';
+}
+print '- | ';
+print 'Correction stock | ';
+
+print '
';
+
+
+$db->close();
+
+llxFooter("Dernière modification $Date$ révision $Revision$");
+?>