Fix error message
This commit is contained in:
parent
4a5cdd0092
commit
5ed2bbb204
@ -435,16 +435,11 @@ if (empty($reshook))
|
||||
|
||||
$result = $object->valid($user);
|
||||
|
||||
if ($result < 0)
|
||||
{
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans($object->error), $object->errors, 'errors');
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
// Define output language
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||
{
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||
$outputlangs = $langs;
|
||||
$newlang = '';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09');
|
||||
|
||||
@ -204,6 +204,7 @@ class MouvementStock extends CommonObject
|
||||
{
|
||||
if (empty($batch))
|
||||
{
|
||||
$langs->load("errors");
|
||||
$this->errors[] = $langs->transnoentitiesnoconv("ErrorTryToMakeMoveOnProductRequiringBatchData", $product->ref);
|
||||
dol_syslog("Try to make a movement of a product with status_batch on without any batch data");
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user