Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2024-10-24 20:40:25 +02:00
commit 13ec815864
2 changed files with 4 additions and 8 deletions

View file

@ -244,6 +244,7 @@ class doc_generic_bom_odt extends ModelePDFBom
$object->fetch_thirdparty();
$object->fetch_product();
$object->calculateCosts();
$dir = $conf->bom->multidir_output[isset($object->entity) ? $object->entity : 1];
$objectref = dol_sanitizeFileName($object->ref);
@ -260,13 +261,13 @@ class doc_generic_bom_odt extends ModelePDFBom
}
if (file_exists($dir)) {
//print "srctemplatepath=".$srctemplatepath; // Src filename
// print "srctemplatepath=".$srctemplatepath; // Src filename
$newfile = basename($srctemplatepath);
$newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile);
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
$newfiletmp = $objectref . '_' . $newfiletmp;
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
// $file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
// Get extension (ods or odt)
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
if (getDolGlobalString('MAIN_DOC_USE_TIMING')) {
@ -279,10 +280,6 @@ class doc_generic_bom_odt extends ModelePDFBom
$filename = $newfiletmp . '.' . $newfileformat;
}
$file = $dir . '/' . $filename;
//print "newdir=".$dir;
//print "newfile=".$newfile;
//print "file=".$file;
//print "conf->societe->dir_temp=".$conf->societe->dir_temp;
dol_mkdir($conf->bom->dir_temp);
if (!is_writable($conf->bom->dir_temp)) {
@ -454,7 +451,6 @@ class doc_generic_bom_odt extends ModelePDFBom
}
// Call the beforeODTSave hook
$parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$tmparray);
$reshook = $hookmanager->executeHooks('beforeODTSave', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks

View file

@ -116,7 +116,7 @@ parameters:
- '#Call to function array_key_exists.. with .error. .* will always evaluate to false.#'
- '#function dolGetButtonAction expects array\{confirm\?: array.*confirm: true} given.#'
- '#(?:make_substitutions expects array<string, string>,) string given\.#'
- '# (Workstation|WorkstationResource|WorkstationUserGroup|Zapier)::.* has no value type specified in iterable type array\.#'
- '# (DolibarrApiAccess|Documents|Login|Setup|Workstation|WorkstationResource|WorkstationUserGroup|Zapier)::.* has no value type specified in iterable type array\.#'
internalErrorsCountLimit: 50
cache: