FIX ISSUE #4506 : make working the PROPAL_CLONE_ON_CREATE_PAGE hidden

constant
This commit is contained in:
Christophe Battarel 2016-01-27 12:04:00 +01:00
parent bd69830cbd
commit 1baf25de3c
2 changed files with 3 additions and 1 deletions

View File

@ -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');
}

View File

@ -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);