FIX: #16476 version 2
This commit is contained in:
parent
322d0955f2
commit
3517cdf1b4
@ -1388,7 +1388,6 @@ if (!$error && $massaction == 'generate_doc' && $permissiontoread) {
|
||||
foreach ($toselect as $toselectid) {
|
||||
$result = $objecttmp->fetch($toselectid);
|
||||
if ($result > 0) {
|
||||
$objecttmp->fetch_thirdparty(); //load lang from thirdparty
|
||||
$outputlangs = $langs;
|
||||
$newlang = '';
|
||||
|
||||
@ -1401,6 +1400,10 @@ if (!$error && $massaction == 'generate_doc' && $permissiontoread) {
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->default_lang)) {
|
||||
$newlang = $objecttmp->default_lang; // for thirdparty
|
||||
}
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && empty($objecttmp->thirdparty)) { //load lang from thirdparty
|
||||
$objecttmp->fetch_thirdparty();
|
||||
$newlang = $objecttmp->thirdparty->default_lang; // for proposal, order, invoice, ...
|
||||
}
|
||||
if (!empty($newlang)) {
|
||||
$outputlangs = new Translate("", $conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user