Skip to content

Commit

Permalink
Avoid missing class error for fetch_thirdparty method
Browse files Browse the repository at this point in the history
  • Loading branch information
jfefe committed Oct 6, 2014
1 parent c73f4a1 commit 87fc27c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions htdocs/core/class/commonobject.class.php
Expand Up @@ -576,6 +576,9 @@ function fetch_thirdparty()

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
Expand Down

0 comments on commit 87fc27c

Please sign in to comment.