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
This commit is contained in:
parent
f063a144c1
commit
10f8ccd7ed
@ -7,7 +7,7 @@
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018-2020 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
*
|
||||
* 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"),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user