Merge pull request #17703 from tuxgasy/Fix_new_honorific_title_label

No try to translate label field in dictionary for new
This commit is contained in:
Laurent Destailleur 2021-06-10 15:38:55 +02:00 committed by GitHub
commit 1798707cce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2018,10 +2018,10 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
if (in_array($fieldlist[$field], array('label', 'libelle'))) // For label
{
// Special case for labels
if ($tabname == MAIN_DB_PREFIX.'c_civility') {
if ($tabname == MAIN_DB_PREFIX.'c_civility' && !empty($obj->code)) {
$transkey = "Civility".strtoupper($obj->code);
}
if ($tabname == MAIN_DB_PREFIX.'c_payment_term') {
if ($tabname == MAIN_DB_PREFIX.'c_payment_term' && !empty($obj->code)) {
$langs->load("bills");
$transkey = "PaymentConditionShort".strtoupper($obj->code);
}