Fix regression

This commit is contained in:
Laurent Destailleur 2023-02-19 17:00:40 +01:00
parent 6224414b0d
commit 2b8b389bcf

View File

@ -986,7 +986,7 @@ if (!$error && $massaction == 'validate' && $permissiontoadd) {
}
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && property_exists($objecttmp, 'thirdparty')) {
if ((property_exists($objecttmp, 'socid') || property_exists($objecttmp, 'fk_soc')) && empty($objecttmp->thirdparty)) {
$objecttmp->fetch_thirparty();
$objecttmp->fetch_thirdparty();
}
if (!empty($objecttmp->thirdparty)) {
$newlang = $objecttmp->thirdparty->default_lang;