From 2a68836375fd0cdb9f1b03068fcfdfac0f61711b Mon Sep 17 00:00:00 2001 From: IC-Florian <71641704+IC-Florian@users.noreply.github.com> Date: Thu, 22 Dec 2022 14:52:03 +0100 Subject: [PATCH] New require for product in generateOutputField --- htdocs/core/class/html.formsetup.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/class/html.formsetup.class.php b/htdocs/core/class/html.formsetup.class.php index 1cfddb588fd..4f88c597178 100644 --- a/htdocs/core/class/html.formsetup.class.php +++ b/htdocs/core/class/html.formsetup.class.php @@ -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) {