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

This commit is contained in:
Laurent Destailleur 2014-12-18 10:10:09 +01:00
commit 87ec59a05c
2 changed files with 11 additions and 9 deletions

View File

@ -90,18 +90,20 @@ $hookmanager->initHooks(array('expeditioncard','globalcard'));
*/
$warehousecanbeselectedlater=1;
if (! empty($conf->productbatch->enabled))
if (($action == 'create') || ($action == 'add'))
{
if (! (GETPOST('entrepot_id','int') > 0))
if (! empty($conf->productbatch->enabled))
{
$langs->load("errors");
setEventMessage($langs->trans("WarehouseMustBeSelectedAtFirstStepWhenProductBatchModuleOn"),'errors');
header("Location: ".DOL_URL_ROOT.'/expedition/shipment.php?id='.$id);
exit;
if (! (GETPOST('entrepot_id','int') > 0))
{
$langs->load("errors");
setEventMessage($langs->trans("WarehouseMustBeSelectedAtFirstStepWhenProductBatchModuleOn"),'errors');
header("Location: ".DOL_URL_ROOT.'/expedition/shipment.php?id='.$id);
exit;
}
}
}
$parameters=array();
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');

View File

@ -53,8 +53,8 @@ if ($soapclient)
$authentication=array(
'dolibarrkey'=>$conf->global->WEBSERVICES_KEY,
'sourceapplication'=>'DEMO',
'login'=>'admin_dolibarDev',
'password'=>'homedread',
'login'=>'admin',
'password'=>'changeme',
'entity'=>'1');