New require for product in generateOutputField

This commit is contained in:
IC-Florian 2022-12-22 14:52:03 +01:00 committed by GitHub
parent 17efd55af4
commit 2a68836375
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1103,6 +1103,9 @@ class FormSetupItem
$out.= $this->langs->trans("NorProspectNorCustomer");
}
} elseif ($this->type == 'product') {
if (!class_exists("Product")){
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
}
$product = new Product($this->db);
$resprod = $product->fetch($this->fieldValue);
if ($resprod > 0) {