diff --git a/.gitignore b/.gitignore index ab0841c0efe..3315a7eed88 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ htdocs/conf/conf.php.sav htdocs/conf/conf.php.back documents/ custom2/ -htdocs/custom test/report/ nbproject default.properties diff --git a/htdocs/core/actions_builddoc.inc.php b/htdocs/core/actions_builddoc.inc.php index 0a5f63de9aa..20e431849e3 100644 --- a/htdocs/core/actions_builddoc.inc.php +++ b/htdocs/core/actions_builddoc.inc.php @@ -35,6 +35,7 @@ if (!empty($permissioncreate) && empty($permissiontoadd)) { // Build doc if ($action == 'builddoc' && ($permissiontoadd || !empty($usercangeneretedoc))) { + var_dump(GETPOST('model', 'alpha')); if (is_numeric(GETPOST('model', 'alpha'))) { $error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Model")); } else { @@ -46,23 +47,24 @@ if ($action == 'builddoc' && ($permissiontoadd || !empty($usercangeneretedoc))) dol_print_error('Object must have been loaded by a fetch'); exit; }*/ - + // Save last template used to generate document if (GETPOST('model', 'alpha')) { $object->setDocModel($user, GETPOST('model', 'alpha')); } - + // Special case to force bank account //if (property_exists($object, 'fk_bank')) //{ - if (GETPOST('fk_bank', 'int')) { - // this field may come from an external module - $object->fk_bank = GETPOST('fk_bank', 'int'); - } elseif (!empty($object->fk_account)) { - $object->fk_bank = $object->fk_account; - } - //} - + if (GETPOST('fk_bank', 'int')) { + // this field may come from an external module + $object->fk_bank = GETPOST('fk_bank', 'int'); + } elseif (!empty($object->fk_account)) { + $object->fk_bank = $object->fk_account; + } + //} + + $outputlangs = $langs; $newlang = ''; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 6c129b86250..ba0f2d4bcf1 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5334,7 +5334,6 @@ abstract class CommonObject protected function commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams = null) { global $conf, $langs, $user, $hookmanager, $action; - $srctemplatepath = ''; $parameters = array('modelspath'=>$modelspath, 'modele'=>$modele, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'hidedesc'=>$hidedesc, 'hideref'=>$hideref, 'moreparams'=>$moreparams); @@ -5384,6 +5383,7 @@ abstract class CommonObject // On verifie l'emplacement du modele $file = dol_buildpath($reldir.$modelspath.$file, 0); + var_dump($file); if (file_exists($file)) { $filefound = $file; $classname = $prefix.'_'.$modele; diff --git a/htdocs/custom/.gitignore b/htdocs/custom/.gitignore index 9420e8c61eb..224a544fee7 100644 --- a/htdocs/custom/.gitignore +++ b/htdocs/custom/.gitignore @@ -2,3 +2,6 @@ !.gitignore !README.md !index.html +/advancedhrm +/ship2bill +