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

This commit is contained in:
Laurent Destailleur
2024-06-25 15:13:51 +02:00
3 changed files with 27 additions and 2 deletions

View File

@@ -8739,7 +8739,14 @@ abstract class CommonObject
$classname = $InfoFieldList[0];
$classpath = $InfoFieldList[1];
if (!$validate->isFetchable($fieldValue, $classname, $classpath)) {
$this->setFieldError($fieldKey, $validate->error);
$lastIsFetchableError = $validate->error;
// from V19 of Dolibarr, In some cases link use element instead of class, example project_task
if ($validate->isFetchableElement($fieldValue, $classname)) {
return true;
}
$this->setFieldError($fieldKey, $lastIsFetchableError);
return false;
} else {
return true;