From 1f43882bb70fa1b021a990fd6012b322e9b14255 Mon Sep 17 00:00:00 2001 From: wdammak <26695620+wdammak@users.noreply.github.com> Date: Tue, 22 May 2018 01:09:52 +0100 Subject: [PATCH 1/2] Add liste_modeles to warehouse module --- htdocs/core/class/html.formfile.class.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index dbdb7edf760..c3460989d82 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -478,6 +478,24 @@ class FormFile $modellist=ModelePDFProductBatch::liste_modeles($this->db); } } + elseif ($modulepart == 'stock') + { + if (is_array($genallowed)) $modellist=$genallowed; + else + { + include_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_stock.class.php'; + $modellist=ModelePDFStock::liste_modeles($this->db); + } + } + elseif ($modulepart == 'mouvement') + { + if (is_array($genallowed)) $modellist=$genallowed; + else + { + include_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_stock.class.php'; + $modellist=ModelePDFMouvement::liste_modeles($this->db); + } + } elseif ($modulepart == 'export') { if (is_array($genallowed)) $modellist=$genallowed; From 3d71ce82978091b6b837652a25d51ccd690799d7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 25 May 2018 11:19:38 +0200 Subject: [PATCH 2/2] Update html.formfile.class.php --- htdocs/core/class/html.formfile.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index c3460989d82..dc02f956a3d 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -483,17 +483,17 @@ class FormFile if (is_array($genallowed)) $modellist=$genallowed; else { - include_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_stock.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_stock.php'; $modellist=ModelePDFStock::liste_modeles($this->db); } } - elseif ($modulepart == 'mouvement') + elseif ($modulepart == 'movement') { if (is_array($genallowed)) $modellist=$genallowed; else { - include_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_stock.class.php'; - $modellist=ModelePDFMouvement::liste_modeles($this->db); + include_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_movement.php'; + $modellist=ModelePDFMovement::liste_modeles($this->db); } } elseif ($modulepart == 'export')