fix: load translation for extrafields in PDF (#30461)

This commit is contained in:
HENRY Florian 2024-07-25 14:29:12 +02:00 committed by GitHub
parent bc69a62af0
commit 517e5e732c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1472,6 +1472,9 @@ abstract class CommonDocGenerator
$field = new stdClass();
$field->rank = intval($extrafields->attributes[$object->table_element]['pos'][$key]);
$field->content = $this->getExtrafieldContent($object, $key, $outputlangs);
if (isset($extrafields->attributes[$object->table_element]['langfile'][$key])) {
$outputlangs->load($extrafields->attributes[$object->table_element]['langfile'][$key]);
}
$field->label = $outputlangs->transnoentities($label);
$field->type = $extrafields->attributes[$object->table_element]['type'][$key];