diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 6439e3e003eb08a795b4d93c66f3e1f058c1df23..7c803a0b8a932b136620ce9f3131f35a9e1f6bcf 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -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