Avoid missing class error for fetch_thirdparty method

This commit is contained in:
jfefe
2014-10-06 13:31:01 +02:00
parent c73f4a14ee
commit 87fc27c7e6

View File

@@ -576,6 +576,9 @@ abstract class CommonObject
if (empty($this->socid)) return 0;
if (!class_exists('Societe'))
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
$thirdparty = new Societe($this->db);
$result=$thirdparty->fetch($this->socid);
$this->client = $thirdparty; // deprecated