Merge pull request #3744 from atm-gauthier/3.8_fix_thirdparty_parent

FIX : Societe::set_parent() function needs societe object to be fetch…
This commit is contained in:
Laurent Destailleur 2015-10-17 10:37:36 +02:00
commit bba8db2b60
2 changed files with 2 additions and 0 deletions

View File

@ -2468,6 +2468,7 @@ class Societe extends CommonObject
$resql=$this->db->query($sql);
if ($resql)
{
$this->parent = $id;
return 1;
}
else

View File

@ -649,6 +649,7 @@ if (empty($reshook))
// Set parent company
if ($action == 'set_thirdparty' && $user->rights->societe->creer)
{
$object->fetch($socid);
$result = $object->set_parent(GETPOST('editparentcompany','int'));
}