From 0577fe44a4903520386c75843d0a289a9e5a3695 Mon Sep 17 00:00:00 2001 From: HENRY Florian Date: Thu, 21 Nov 2024 17:13:22 +0100 Subject: [PATCH] FIX: when create intervention from propal (or other object), element link is mising after creation (#32035) * fix: when create intervention from propal, element link is mising * fix: when create intervention from propal, element link is mising * fix: when create intervention from propal, element link is mising --- htdocs/fichinter/card.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index eed887b616c00..c29768f40c396 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -844,7 +844,7 @@ $res = $soc->fetch($socid); } - if (GETPOSTINT('origin') && GETPOSTINT('originid')) { + if (GETPOST('origin', 'alphanohtml') && GETPOSTINT('originid')) { // Parse element/subelement (ex: project_task) $regs = array(); $element = $subelement = GETPOST('origin', 'alphanohtml'); @@ -1011,6 +1011,7 @@ if (!empty($origin) && !empty($originid) && is_object($objectsrc)) { $newclassname = $classname; if ($newclassname == 'Propal') { + $langs->load('propal'); $newclassname = 'CommercialProposal'; } print ''.$langs->trans($newclassname).''.$objectsrc->getNomUrl(1).''; @@ -1054,7 +1055,7 @@ print $form->buttonsSaveCancel("CreateDraftIntervention"); // Show origin lines - if (!empty($origin) && !empty($originid) && is_object($objectsrc)) { + if (!empty($origin) && !empty($originid) && is_object($objectsrc) && !getDolGlobalInt('FICHINTER_DISABLE_DETAILS')) { $title = $langs->trans('Services'); print load_fiche_titre($title);