From 8f54f06e122ecb5a026af59f86f028f873964170 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 Sep 2024 02:24:43 +0200 Subject: [PATCH 1/3] FIX #31076 Bad position of hooks --- htdocs/modulebuilder/template/myobject_list.php | 3 --- htdocs/product/stock/card.php | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index c5a342f1f24..c653d95d619 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -577,9 +577,6 @@ if (empty($reshook)) { if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 407d621e47c..1e2950c5431 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -758,10 +758,6 @@ if ($action == 'create') { //print ''.dol_print_date($objp->datem).''; print ''; - $parameters = array('obj' => $objp, 'totalarray' => &$totalarray); - $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - $productstatic->id = $objp->rowid; $productstatic->ref = $objp->ref; $productstatic->label = $objp->produit; @@ -842,6 +838,10 @@ if ($action == 'create') { print ""; } + $parameters = array('obj' => $objp, 'totalarray' => &$totalarray); + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print ""; $i++; From f6ae2815c1c3087c0fbab6669546a9b9ce76b783 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 Sep 2024 03:00:19 +0200 Subject: [PATCH 2/3] Fix missing translation --- htdocs/product/stats/card.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php index 8a6eca21ac8..231d24828c7 100644 --- a/htdocs/product/stats/card.php +++ b/htdocs/product/stats/card.php @@ -355,12 +355,14 @@ if ($result || !($id > 0)) { } if (isModEnabled('order')) { + $langs->load("orders"); $graphfiles['orders'] = array('modulepart' => 'productstats_orders', 'file' => $object->id.'/orders12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.($search_year > 0 ? '_year'.$search_year : '').'.png', 'label' => $langs->transnoentitiesnoconv($arrayforlabel[$mode], $langs->transnoentitiesnoconv("Orders"))); } if (isModEnabled('supplier_order')) { + $langs->load("orders"); $graphfiles['orderssuppliers'] = array('modulepart' => 'productstats_orderssuppliers', 'file' => $object->id.'/orderssuppliers12m'.((string) $type != '' ? '_type'.$type : '').'_'.$mode.($search_year > 0 ? '_year'.$search_year : '').'.png', 'label' => $langs->transnoentitiesnoconv($arrayforlabel[$mode], $langs->transnoentitiesnoconv("SuppliersOrders"))); From 6feefbb8c59387109425fc509b2d3ff08083aba6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 23 Sep 2024 03:16:12 +0200 Subject: [PATCH 3/3] Fix trans --- htdocs/product/stats/commande_fournisseur.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index fd0b1f092bf..ce70067b2da 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formorder.class.php'; // Load translation files required by the page -$langs->loadLangs(array('orders', 'products', 'companies')); +$langs->loadLangs(array('orders', 'products', 'companies', 'sendings')); $id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha');