diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php
index af4276bf0cd96727d61a6fc59471891480772f63..8f7ad2bd947f9d43b976eaa0f2d4f076a99f71bd 100644
--- a/htdocs/adherents/index.php
+++ b/htdocs/adherents/index.php
@@ -237,11 +237,14 @@ if ($resql)
 			$staticmember->id=$obj->rowid;
 			$staticmember->lastname=$obj->lastname;
 			$staticmember->firstname=$obj->firstname;
-			if (! empty($obj->fk_soc)) {
-				$staticmember->socid = $obj->fk_soc;
+			if (! empty($obj->fk_soc))
+			{
+				$staticmember->fk_soc = $obj->fk_soc;
 				$staticmember->fetch_thirdparty();
 				$staticmember->name=$staticmember->thirdparty->name;
-			} else {
+			}
+			else
+			{
 				$staticmember->name=$obj->company;
 			}
 			$staticmember->ref=$staticmember->getFullName($langs);
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 29bbbebaad9a81bf57f9189b4ce01fbe842c44c4..d40544217c65ba5ab0201bf21bdb4ef3a9b7f4f4 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -590,7 +590,7 @@ abstract class CommonObject
     }
 
     /**
-     *    	Load the third party of object from id $this->socid into this->thirdpary
+     *    	Load the third party of object, from id $this->socid or $this->fk_soc, into this->thirdpary
      *
      *		@return		int					<0 if KO, >0 if OK
      */
@@ -598,10 +598,10 @@ abstract class CommonObject
     {
         global $conf;
 
-        if (empty($this->socid)) return 0;
+        if (empty($this->socid) && empty($this->fk_soc)) return 0;
 
         $thirdparty = new Societe($this->db);
-        $result=$thirdparty->fetch($this->socid);
+        $result=$thirdparty->fetch(isset($this->socid)?$this->socid:$this->fk_soc);
         $this->client = $thirdparty;  // deprecated
         $this->thirdparty = $thirdparty;