FIX error report not returned

This commit is contained in:
Laurent Destailleur 2019-02-01 19:19:23 +01:00
parent c313ad6195
commit ebe30f7a0e
6 changed files with 12 additions and 3 deletions

View File

@ -319,6 +319,7 @@ class Mailing extends CommonObject
if ($result < 0)
{
$this->error=$object->error;
$this->errors=array_merge($this->errors, $object->errors);
$error++;
}

View File

@ -1285,7 +1285,12 @@ class Propal extends CommonObject
// Create clone
$object->context['createfromclone']='createfromclone';
$result=$object->create($user);
if ($result < 0) $error++;
if ($result < 0)
{
$this->error = $object->error;
$this->errors = array_merge($this->errors, $object->errors);
$error++;
}
if (! $error)
{

View File

@ -4951,7 +4951,7 @@ abstract class CommonObject
if ($this->array_options[$key] === '') $mandatorypb=true;
if ($mandatorypb)
{
dol_syslog($this->error);
dol_syslog("Mandatory extra field ".$key." is empty");
$this->errors[]=$langs->trans('ErrorFieldRequired', $attributeLabel);
return -1;
}

View File

@ -356,6 +356,7 @@ class Productbatch extends CommonObject
if ($result < 0)
{
$this->error=$object->error;
$this->errors=array_merge($this->errors, $object->errors);
$error++;
}

View File

@ -924,7 +924,8 @@ class Productcustomerprice extends CommonObject
// Other options
if ($result < 0) {
$this->error = $object->error;
$error ++;
$this->errors=array_merge($this->errors, $object->errors);
$error++;
}
if (! $error) {

View File

@ -589,6 +589,7 @@ class Propalmergepdfproduct extends CommonObject
if ($result < 0)
{
$this->error=$object->error;
$this->errors=array_merge($this->errors, $object->errors);
$error++;
}