fix #21072: error message if deocument model not found
This commit is contained in:
parent
a06a5d0f65
commit
e04cd242b0
@ -54,7 +54,12 @@ if ($action == 'setnote_public' && !empty($permissionnote) && !GETPOST('cancel',
|
||||
$hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0));
|
||||
$hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0));
|
||||
|
||||
$result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
//see #21072: Update a public note with a "document model not found" is not really a problem : the PDF is not created/updated
|
||||
//but the note is saved, so just add a notification will be enought
|
||||
$resultGenDoc = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
if ($resultGenDoc < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
if ($result < 0) dol_print_error($db, $result);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user