diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index dc10152beb6..1aa9baf562f 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -7,6 +7,7 @@ * Copyright (C) 2024 MDW * Copyright (C) 2025 Frédéric France * Copyright (C) 2025 Alexandre Spangaro + * Copyright (C) 2025 Charlene Benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -937,6 +938,13 @@ class modCategorie extends DolibarrModules */ public function init($options = '') { + if (isModEnabled("invoice")) { + $this->_load_tables('/install/mysql/', 'facture'); + } + if (isModEnabled("order")) { + $this->_load_tables('/install/mysql/', 'commande'); + } + // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modCommande.class.php b/htdocs/core/modules/modCommande.class.php index 0cb76c36513..ec760130681 100644 --- a/htdocs/core/modules/modCommande.class.php +++ b/htdocs/core/modules/modCommande.class.php @@ -456,6 +456,8 @@ class modCommande extends DolibarrModules { global $conf, $langs; + $this->_load_tables('/install/mysql/', 'commande'); + // Permissions $this->remove($options); diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index 62d52029dd2..2f06ce702fc 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -775,6 +775,8 @@ class modFacture extends DolibarrModules { global $conf, $langs; + $this->_load_tables('/install/mysql/', 'facture'); + // Remove permissions and default values $this->remove($options);