diff --git a/dev/examples/create_product.php b/dev/examples/create_product.php index 8fe36260c98..cdb6cdae9e2 100755 --- a/dev/examples/create_product.php +++ b/dev/examples/create_product.php @@ -70,7 +70,7 @@ $myproduct->libelle = 'libelle'; $myproduct->price = '10'; $myproduct->price_base_type = 'HT'; $myproduct->tva_tx = '19.6'; -$myproduct->type = 0; +$myproduct->type = Product::TYPE_PRODUCT; $myproduct->status = 1; $myproduct->description = 'Description'; $myproduct->note = 'Note'; diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index e116ac668ab..76af3708c8b 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -343,7 +343,7 @@ else if ($id || $ref) $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); - $picto=($product->type==1?'service':'product'); + $picto=($product->type== Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'category', $titre,0,$picto); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ae7b0e2d1e8..eb63f76319f 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3872,7 +3872,7 @@ class Form { $prodstatic=new Product($this->db); $prodstatic->fetch($idprod); - if ($prodstatic->type == 1) // We know product is a service + if ($prodstatic->type == Product::TYPE_SERVICE) // We know product is a service { $code_country.=",'".$societe_acheteuse->country_code."'"; } diff --git a/htdocs/core/photos_resize.php b/htdocs/core/photos_resize.php index 3a51a5f7567..80f849a0494 100644 --- a/htdocs/core/photos_resize.php +++ b/htdocs/core/photos_resize.php @@ -70,8 +70,8 @@ if ($id > 0) $result = $object->fetch($id); if ($result <= 0) dol_print_error($db,'Failed to load object'); $dir=$conf->product->multidir_output[$object->entity]; // By default - if ($object->type == 0) $dir=$conf->product->multidir_output[$object->entity]; - if ($object->type == 1) $dir=$conf->service->multidir_output[$object->entity]; + if ($object->type == Product::TYPE_PRODUCT) $dir=$conf->product->multidir_output[$object->entity]; + if ($object->type == Product::TYPE_SERVICE) $dir=$conf->service->multidir_output[$object->entity]; } /* diff --git a/htdocs/margin/tabs/productMargins.php b/htdocs/margin/tabs/productMargins.php index d811f898c0b..2123f683c21 100644 --- a/htdocs/margin/tabs/productMargins.php +++ b/htdocs/margin/tabs/productMargins.php @@ -79,7 +79,7 @@ if ($id > 0 || ! empty($ref)) { $head=product_prepare_head($object, $user); $titre=$langs->trans("CardProduct".$object->type); - $picto=($object->type==1?'service':'product'); + $picto=($object->type== Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'margin', $titre, 0, $picto); print ''; diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php index 3537dc288a9..84140ee3f6a 100644 --- a/htdocs/product/canvas/product/actions_card_product.class.php +++ b/htdocs/product/canvas/product/actions_card_product.class.php @@ -143,7 +143,7 @@ class ActionsCardProduct $this->tpl['showrefnav'] = $form->showrefnav($this->object,'ref','',1,'ref'); $titre=$langs->trans("CardProduct".$this->object->type); - $picto=($this->object->type==1?'service':'product'); + $picto=($this->object->type==Product::TYPE_SERVICE?'service':'product'); $this->tpl['showhead']=dol_get_fiche_head($head, 'card', $titre, 0, $picto); $this->tpl['showend']=dol_get_fiche_end(); diff --git a/htdocs/product/canvas/service/actions_card_service.class.php b/htdocs/product/canvas/service/actions_card_service.class.php index cbb9e10750c..b36e7b317c6 100644 --- a/htdocs/product/canvas/service/actions_card_service.class.php +++ b/htdocs/product/canvas/service/actions_card_service.class.php @@ -142,7 +142,7 @@ class ActionsCardService $this->tpl['showrefnav'] = $form->showrefnav($this->object,'ref','',1,'ref'); $titre=$langs->trans("CardProduct".$this->object->type); - $picto=($this->object->type==1?'service':'product'); + $picto=($this->object->type==Product::TYPE_SERVICE?'service':'product'); $this->tpl['showhead']=dol_get_fiche_head($head, 'card', $titre, 0, $picto); $this->tpl['showend']=dol_get_fiche_end(); diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 0a74845a763..eecec0705f7 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -461,7 +461,7 @@ if (empty($reshook)) if ($action == 'confirm_delete' && $confirm != 'yes') { $action=''; } if ($action == 'confirm_delete' && $confirm == 'yes') { - if (($object->type == 0 && $user->rights->produit->supprimer) || ($object->type == 1 && $user->rights->service->supprimer)) + if (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->supprimer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->supprimer)) { $result = $object->delete($object->id); } @@ -768,8 +768,8 @@ if (GETPOST("cancel") == $langs->trans("Cancel")) */ $helpurl=''; -if (GETPOST("type") == '0' || ($object->type == '0')) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; -if (GETPOST("type") == '1' || ($object->type == '1')) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; +if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) $helpurl='EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; +if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) $helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; if (isset($_GET['type'])) $title = $langs->trans('CardProduct'.GETPOST('type')); else $title = $langs->trans('ProductServiceCard'); @@ -1193,7 +1193,7 @@ else }*/ // Nature - if($object->type!=1) + if($object->type!= Product::TYPE_SERVICE) { print ''; // Nature - if($object->type!=1) + if($object->type!= Product::TYPE_SERVICE) { print ''; // Nature - if($object->type!=1) + if($object->type!=Product::TYPE_SERVICE) { print '
'.$langs->trans("Nature").''; $statutarray=array('-1'=>' ', '1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial")); @@ -1308,7 +1308,7 @@ else { $head=product_prepare_head($object, $user); $titre=$langs->trans("CardProduct".$object->type); - $picto=($object->type==1?'service':'product'); + $picto=($object->type== Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'card', $titre, 0, $picto); $showphoto=$object->is_photo_available($conf->product->multidir_output[$object->entity]); @@ -1331,7 +1331,7 @@ else $nblignes=7; if (! empty($conf->produit->enabled) && ! empty($conf->service->enabled)) $nblignes++; if ($showbarcode) $nblignes+=2; - if ($object->type!=1) $nblignes++; + if ($object->type!= Product::TYPE_SERVICE) $nblignes++; if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) $nblignes+=2; if ($object->isservice()) $nblignes++; else $nblignes+=4; @@ -1464,7 +1464,7 @@ else print '
'.$langs->trans("Nature").''; print $object->getLibFinished(); @@ -1628,8 +1628,8 @@ if (empty($reshook)) } $object_is_used = $object->isObjectUsed($object->id); - if (($object->type == 0 && $user->rights->produit->supprimer) - || ($object->type == 1 && $user->rights->service->supprimer)) + if (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->supprimer) + || ($object->type == Product::TYPE_SERVICE && $user->rights->service->supprimer)) { if (empty($object_is_used) && (! isset($object->no_button_delete) || $object->no_button_delete <> 1)) { diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index d08ed699b7f..8c811a57a1a 100755 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -61,8 +61,12 @@ class Product extends CommonObject var $libelle; // TODO deprecated var $label; var $description; - //! Type 0 for regular product, 1 for service (Advanced feature: 2 for assembly kit, 3 for stock kit) - var $type; + + /** + * Check TYPE constants + * @var int + */ + var $type = self::TYPE_PRODUCT; //! Selling price var $price; // Price net var $price_ttc; // Price with tax @@ -171,6 +175,23 @@ class Product extends CommonObject var $fk_price_expression; + /** + * Regular product + */ + const TYPE_PRODUCT = 0; + /** + * Service + */ + const TYPE_SERVICE = 1; + /** + * Advanced feature: assembly kit + */ + const TYPE_ASSEMBLYKIT = 2; + /** + * Advanced feature: stock kit + */ + const TYPE_STOCKKIT = 3; + /** * Constructor * @@ -233,7 +254,6 @@ class Product extends CommonObject // Clean parameters $this->ref = dol_string_nospecial(trim($this->ref)); $this->libelle = trim($this->libelle); - if (empty($this->type)) $this->type=0; $this->price_ttc=price2num($this->price_ttc); $this->price=price2num($this->price); $this->price_min_ttc=price2num($this->price_min_ttc); @@ -795,7 +815,7 @@ class Product extends CommonObject $this->error = "Object must be fetched before calling delete"; return -1; } - if (($this->type == 0 && empty($user->rights->produit->supprimer)) || ($this->type == 1 && empty($user->rights->service->supprimer))) + if (($this->type == Product::TYPE_PRODUCT && empty($user->rights->produit->supprimer)) || ($this->type == Product::TYPE_SERVICE && empty($user->rights->service->supprimer))) { $this->error = "ErrorForbidden"; return 0; @@ -2932,8 +2952,8 @@ class Product extends CommonObject $result=''; $newref=$this->ref; if ($maxlength) $newref=dol_trunc($newref,$maxlength,'middle'); - if ($this->type == 0) $label = '' . $langs->trans("ShowProduct") . ''; - if ($this->type == 1) $label = '' . $langs->trans("ShowService") . ''; + if ($this->type == Product::TYPE_PRODUCT) $label = '' . $langs->trans("ShowProduct") . ''; + if ($this->type == Product::TYPE_SERVICE) $label = '' . $langs->trans("ShowService") . ''; if (! empty($this->ref)) $label .= '
' . $langs->trans('ProductRef') . ': ' . $this->ref; if (! empty($this->label)) @@ -2968,8 +2988,8 @@ class Product extends CommonObject } if ($withpicto) { - if ($this->type == 0) $result.=($link.img_object($langs->trans("ShowProduct").' '.$this->label, 'product', 'class="classfortooltip"').$linkend.' '); - if ($this->type == 1) $result.=($link.img_object($langs->trans("ShowService").' '.$this->label, 'service', 'class="classfortooltip"').$linkend.' '); + if ($this->type == Product::TYPE_PRODUCT) $result.=($link.img_object($langs->trans("ShowProduct").' '.$this->label, 'product', 'class="classfortooltip"').$linkend.' '); + if ($this->type == Product::TYPE_SERVICE) $result.=($link.img_object($langs->trans("ShowService").' '.$this->label, 'service', 'class="classfortooltip"').$linkend.' '); } $result.=$link.$newref.$linkend; return $result; @@ -3666,7 +3686,7 @@ class Product extends CommonObject */ function isproduct() { - return ($this->type != 1 ? true : false); + return ($this->type != Product::TYPE_PRODUCT ? true : false); } /** @@ -3676,7 +3696,7 @@ class Product extends CommonObject */ function isservice() { - return ($this->type == 1 ? true : false); + return ($this->type == Product::TYPE_SERVICE ? true : false); } /** @@ -3733,7 +3753,6 @@ class Product extends CommonObject $this->tosell=1; $this->tobuy=1; $this->tobatch=0; - $this->type=0; $this->note='This is a comment (private)'; $this->barcode=-1; // Create barcode automatically diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 53f79266c25..96f2a589429 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -176,7 +176,7 @@ llxHeader("","",$langs->trans("CardProduct".$object->type)); $head=product_prepare_head($object, $user); $titre=$langs->trans("CardProduct".$object->type); -$picto=($object->type==1?'service':'product'); +$picto=($object->type==Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'subproduct', $titre, 0, $picto); @@ -207,7 +207,7 @@ if ($id > 0 || ! empty($ref)) print '
'.$langs->trans("Nature").''; print $object->getLibFinished(); @@ -474,7 +474,7 @@ if ($id > 0 || ! empty($ref)) // check if a product is not already a parent product of this one $prod_arbo=new Product($db); $prod_arbo->id=$objp->rowid; - if ($prod_arbo->type==2 || $prod_arbo->type==3) + if ($prod_arbo->type==Product::TYPE_ASSEMBLYKIT || $prod_arbo->type== Product::TYPE_STOCKKIT) { $is_pere=0; $prod_arbo->get_sousproduits_arbo(); diff --git a/htdocs/product/document.php b/htdocs/product/document.php index e46dc0384b2..9a71eac4f55 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -102,7 +102,7 @@ if ($object->id) { $head=product_prepare_head($object, $user); $titre=$langs->trans("CardProduct".$object->type); - $picto=($object->type==1?'service':'product'); + $picto=($object->type== Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'documents', $titre, 0, $picto); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook @@ -146,7 +146,7 @@ if ($object->id) print ''; $modulepart = 'produit'; - $permission = (($object->type == 0 && $user->rights->produit->creer) || ($object->type == 1 && $user->rights->service->creer)); + $permission = (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->creer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->creer)); $param = '&id=' . $object->id; include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; } diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index b360829a341..c2196aba00b 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -259,7 +259,7 @@ if ($id || $ref) $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); - $picto=($product->type==1?'service':'product'); + $picto=($product->type== Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'suppliers', $titre, 0, $picto); diff --git a/htdocs/product/photos.php b/htdocs/product/photos.php index 0ae65a7dec6..8a6e2ddbd6b 100644 --- a/htdocs/product/photos.php +++ b/htdocs/product/photos.php @@ -102,7 +102,7 @@ if ($object->id) */ $head=product_prepare_head($object, $user); $titre=$langs->trans("CardProduct".$object->type); - $picto=($object->type==1?'service':'product'); + $picto=($object->type== Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'photos', $titre, 0, $picto); /* @@ -145,8 +145,8 @@ if ($object->id) $permtoedit=0; - if ($user->rights->produit->creer && $object->type == 0) $permtoedit=1; - if ($user->rights->service->creer && $object->type == 1) $permtoedit=1; + if ($user->rights->produit->creer && $object->type == Product::TYPE_PRODUCT) $permtoedit=1; + if ($user->rights->service->creer && $object->type == Product::TYPE_SERVICE) $permtoedit=1; if (empty($conf->global->MAIN_UPLOAD_DOC)) $permtoedit=0; /* ************************************************************************** */ diff --git a/htdocs/product/price.php b/htdocs/product/price.php index f6cd6187e85..da61ccc45b8 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -347,7 +347,7 @@ llxHeader("", "", $langs->trans("CardProduct" . $object->type)); $head = product_prepare_head($object, $user); $titre = $langs->trans("CardProduct" . $object->type); -$picto = ($object->type == 1 ? 'service' : 'product'); +$picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product'); dol_fiche_head($head, 'price', $titre, 0, $picto); print ''; diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php index 9600e6c0a44..788068ea5ec 100644 --- a/htdocs/product/stats/card.php +++ b/htdocs/product/stats/card.php @@ -69,7 +69,7 @@ if (! empty($id) || ! empty($ref)) { $head=product_prepare_head($object, $user); $titre=$langs->trans("CardProduct".$object->type); - $picto=($object->type==1?'service':'product'); + $picto=($object->type==Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'stats', $titre, 0, $picto); diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index 49a443938ab..a1e538f4559 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -91,7 +91,7 @@ if ($id > 0 || ! empty($ref)) { $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); - $picto=($product->type==1?'service':'product'); + $picto=($product->type==Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'referers', $titre, 0, $picto); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$product,$action); // Note that $action and $object may have been modified by hook diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 8cbdea41495..1b324d99bbf 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -98,7 +98,7 @@ if ($id > 0 || ! empty($ref)) { if ($result > 0) { $head = product_prepare_head($product, $user); $titre = $langs->trans("CardProduct" . $product->type); - $picto = ($product->type == 1 ? 'service' : 'product'); + $picto = ($product->type == Product::TYPE_SERVICE ? 'service' : 'product'); dol_fiche_head($head, 'referers', $titre, 0, $picto); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index 189ead2eaa2..aa535f02575 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -81,7 +81,7 @@ if ($id > 0 || ! empty($ref)) { $head=product_prepare_head($product,$user); $titre=$langs->trans("CardProduct".$product->type); - $picto=($product->type==1?'service':'product'); + $picto=($product->type==Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'referers', $titre, 0, $picto); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$product,$action); // Note that $action and $object may have been modified by hook diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 2ae8164b0f9..c0fa1481269 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -92,7 +92,7 @@ if ($id > 0 || ! empty($ref)) { $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); - $picto=($product->type==1?'service':'product'); + $picto=($product->type==Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'referers', $titre, 0, $picto); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$product,$action); // Note that $action and $object may have been modified by hook diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index 2e8e84621ba..275a2ff8604 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -93,7 +93,7 @@ if ($id > 0 || ! empty($ref)) { $head = product_prepare_head($product, $user); $titre = $langs->trans("CardProduct" . $product->type); - $picto = ($product->type == 1 ? 'service' : 'product'); + $picto = ($product->type == Product::TYPE_SERVICE ? 'service' : 'product'); dol_fiche_head($head, 'referers', $titre, 0, $picto); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index 10fd8247204..4eae4c238e1 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -91,7 +91,7 @@ if ($id > 0 || ! empty($ref)) { $head = product_prepare_head($product, $user); $titre = $langs->trans("CardProduct" . $product->type); - $picto = ($product->type == 1 ? 'service' : 'product'); + $picto = ($product->type == Product::TYPE_SERVICE ? 'service' : 'product'); dol_fiche_head($head, 'referers', $titre, 0, $picto); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index 1994b4ad6c2..c41fe590d18 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -117,7 +117,7 @@ class MouvementStock extends CommonObject // Define if we must make the stock change (If product type is a service or if stock is used also for services) $movestock=0; - if ($product->type != 1 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) $movestock=1; + if ($product->type != Product::TYPE_SERVICE || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) $movestock=1; if ($movestock && $entrepot_id > 0) // Change stock for current product, change for subproduct is done after { diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 044da6c9aa4..116fff88809 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -7,6 +7,7 @@ * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2014-2015 Cédric Gross + * Copyright (C) 2015 Marcos García * * 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 @@ -385,7 +386,7 @@ if ($id > 0 || $ref) { $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); - $picto=($product->type==1?'service':'product'); + $picto=($product->type==Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'stock', $titre, 0, $picto); dol_htmloutput_events(); diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 34b38fe8919..480f739285d 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -170,7 +170,7 @@ $formadmin=new FormAdmin($db); $head=product_prepare_head($product, $user); $titre=$langs->trans("CardProduct".$product->type); -$picto=($product->type==1?'service':'product'); +$picto=($product->type==Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'translation', $titre, 0, $picto); print '
';