From eeffe4ed34aa28d149a1234fac2b1e5521fc8996 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 16 Oct 2014 13:57:07 +0200 Subject: [PATCH] Reload object when product clone failed (cause of ref already exists) if not done result is blanck pages (header wannot be rewrite (location herder index.php) around line 1542 --- htdocs/product/fiche.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index a73d5817b3a..7e5b9b76c78 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -422,10 +422,10 @@ if (empty($reshook)) $_error++; $action = ""; - $mesg='
'.$langs->trans("ErrorProductAlreadyExists",$object->ref); + $mesg=$langs->trans("ErrorProductAlreadyExists",$object->ref); $mesg.=' '.$langs->trans("ShowCardHere").'.'; - $mesg.='
'; setEventMessage($mesg, 'errors'); + $object->fetch($id); //dol_print_error($object->db); } else