Merge pull request #11801 from jtraulle/fix-11682-10.0
Fix #11683 Correct links to create a new product or service from search results
This commit is contained in:
commit
d4fb1d134d
@ -450,6 +450,10 @@ if ($resql)
|
|||||||
if($type == Product::TYPE_SERVICE) $rightskey='service';
|
if($type == Product::TYPE_SERVICE) $rightskey='service';
|
||||||
if($user->rights->{$rightskey}->creer)
|
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';
|
$label='NewProduct';
|
||||||
if($type == Product::TYPE_SERVICE) $label='NewService';
|
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);
|
$newcardbutton.= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&type='.$type);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user