Fix: Not SetEventMessages inside a CRUD class.

This commit is contained in:
Laurent Destailleur 2022-04-29 14:32:47 +02:00
parent 921aabfc54
commit 223db9bb76

View File

@ -419,7 +419,8 @@ class Paiement extends CommonObject
} }
if ($error) { if ($error) {
setEventMessages($discount->error, $discount->errors, 'errors'); $this->error = $discount->error;
$this->errors = $discount->errors;
$error++; $error++;
} }
} }
@ -460,7 +461,8 @@ class Paiement extends CommonObject
$result = $invoice->generateDocument($invoice->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); $result = $invoice->generateDocument($invoice->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
if ($result < 0) { if ($result < 0) {
setEventMessages($invoice->error, $invoice->errors, 'errors'); $this->error = $invoice->error;
$this->errors = $invoice->errors;
$error++; $error++;
} }
} }