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

This commit is contained in:
Laurent Destailleur 2023-06-22 21:31:26 +02:00
commit bcdddc2c1c
6 changed files with 14 additions and 4 deletions

View file

@ -233,6 +233,9 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha'))
dolibarr_set_const($db, "MAIN_INFO_LOCALTAX_CALC2", GETPOST("clt2", 'aZ09'), 'chaine', 0, '', $conf->entity);
}
// Remove constant MAIN_INFO_SOCIETE_SETUP_TODO_WARNING
dolibarr_del_const($db, "MAIN_INFO_SOCIETE_SETUP_TODO_WARNING", $conf->entity);
if (!$error) {
if (GETPOST('save')) { // To avoid to show message when we juste switch the country that resubmit the form.
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');

View file

@ -83,7 +83,7 @@ print '</span>';
print '<br>';
// Show info setup company
if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) {
if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY) || !empty($conf->global->MAIN_INFO_SOCIETE_SETUP_TODO_WARNING)) {
$setupcompanynotcomplete = 1;
}

View file

@ -540,7 +540,13 @@ if ($mode == 'common' || $mode == 'commonkanban') {
$desc = str_replace('{picto}', img_picto('', 'switch_off', 'class="size15x"'), $desc);
$desc = str_replace('{picto2}', img_picto('', 'setup', 'class="size15x"'), $desc);
if ($nbmodulesnotautoenabled <= getDolGlobalInt('MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING', 1)) { // If only minimal initial modules enabled
$deschelp = '<div class="info hideonsmartphone">'.$desc."<br></div><br>\n";
$deschelp .= '<div class="info hideonsmartphone">'.$desc."<br></div>\n";
}
if (!empty($conf->global->MAIN_SETUP_MODULES_INFO)) { // Show a custom message
$deschelp .= '<div class="info">'.$langs->trans($conf->global->MAIN_SETUP_MODULES_INFO)."<br></div>\n";
}
if ($deschelp) {
$deschelp .= '<br>';
}
}
if ($mode == 'marketplace') {

View file

@ -1094,7 +1094,7 @@ function get_left_menu_home($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu =
// Load translation files required by the page
$langs->loadLangs(array("admin", "help"));
$warnpicto = '';
if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) {
if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY) || !empty($conf->global->MAIN_INFO_SOCIETE_SETUP_TODO_WARNING)) {
$langs->load("errors");
$warnpicto = img_warning($langs->trans("WarningMandatorySetupNotComplete"));
}

View file

@ -141,7 +141,7 @@ class modApi extends DolibarrModules
// Add here list of permission defined by an id, a label, a boolean and two constant strings.
// Example:
$this->rights[$r][0] = $this->numero + $r; // Permission id (must not be already used)
$this->rights[$r][1] = 'Générer / modifier la clé API des utilisateurs'; // Permission label
$this->rights[$r][1] = 'Generate/modify users API key'; // Permission label
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
$this->rights[$r][4] = 'apikey'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
$this->rights[$r][5] = 'generate'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)

View file

@ -978,6 +978,7 @@ Permission2501=Read/Download documents
Permission2502=Download documents
Permission2503=Submit or delete documents
Permission2515=Setup documents directories
Permission2610=Generate/modify users API key
Permission2801=Use FTP client in read mode (browse and download only)
Permission2802=Use FTP client in write mode (delete or upload files)
Permission3200=Read archived events and fingerprints