Merge pull request #1961 from FHenry/3.6

Fix right and error management
This commit is contained in:
Laurent Destailleur 2014-10-18 14:15:13 +02:00
commit 3528049348
2 changed files with 3 additions and 3 deletions

View File

@ -422,10 +422,10 @@ if (empty($reshook))
$_error++; $_error++;
$action = ""; $action = "";
$mesg='<div class="error">'.$langs->trans("ErrorProductAlreadyExists",$object->ref); $mesg=$langs->trans("ErrorProductAlreadyExists",$object->ref);
$mesg.=' <a href="'.$_SERVER["PHP_SELF"].'?ref='.$object->ref.'">'.$langs->trans("ShowCardHere").'</a>.'; $mesg.=' <a href="'.$_SERVER["PHP_SELF"].'?ref='.$object->ref.'">'.$langs->trans("ShowCardHere").'</a>.';
$mesg.='</div>';
setEventMessage($mesg, 'errors'); setEventMessage($mesg, 'errors');
$object->fetch($id);
//dol_print_error($object->db); //dol_print_error($object->db);
} }
else else

View File

@ -467,7 +467,7 @@ else
} }
// Better buy price // Better buy price
if ($user->rights->produit->creer) if ($user->rights->fournisseur->lire)
{ {
print '<td align="right">'; print '<td align="right">';
if ($objp->minsellprice != '') if ($objp->minsellprice != '')