FIX : Societe::set_parent() function needs societe object to be fetched to update parent

This commit is contained in:
Gauthier 2015-10-15 16:48:52 +02:00
parent e79fe7401f
commit 2c6aeac64f
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'));
}