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

Conflicts:
	htdocs/filefunc.inc.php
This commit is contained in:
Laurent Destailleur 2018-01-26 12:10:13 +01:00
commit d4e15545b4
2 changed files with 9 additions and 3 deletions

View File

@ -40,7 +40,13 @@ if (($id > 0 || (! empty($ref) && ! in_array($action, array('create', 'createtas
}
else
{
if (empty($object->error) && ! count($object->errors)) setEventMessages('Fetch on object return an error without filling $object->error nor $object->errors', null, 'errors');
if (empty($object->error) && ! count($object->errors))
{
if ($ret < 0) // if $ret == 0, it means not found.
{
setEventMessages('Fetch on object (type '.get_class($object).') return an error without filling $object->error nor $object->errors', null, 'errors');
}
}
else setEventMessages($object->error, $object->errors, 'errors');
$action='';
}

View File

@ -302,7 +302,7 @@ $listofreferent=array(
'class'=>'CommandeFournisseur',
'table'=>'commande_fournisseur',
'datefieldname'=>'date_commande',
'urlnew'=>DOL_URL_ROOT.'/fourn/commande/card.php?action=create&projectid='.$id.'&socid='.$socid,
'urlnew'=>DOL_URL_ROOT.'/fourn/commande/card.php?action=create&projectid='.$id, // No socid parameter here, the socid is often the customer and we create a supplier object
'lang'=>'suppliers',
'buttonnew'=>'AddSupplierOrder',
'testnew'=>$user->rights->fournisseur->commande->creer,
@ -314,7 +314,7 @@ $listofreferent=array(
'margin'=>'minus',
'table'=>'facture_fourn',
'datefieldname'=>'datef',
'urlnew'=>DOL_URL_ROOT.'/fourn/facture/card.php?action=create&projectid='.$id,
'urlnew'=>DOL_URL_ROOT.'/fourn/facture/card.php?action=create&projectid='.$id, // No socid parameter here, the socid is often the customer and we create a supplier object
'lang'=>'suppliers',
'buttonnew'=>'AddSupplierInvoice',
'testnew'=>$user->rights->fournisseur->facture->creer,