2
0
forked from Wavyzz/dolibarr

FIX fetch of product with modulebuilder load too much data

This commit is contained in:
Laurent Destailleur
2021-09-20 15:59:39 +02:00
parent 1e735c48aa
commit c75fbb7642

View File

@@ -7296,7 +7296,11 @@ abstract class CommonObject
dol_include_once($InfoFieldList[1]);
if ($classname && class_exists($classname)) {
$object = new $classname($this->db);
$object->fetch($value);
if ($object->element === 'product') { // Special cas for product because default valut of fetch are wrong
$object->fetch($value, '', '', '', 0, 1, 1);
} else {
$object->fetch($value);
}
$value = $object->getNomUrl($getnomurlparam, $getnomurlparam2);
}
} else {