diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index cabd5647bc9..ebfe7f1abee 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4511,10 +4511,15 @@ abstract class CommonObject */ protected function commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams = null) { - global $conf, $langs, $user; + global $conf, $langs, $user, $hookmanager; $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')); // Increase limit for PDF build @@ -4759,6 +4764,8 @@ abstract class CommonObject dol_print_error('', $this->error); return -1; } + } + else return $reshook; } /** diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql index 00964b85e3e..85dba76eb2e 100644 --- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql +++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql @@ -89,6 +89,8 @@ ALTER TABLE llx_projet ADD COLUMN usage_organize_event integer DEFAULT 0; UPDATE llx_projet set usage_opportunity = 1 WHERE fk_opp_status > 0; +ALTER TABLE llx_accounting_account MODIFY COLUMN rowid bigint AUTO_INCREMENT; + create table llx_c_hrm_public_holiday ( @@ -108,4 +110,3 @@ create table llx_c_hrm_public_holiday ALTER TABLE llx_supplier_proposaldet ADD COLUMN date_start datetime DEFAULT NULL; ALTER TABLE llx_supplier_proposaldet ADD COLUMN date_end datetime DEFAULT NULL; - \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_accounting_account.sql b/htdocs/install/mysql/tables/llx_accounting_account.sql index 727965f6a9d..fd1962b6c09 100644 --- a/htdocs/install/mysql/tables/llx_accounting_account.sql +++ b/htdocs/install/mysql/tables/llx_accounting_account.sql @@ -21,7 +21,7 @@ create table llx_accounting_account ( - rowid integer AUTO_INCREMENT PRIMARY KEY, + rowid bigint AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, datec datetime, tms timestamp,