From 1baf25de3c279f3b2663238d7aecd0fc355cab07 Mon Sep 17 00:00:00 2001 From: Christophe Battarel <christophe.battarel@altairis.fr> Date: Wed, 27 Jan 2016 12:04:00 +0100 Subject: [PATCH] FIX ISSUE #4506 : make working the PROPAL_CLONE_ON_CREATE_PAGE hidden constant --- htdocs/comm/propal.php | 3 ++- htdocs/comm/propal/class/propal.class.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 08106bc2151..a637e4a87fa 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -293,7 +293,8 @@ if (empty($reshook)) $object->note = GETPOST('note'); $object->statut = 0; - $id = $object->create_from($user); + // the create is done below and further more the existing create_from function is quite hilarating + //$id = $object->create_from($user); } else { setEventMessage($langs->trans("ErrorFailedToCopyProposal", GETPOST('copie_propal')), 'errors'); } diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 372ac5d5a61..c7e4724d027 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -946,6 +946,7 @@ class Propal extends CommonObject */ function create_from($user) { + // i love this function because $this->products is not used in create function... $this->products=$this->lines; return $this->create($user); -- GitLab