diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php index 757c8919e83..3711518795b 100644 --- a/htdocs/barcode/printsheet.php +++ b/htdocs/barcode/printsheet.php @@ -255,10 +255,18 @@ if ($action == 'builddoc') { if (!$mesg) { $outputlangs = $langs; + $previousConf = getDolGlobalInt('TCPDF_THROW_ERRORS_INSTEAD_OF_DIE'); + $conf->global->TCPDF_THROW_ERRORS_INSTEAD_OF_DIE = 1; + // This generates and send PDF to output // TODO Move - $result = doc_label_pdf_create($db, $arrayofrecords, $modellabel, $outputlangs, $diroutput, $template, dol_sanitizeFileName($outfile)); + try { + $result = doc_label_pdf_create($db, $arrayofrecords, $modellabel, $outputlangs, $diroutput, $template, dol_sanitizeFileName($outfile)); + } catch (Exception $e) { + $mesg = $langs->trans('ErrorGeneratingBarcode'); + } + $conf->global->TCPDF_THROW_ERRORS_INSTEAD_OF_DIE = $previousConf; } } diff --git a/htdocs/core/ajax/selectsearchbox.php b/htdocs/core/ajax/selectsearchbox.php index 05f8c8d215e..987701edf42 100644 --- a/htdocs/core/ajax/selectsearchbox.php +++ b/htdocs/core/ajax/selectsearchbox.php @@ -95,7 +95,7 @@ if (isModEnabled('mrp') && $user->hasRight('mrp', 'read') && empty($conf->global if (isModEnabled('project') && empty($conf->global->MAIN_SEARCHFORM_PROJECT_DISABLED) && $user->hasRight('projet', 'lire')) { $arrayresult['searchintoprojects'] = array('position'=>40, 'shortcut'=>'Q', 'img'=>'object_project', 'label'=>$langs->trans("SearchIntoProjects", $search_boxvalue), 'text'=>img_picto('', 'object_project', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); } -if (isModEnabled('project') && empty($conf->global->MAIN_SEARCHFORM_TASK_DISABLED) && $user->hasRight('projet', 'lire')) { +if (isModEnabled('project') && empty($conf->global->MAIN_SEARCHFORM_TASK_DISABLED) && empty($conf->global->PROJECT_HIDE_TASKS) && $user->hasRight('projet', 'lire')) { $arrayresult['searchintotasks'] = array('position'=>45, 'img'=>'object_projecttask', 'label'=>$langs->trans("SearchIntoTasks", $search_boxvalue), 'text'=>img_picto('', 'object_projecttask', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoTasks", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/tasks/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); } diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 0b70d692356..df36376f541 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -907,14 +907,14 @@ class Notify // content will be sent. $mailTemplateLabel = isset($conf->global->{$notifcode.'_TEMPLATE'}) ? $conf->global->{$notifcode.'_TEMPLATE'} : ''; $emailTemplate = null; + // Set output language + $outputlangs = $langs; if (!empty($mailTemplateLabel)) { include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $formmail = new FormMail($this->db); $emailTemplate = $formmail->getEMailTemplate($this->db, $object_type.'_send', $user, $outputlangs, 0, 1, $labeltouse); } if (!empty($mailTemplateLabel) && is_object($emailTemplate) && $emailTemplate->id > 0) { - // Set output language - $outputlangs = $langs; if ($obj->default_lang && $obj->default_lang != $langs->defaultlang) { $outputlangs = new Translate('', $conf); $outputlangs->setDefaultLang($obj->default_lang); diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 257fd277514..baa71408fd6 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -553,14 +553,16 @@ function project_admin_prepare_head() $head[$h][2] = 'attributes'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/projet/admin/project_task_extrafields.php'; - $head[$h][1] = $langs->trans("ExtraFieldsProjectTask"); - $nbExtrafields = $extrafields->attributes['projet_task']['count']; - if ($nbExtrafields > 0) { - $head[$h][1] .= ''.$nbExtrafields.''; + if (empty($conf->global->PROJECT_HIDE_TASKS)) { + $head[$h][0] = DOL_URL_ROOT . '/projet/admin/project_task_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFieldsProjectTask"); + $nbExtrafields = $extrafields->attributes['projet_task']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= '' . $nbExtrafields . ''; + } + $head[$h][2] = 'attributes_task'; + $h++; } - $head[$h][2] = 'attributes_task'; - $h++; if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { $langs->load("members"); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index d37c8de7daa..1863ccd312a 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -878,13 +878,13 @@ Permission401=Read discounts Permission402=Create/modify discounts Permission403=Validate discounts Permission404=Delete discounts -Permission430=Use Debug Bar +Permission431=Use Debug Bar Permission511=Read salaries and payments (yours and subordinates) Permission512=Create/modify salaries and payments Permission514=Delete salaries and payments Permission517=Read salaries and payments everybody Permission519=Export salaries -Permission520=Read Loans +Permission521=Read Loans Permission522=Create/modify loans Permission524=Delete loans Permission525=Access loan calculator @@ -905,12 +905,12 @@ Permission609=Delete stickers Permission611=Read attributes of variants Permission612=Create/Update attributes of variants Permission613=Delete attributes of variants -Permission650=Read Bills of Materials -Permission651=Create/Update Bills of Materials -Permission652=Delete Bills of Materials -Permission660=Read Manufacturing Order (MO) -Permission661=Create/Update Manufacturing Order (MO) -Permission662=Delete Manufacturing Order (MO) +Permission651=Read Bills of Materials +Permission652=Create/Update Bills of Materials +Permission653=Delete Bills of Materials +Permission661=Read Manufacturing Order (MO) +Permission662=Create/Update Manufacturing Order (MO) +Permission663=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -982,7 +982,7 @@ Permission2515=Setup documents directories Permission2610=Generate/modify users API key Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) -Permission3200=Read archived events and fingerprints +Permission3201=Read archived events and fingerprints Permission3301=Generate new modules Permission4001=Read skill/job/position Permission4002=Create/modify skill/job/position @@ -1019,9 +1019,9 @@ Permission50152=Edit sales lines Permission50153=Edit ordered sales lines Permission50201=Read transactions Permission50202=Import transactions -Permission50330=Read objects of Zapier -Permission50331=Create/Update objects of Zapier -Permission50332=Delete objects of Zapier +Permission50331=Read objects of Zapier +Permission50332=Create/Update objects of Zapier +Permission50333=Delete objects of Zapier Permission50401=Bind products and invoices with accounting accounts Permission50411=Read operations in ledger Permission50412=Write/Edit operations in ledger @@ -1046,7 +1046,7 @@ Permission63002=Create/modify resources Permission63003=Delete resources Permission63004=Link resources to agenda events Permission64001=Allow direct printing -Permission67000=Allow printing of receipts +Permission67001=Allow printing of receipts Permission68001=Read intracomm report Permission68002=Create/modify intracomm report Permission68004=Delete intracomm report diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 6940ff6c467..0d14e5be1c4 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -320,6 +320,7 @@ ErrorFixThisHere=Fix this here ErrorTheUrlOfYourDolInstanceDoesNotMatchURLIntoOAuthSetup=Error: The URL of you current instance (%s) does not match the URL defined into your OAuth2 login setup (%s). Doing OAuth2 login in such a configuration is not allowed. ErrorMenuExistValue=A Menu already exist with this Title or URL ErrorSVGFilesNotAllowedAsLinksWithout=SVG files are not allowed as external links without the option %s +ErrorGeneratingBarcode=Error while generating the barcode (probably invalid code shape) ErrorTypeMenu=Impossible to add another menu for the same module on the navbar, not handle yet ErrorFailedToCreateSymLinkToMedias=Failed to create the symlinks %s to point to %s diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index 84fbfaf4a21..a30241dd3ce 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -319,6 +319,7 @@ ErrorFixThisHere= Corrigez ceci ici ErrorTheUrlOfYourDolInstanceDoesNotMatchURLIntoOAuthSetup=Erreur : L'URL de votre instance actuelle (%s) ne correspond pas à l'URL définie dans votre configuration de connexion OAuth2 (%s). La connexion OAuth2 dans une telle configuration n'est pas autorisée. ErrorMenuExistValue=Un menu existe déjà avec ce titre ou cette URL ErrorSVGFilesNotAllowedAsLinksWithout=Les fichiers SVG ne sont pas autorisés en tant que liens externes sans l'option %s +ErrorGeneratingBarcode=Erreur à la génération du code-barre (probablement une valeur invalide) ErrorTypeMenu=Impossible d'ajouter un autre menu pour le même module sur la barre de navigation, pas encore géré ErrorTableExist=Le tableau %s existe déjà ErrorDictionaryNotFound=Dictionnaire %s introuvable