From f408803ae074ca3ff2afce68781b4e80bafbc5ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Champlon?= <85104766+Kazimir42@users.noreply.github.com> Date: Fri, 15 Nov 2024 16:02:11 +0100 Subject: [PATCH] list contact check by module (#31845) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rémi Champlon --- htdocs/core/class/commonobject.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 09512e9df32..7186e44a767 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1572,7 +1572,7 @@ abstract class CommonObject $tab = array(); - $sql = "SELECT DISTINCT tc.rowid, tc.code, tc.libelle as type_label, tc.position, tc.element"; + $sql = "SELECT DISTINCT tc.rowid, tc.code, tc.libelle as type_label, tc.position, tc.element, tc.module"; $sql .= " FROM ".$this->db->prefix()."c_type_contact as tc"; $sqlWhere = array(); @@ -1609,7 +1609,7 @@ abstract class CommonObject $langs->loadLangs(array("propal", "orders", "bills", "suppliers", "contracts", "supplier_proposal")); while ($obj = $this->db->fetch_object($resql)) { - $modulename = $obj->element; + $modulename = $obj->module ?? $obj->element; if (strpos($obj->element, 'project') !== false) { $modulename = 'projet'; } elseif ($obj->element == 'contrat') {