NEW add pdf regenration to mass action for shipments (#29970)

* Expedition: add PDF mass regen: add choice in mass actions

* Expedition: add PDF mass regen: fix php warnings

Fixing php warning to avoid blank page when mass PDF regenerating
This commit is contained in:
Yannis Hoareau 2024-06-19 20:36:02 +02:00 committed by GitHub
parent 617cd05603
commit fb05e2851f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -1150,7 +1150,7 @@ if (!$error && $massaction == 'generate_doc' && $permissiontoread) {
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && isset($objecttmp->default_lang)) {
$newlang = $objecttmp->default_lang; // for thirdparty
}
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && empty($objecttmp->thirdparty)) { //load lang from thirdparty
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && empty($objecttmp->thirdparty)) { //load lang from thirdparty
$objecttmp->fetch_thirdparty();
$newlang = $objecttmp->thirdparty->default_lang; // for proposal, order, invoice, ...
}

View file

@ -981,6 +981,7 @@ $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters,
$param .= $hookmanager->resPrint;
$arrayofmassactions = array(
'generate_doc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
'builddoc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
'classifyclose' => img_picto('', 'stop-circle', 'class="pictofixedwidth"').$langs->trans("Close"),
'presend' => img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),