From 5e27e2e1d1fd24d3136697b5477cd2d20b555b07 Mon Sep 17 00:00:00 2001 From: atm-jonathan <146709163+atm-jonathan@users.noreply.github.com> Date: Mon, 23 Mar 2026 14:27:37 +0100 Subject: [PATCH] fix Fatal error: Uncaught Error: Call to a member function formSelectWarehouses() (#37584) --- htdocs/commande/list_det.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php index 42f724870ba..860cd0de9ba 100644 --- a/htdocs/commande/list_det.php +++ b/htdocs/commande/list_det.php @@ -1897,6 +1897,10 @@ if ($resql) { if ($obj->warehouse > 0) { print img_picto('', 'stock', 'class="paddingrightonly"'); } + if (!is_object($formproduct)) { + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + $formproduct = new FormProduct($db); + } $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'], $obj->warehouse, 'none'); print "\n"; if (!$i) {