add hook product stat

This commit is contained in:
Robin 2021-07-27 09:09:42 +02:00
parent 34c31492cf
commit a386cf5e89

View File

@ -58,6 +58,9 @@ $fieldvalue = (!empty($id) ? $id : $ref);
$fieldtype = (!empty($ref) ? 'ref' : 'rowid');
$result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype);
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('productstatscard', 'globalcard'));
$tmp = dol_getdate(dol_now());
$currentyear = $tmp['year'];
if (empty($search_year)) $search_year = $currentyear;