Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/admin/dict.php
This commit is contained in:
Laurent Destailleur 2022-03-16 22:02:40 +01:00
commit 983bfc4ca9
2 changed files with 14 additions and 14 deletions

View File

@ -669,8 +669,8 @@ if ($id == 11) {
asort($elementList); asort($elementList);
$sourceList = array( $sourceList = array(
'internal' => $langs->trans('Internal'), 'internal' => $langs->trans('Internal'),
'external' => $langs->trans('External') 'external' => $langs->trans('External')
); );
} }
@ -737,12 +737,12 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) {
} }
if ((!GETPOSTISSET($value) || GETPOST($value) == '') if ((!GETPOSTISSET($value) || GETPOST($value) == '')
&& (!in_array($value, array('decalage', 'module', 'accountancy_code', 'accountancy_code_sell', 'accountancy_code_buy', 'tracking', 'picto')) // Fields that are not mandatory && (!in_array($value, array('decalage', 'module', 'accountancy_code', 'accountancy_code_sell', 'accountancy_code_buy', 'tracking', 'picto')) // Fields that are not mandatory
&& ($id != 10 || ($value != 'code' && $value != 'note')) // Field code and note is not mandatory for dictionary table 10 && ($id != 10 || ($value != 'code' && $value != 'note')) // Field code and note is not mandatory for dictionary table 10
) )
) { ) {
$ok = 0; $ok = 0;
$fieldnamekey = $value; $fieldnamekey = $value;
// We take translate key of field // We take translate key of field
if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) { if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) {
$fieldnamekey = 'Label'; $fieldnamekey = 'Label';
} }
@ -792,7 +792,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) {
$fieldnamekey = 'UseByDefault'; $fieldnamekey = 'UseByDefault';
} }
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors'); setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors');
} }
} }
// Other checks // Other checks
@ -2411,10 +2411,10 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
} elseif ($value == 'unit') { } elseif ($value == 'unit') {
print '<td>'; print '<td>';
$units = array( $units = array(
'mm' => $langs->trans('SizeUnitmm'), 'mm' => $langs->trans('SizeUnitmm'),
'cm' => $langs->trans('SizeUnitcm'), 'cm' => $langs->trans('SizeUnitcm'),
'point' => $langs->trans('SizeUnitpoint'), 'point' => $langs->trans('SizeUnitpoint'),
'inch' => $langs->trans('SizeUnitinch') 'inch' => $langs->trans('SizeUnitinch')
); );
print $form->selectarray('unit', $units, (!empty($obj->{$value}) ? $obj->{$value}:''), 0, 0, 0); print $form->selectarray('unit', $units, (!empty($obj->{$value}) ? $obj->{$value}:''), 0, 0, 0);
print '</td>'; print '</td>';

View File

@ -690,7 +690,7 @@ if (empty($reshook)) {
$triggersendname = 'RECEPTION_SENTBYMAIL'; $triggersendname = 'RECEPTION_SENTBYMAIL';
$paramname = 'id'; $paramname = 'id';
$mode = 'emailfromreception'; $mode = 'emailfromreception';
$trackid = 'shi'.$object->id; $trackid = 'rec'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
} }