diff --git a/htdocs/product/agenda.php b/htdocs/product/agenda.php
index ed5d456b3a54a..8e15448517842 100644
--- a/htdocs/product/agenda.php
+++ b/htdocs/product/agenda.php
@@ -160,7 +160,7 @@
$picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product');
print dol_get_fiche_head($head, 'agenda', $titre, -1, $picto);
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = ''.$langs->trans("BackToList").'';
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$shownav = 1;
diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php
index f7ea2478da7c9..25ac2d9366411 100644
--- a/htdocs/product/composition/card.php
+++ b/htdocs/product/composition/card.php
@@ -226,7 +226,7 @@
* Product card
*/
if ($user->rights->produit->lire || $user->hasRight('service', 'lire')) {
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
diff --git a/htdocs/product/document.php b/htdocs/product/document.php
index f7753432043cf..c38e30123d0d5 100644
--- a/htdocs/product/document.php
+++ b/htdocs/product/document.php
@@ -239,7 +239,7 @@
}
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = ''.$langs->trans("BackToList").'';
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$shownav = 1;
diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index b36c134d20b52..5812b019726f6 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -390,7 +390,7 @@
print dol_get_fiche_head($head, 'suppliers', $titre, -1, $picto);
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = ''.$langs->trans("BackToList").'';
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$shownav = 1;
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index c8295800dcc64..e99857ee45406 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -848,11 +848,11 @@
$params['forcenohideoftext'] = 1;
}
-if ($type === "" || $type == Product::TYPE_PRODUCT) {
+if ((isModEnabled('product') && $type === "") || $type == Product::TYPE_PRODUCT) {
$label = 'NewProduct';
$newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type=0', '', $perm, $params);
}
-if ($type === "" || $type == Product::TYPE_SERVICE) {
+if ((isModEnabled('service') && $type === "") || $type == Product::TYPE_SERVICE) {
$label = 'NewService';
$newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type=1', '', $perm, $params);
}
diff --git a/htdocs/product/note.php b/htdocs/product/note.php
index f8dab5e6bf389..13a611e9f2506 100644
--- a/htdocs/product/note.php
+++ b/htdocs/product/note.php
@@ -122,7 +122,7 @@
print dol_get_fiche_head($head, 'note', $titre, -1, $picto);
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = ''.$langs->trans("BackToList").'';
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$shownav = 1;
diff --git a/htdocs/product/price.php b/htdocs/product/price.php
index 9dc217f782c8e..33f26a0dd3938 100644
--- a/htdocs/product/price.php
+++ b/htdocs/product/price.php
@@ -866,7 +866,7 @@
print dol_get_fiche_head($head, 'price', $titre, -1, $picto);
-$linkback = ''.$langs->trans("BackToList").'';
+$linkback = ''.$langs->trans("BackToList").'';
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$shownav = 1;
diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php
index a91927e77d4d1..93e3ef2d3e2b6 100644
--- a/htdocs/product/stats/card.php
+++ b/htdocs/product/stats/card.php
@@ -151,7 +151,7 @@
print dol_get_fiche_head($head, 'stats', $titre, -1, $picto);
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = ''.$langs->trans("BackToList").'';
dol_banner_tab($object, 'ref', $linkback, ($user->socid ? 0 : 1), 'ref', '', '', '', 0, '', '', 1);
diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php
index c5209b725b574..2c9befc5c4e9c 100644
--- a/htdocs/product/stats/facture.php
+++ b/htdocs/product/stats/facture.php
@@ -128,7 +128,7 @@
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
}
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index d52b15ca3079c..fe9d71aa52681 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -611,7 +611,7 @@
dol_htmloutput_events();
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
if ($user->socid && !in_array('stock', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php
index 1544df1ca2ca1..8fc7c41569225 100644
--- a/htdocs/product/traduction.php
+++ b/htdocs/product/traduction.php
@@ -212,7 +212,7 @@
print dol_get_fiche_head($head, 'translation', $titre, 0, $picto);
-$linkback = ''.$langs->trans("BackToList").'';
+$linkback = ''.$langs->trans("BackToList").'';
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {