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:
commit
bba8db2b60
@ -2468,6 +2468,7 @@ class Societe extends CommonObject
|
|||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
$this->parent = $id;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -649,6 +649,7 @@ if (empty($reshook))
|
|||||||
// Set parent company
|
// Set parent company
|
||||||
if ($action == 'set_thirdparty' && $user->rights->societe->creer)
|
if ($action == 'set_thirdparty' && $user->rights->societe->creer)
|
||||||
{
|
{
|
||||||
|
$object->fetch($socid);
|
||||||
$result = $object->set_parent(GETPOST('editparentcompany','int'));
|
$result = $object->set_parent(GETPOST('editparentcompany','int'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user