Fix : when using several field for label into sellist extrafields traduction is not needed.
Without this, the list display "not defined". The key can't exists because label displayed is build from several field so we show raw data
This commit is contained in:
parent
855487a384
commit
f1d1522478
@ -753,6 +753,7 @@ class ExtraFields
|
||||
$fields_label = explode('|',$InfoFieldList[1]);
|
||||
if(is_array($fields_label))
|
||||
{
|
||||
$notrans = true;
|
||||
foreach ($fields_label as $field_toshow)
|
||||
{
|
||||
$labeltoshow.= $obj->$field_toshow.' ';
|
||||
@ -778,12 +779,15 @@ class ExtraFields
|
||||
}
|
||||
else
|
||||
{
|
||||
$translabel=$langs->trans($obj->$InfoFieldList[1]);
|
||||
if ($translabel!=$obj->$InfoFieldList[1]) {
|
||||
$labeltoshow=dol_trunc($translabel,18);
|
||||
}
|
||||
else {
|
||||
$labeltoshow=dol_trunc($obj->$InfoFieldList[1],18);
|
||||
if(!$notrans)
|
||||
{
|
||||
$translabel=$langs->trans($obj->$InfoFieldList[1]);
|
||||
if ($translabel!=$obj->$InfoFieldList[1]) {
|
||||
$labeltoshow=dol_trunc($translabel,18);
|
||||
}
|
||||
else {
|
||||
$labeltoshow=dol_trunc($obj->$InfoFieldList[1],18);
|
||||
}
|
||||
}
|
||||
if (empty($labeltoshow)) $labeltoshow='(not defined)';
|
||||
if ($value==$obj->rowid)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user