Merge branch '3.4' of git@github.com:Dolibarr/dolibarr.git into 3.4

This commit is contained in:
Laurent Destailleur 2013-05-29 22:42:48 +02:00
commit e6bca3c549
2 changed files with 4 additions and 5 deletions

View File

@ -1283,7 +1283,7 @@ if ($action == 'create')
}
else
{
if ($id > 0)
if ($id > 0 || ! empty($ref))
{
/* *************************************************************************** */
/* */
@ -1295,7 +1295,7 @@ else
$productstatic = new Product($db);
$object->fetch($id);
$object->fetch($id,$ref);
$result=$object->fetch_thirdparty();
if ($result < 0) dol_print_error($db);

View File

@ -47,15 +47,14 @@ if ($id > 0) $object->fetch($id);
/******************************************************************************/
/* Actions */
/******************************************************************************/
if ($action == 'setnote_public' && $user->rights->propale->creer)
if ($action == 'setnote_public' && $user->rights->societe->creer)
{
$object->fetch($id);
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public');
if ($result < 0) setEventMessage($object->error,'errors');
}
else if ($action == 'setnote_private' && $user->rights->propale->creer)
else if ($action == 'setnote_private' && $user->rights->societe->creer)
{
$object->fetch($id);
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private');