Merge pull request #9612 from atm-greg/Hook_on_commonGenerateDocument
NEW add hook on commongeneratedocument
This commit is contained in:
commit
131c3d8f7a
@ -4511,10 +4511,15 @@ abstract class CommonObject
|
|||||||
*/
|
*/
|
||||||
protected function commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams = null)
|
protected function commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams = null)
|
||||||
{
|
{
|
||||||
global $conf, $langs, $user;
|
global $conf, $langs, $user, $hookmanager;
|
||||||
|
|
||||||
$srctemplatepath='';
|
$srctemplatepath='';
|
||||||
|
|
||||||
|
$parameters = array('modelspath'=>$modelspath,'modele'=>$modele,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'hidedesc'=>$hidedesc,'hideref'=>$hideref, 'moreparams'=>$moreparams);
|
||||||
|
$reshook = $hookmanager->executeHooks('commonGenerateDocument', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|
||||||
|
if(empty($reshook))
|
||||||
|
{
|
||||||
dol_syslog("commonGenerateDocument modele=".$modele." outputlangs->defaultlang=".(is_object($outputlangs)?$outputlangs->defaultlang:'null'));
|
dol_syslog("commonGenerateDocument modele=".$modele." outputlangs->defaultlang=".(is_object($outputlangs)?$outputlangs->defaultlang:'null'));
|
||||||
|
|
||||||
// Increase limit for PDF build
|
// Increase limit for PDF build
|
||||||
@ -4760,6 +4765,8 @@ abstract class CommonObject
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else return $reshook;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build thumb
|
* Build thumb
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user