diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php
index 6d8cfe21f00..da3a1913d64 100644
--- a/htdocs/admin/user.php
+++ b/htdocs/admin/user.php
@@ -268,7 +268,7 @@ foreach ($dirmodels as $reldir) {
// Defaut
print '
';
- if ($conf->global->USER_ADDON_PDF == $name) {
+ if (getDolGlobalString('USER_ADDON_PDF_ODT') == $name) {
print img_picto($langs->trans("Default"), 'on');
} else {
print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'';
diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php
index b0d98a525df..7ca8d29c380 100644
--- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php
+++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php
@@ -1,7 +1,7 @@
* Copyright (C) 2012 Juanjo Menent
- * Copyright (C) 2018-2020 Frédéric France
+ * Copyright (C) 2018-2021 Frédéric France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -120,7 +120,7 @@ class doc_generic_user_odt extends ModelePDFUser
$texte .= '';
$texte .= '';
$texte .= '';
- if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) {
+ if (!empty($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT)) {
$texte .= '';
$texte .= '';
$texte .= '';
@@ -166,7 +166,7 @@ class doc_generic_user_odt extends ModelePDFUser
if (count($listofdir)) {
$texte .= $langs->trans("NumberOfModelFilesFound").': '.count($listoffiles).'';
- if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) {
+ if (!empty($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT)) {
// Model for creation
$list = ModelePDFUser::liste_modeles($this->db);
$texte .= ' |