diff --git a/htdocs/product/sousproduits/fiche.php b/htdocs/product/sousproduits/fiche.php
index a7813898175..25bf3f3d8e5 100644
--- a/htdocs/product/sousproduits/fiche.php
+++ b/htdocs/product/sousproduits/fiche.php
@@ -54,9 +54,11 @@ $action=isset($_GET["action"])?$_GET["action"]:$_POST["action"];
$cancel=isset($_GET["cancel"])?$_GET["cancel"]:$_POST["cancel"];
$product = new Product($db);
+$productid=0;
if ($id || $ref)
{
$result = $product->fetch($id,$ref);
+ $productid=$product->id;
}
@@ -131,12 +133,12 @@ if ($cancel == $langs->trans("Cancel"))
* View
*/
+$productstatic = new Product($db);
$html = new Form($db);
llxHeader("","",$langs->trans("CardProduct".$product->type));
$html = new Form($db);
-$productstatic = new Product($db);
if ($mesg) {
print '