diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php
index 9e34f4ba39fb5..9c32e49b2259d 100644
--- a/htdocs/core/tpl/objectline_view.tpl.php
+++ b/htdocs/core/tpl/objectline_view.tpl.php
@@ -124,6 +124,12 @@
$line, 'i' =>& $i, 'coldisplay' =>& $coldisplay];
+$reshook = $hookmanager->executeHooks('objectLineView_BeforeProduct', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
+print $hookmanager->resPrint;
+
if (($line->info_bits & 2) == 2) {
print '';
$txt = '';
@@ -265,8 +271,12 @@
}
}
+
+ $parameters = ['line' => $line, 'i' =>& $i, 'coldisplay' =>& $coldisplay];
+ $reshook = $hookmanager->executeHooks('objectLineView_BeforeProductExtrafield', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
+ print $hookmanager->resPrint;
// Line extrafield
- if (!empty($extrafields)) {
+ if (!empty($extrafields) && empty($reshook)) {
$temps = $line->showOptionals($extrafields, 'view', array(), '', '', 1, 'line');
if (!empty($temps)) {
print ' |