Merge pull request #4507 from altatof/PROPAL_CLONE_ON_CREATE_PAGE

FIX ISSUE #4506 : make working the PROPAL_CLONE_ON_CREATE_PAGE hidden constant
This commit is contained in:
Laurent Destailleur 2016-02-14 21:59:04 +01:00
commit 04b390f21c
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);