Skip to content
Snippets Groups Projects
Commit c85b7932 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge remote-tracking branch 'origin/3.7' into 3.8

Conflicts:
	htdocs/core/class/commonobject.class.php
parents 834f0b20 a9aab754
No related branches found
No related tags found
No related merge requests found
...@@ -286,7 +286,7 @@ if (empty($reshook)) ...@@ -286,7 +286,7 @@ if (empty($reshook))
{ {
$db->begin(); $db->begin();
// Si on a selectionne une propal a copier, on realise la copie // If we select proposal to clone during creation (when option PROPAL_CLONE_ON_CREATE_PAGE is on)
if (GETPOST('createmode') == 'copy' && GETPOST('copie_propal')) if (GETPOST('createmode') == 'copy' && GETPOST('copie_propal'))
{ {
if ($object->fetch(GETPOST('copie_propal')) > 0) { if ($object->fetch(GETPOST('copie_propal')) > 0) {
...@@ -314,7 +314,8 @@ if (empty($reshook)) ...@@ -314,7 +314,8 @@ if (empty($reshook))
$object->fk_incoterms = GETPOST('incoterm_id', 'int'); $object->fk_incoterms = GETPOST('incoterm_id', 'int');
$object->location_incoterms = GETPOST('location_incoterms', 'alpha'); $object->location_incoterms = GETPOST('location_incoterms', 'alpha');
$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 { } else {
setEventMessage($langs->trans("ErrorFailedToCopyProposal", GETPOST('copie_propal')), 'errors'); setEventMessage($langs->trans("ErrorFailedToCopyProposal", GETPOST('copie_propal')), 'errors');
} }
......
...@@ -1048,6 +1048,7 @@ class Propal extends CommonObject ...@@ -1048,6 +1048,7 @@ class Propal extends CommonObject
*/ */
function create_from($user) function create_from($user)
{ {
// i love this function because $this->products is not used in create function...
$this->products=$this->lines; $this->products=$this->lines;
return $this->create($user); return $this->create($user);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment