From c5349a07a74d417892528c86f01585184cf03051 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 9 Nov 2020 08:56:23 +0100 Subject: [PATCH] Fix generation of PDF for recruitment module --- .../recruitment/class/recruitmentcandidature.class.php | 9 ++++----- .../recruitment/class/recruitmentjobposition.class.php | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php index 58d253abfbe..f52f173820c 100644 --- a/htdocs/recruitment/class/recruitmentcandidature.class.php +++ b/htdocs/recruitment/class/recruitmentcandidature.class.php @@ -1006,12 +1006,11 @@ class RecruitmentCandidature extends CommonObject $langs->load("recruitment@recruitment"); if (!dol_strlen($modele)) { - $modele = 'standard_recruitmentcandidature'; - - if (!empty($this->modelpdf)) { - $modele = $this->modelpdf; - } elseif (!empty($conf->global->RECRUITMENTCANDIDATURE_ADDON_PDF)) { + if (!empty($conf->global->RECRUITMENTCANDIDATURE_ADDON_PDF)) + { $modele = $conf->global->RECRUITMENTCANDIDATURE_ADDON_PDF; + } else { + $modele = ''; // No default value. For job application, we allow to disable all PDF generation } } diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php index 5ceca15e951..9bff9e5be15 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -1092,12 +1092,11 @@ class RecruitmentJobPosition extends CommonObject $langs->load("recruitment"); if (!dol_strlen($modele)) { - $modele = 'standard_recruitmentjobposition'; - - if ($this->model_pdf) { - $modele = $this->model_pdf; - } elseif (!empty($conf->global->RECRUITMENTJOBPOSITION_ADDON_PDF)) { + if (!empty($conf->global->RECRUITMENTJOBPOSITION_ADDON_PDF)) + { $modele = $conf->global->RECRUITMENTJOBPOSITION_ADDON_PDF; + } else { + $modele = ''; // No default value. For job position, we allow to disable all PDF generation } }