--- /tmp/dsg/dolibarr/htdocs/core/modules/stock/github_19.0.3_modules_stock.php
+++ /tmp/dsg/dolibarr/htdocs/core/modules/stock/client_modules_stock.php
@@ -26,24 +26,4 @@
-	/**

-	 * @var DoliDb Database handler

-	 */

-	public $db;

-

-	/**

-	 * @var string model name

-	 */

-	public $name;

-

-	/**

-	 * @var string model description (short text)

-	 */

-	public $description;

-

-	/**

-	 * @var string document type

-	 */

-	public $type;

-

-	/**

-	 * @var string		Dolibarr version of the loaded document

-	 */

-	public $version = 'dolibarr';

+    /**

+     * @var string Error code (or message)

+     */

+    public $error = '';

@@ -52,13 +32,12 @@
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps

-	/**

-	 *  Return list of active generation modules

-	 *

-	 *  @param  DoliDB      $db                 Database handler

-	 *  @param  integer     $maxfilenamelength  Max length of value to show

-	 *  @return array                           List of templates

-	 */

-	public static function liste_modeles($db, $maxfilenamelength = 0)

-	{

-		// phpcs:enable

-		$type = 'stock';

-		$list = array();

+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps

+    /**

+     *  Return list of active generation modules

+     *

+     *  @param  DoliDB      $db                 Database handler

+     *  @param  integer     $maxfilenamelength  Max length of value to show

+     *  @return array                           List of templates

+     */

+    public static function liste_modeles($db, $maxfilenamelength = 0)

+    {

+        // phpcs:enable

+        global $conf;

@@ -66,2 +45,2 @@
-		include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';

-		$list = getListOfModels($db, $type, $maxfilenamelength);

+        $type = 'stock';

+        $liste = array();

@@ -69,2 +48,5 @@
-		return $list;

-	}

+        include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';

+        $liste = getListOfModels($db, $type, $maxfilenamelength);

+

+        return $liste;

+    }