diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 460e9d5ee45..e7e8f1e4999 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -458,6 +458,10 @@ if ($resql) if($type == Product::TYPE_SERVICE) $rightskey='service'; if($user->rights->{$rightskey}->creer) { + if ($type === "") { + $newcardbutton.= dolGetButtonTitle($langs->trans('NewProduct'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type=0'); + $type = Product::TYPE_SERVICE; + } $label='NewProduct'; if($type == Product::TYPE_SERVICE) $label='NewService'; $newcardbutton.= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type='.$type);