From 10f8ccd7edee81e89048f2d871a5c1aaa5ff0d45 Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Wed, 30 Sep 2020 10:55:55 +0200 Subject: [PATCH] New : add two hook for more feature on list New hook are : printFieldListTable : allow to add more table on sql query (from another modules) printFieldListSearchParam : allow to keep search on new filter If ok, i add it on all native list --- htdocs/fourn/commande/list.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 6be60c04249..ce596c30c65 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -7,7 +7,7 @@ * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2016 Ferran Marcet * Copyright (C) 2018 Frédéric France - * Copyright (C) 2018 Charlene Benke + * Copyright (C) 2018-2020 Charlene Benke * Copyright (C) 2019 Nicolas ZABOURI * * This program is free software; you can redistribute it and/or modify @@ -522,6 +522,11 @@ if ($search_user > 0) $sql .= ", ".MAIN_DB_PREFIX."element_contact as ec"; $sql .= ", ".MAIN_DB_PREFIX."c_type_contact as tc"; } + +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListTable', $parameters); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; + $sql .= ' WHERE cf.fk_soc = s.rowid'; $sql .= ' AND cf.entity IN ('.getEntity('supplier_order').')'; if ($socid > 0) $sql .= " AND s.rowid = ".$socid; @@ -638,6 +643,10 @@ if ($resql) // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; + $parameters = array(); + $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters); // Note that $action and $object may have been modified by hook + $param .= $hookmanager->resPrint; + // List of mass actions available $arrayofmassactions = array( 'generate_doc'=>$langs->trans("ReGeneratePDF"),