diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 7d6541042573b..419c8ec18de69 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5889,6 +5889,7 @@ function picto_from_langcode($codelang) * 'supplier_invoice' to add a tab in supplier invoice view * 'invoice' to add a tab in customer invoice view * 'order' to add a tab in customer order view + * 'contract' to add a tabl in contract view * 'product' to add a tab in product view * 'propal' to add a tab in propal view * 'user' to add a tab in user view diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index c1c42d2fb4092..c41a889d10e09 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -1489,10 +1489,14 @@ function insert_tabs() $resql = $this->db->query($sql); if (! $resql) { - $err++; - $this->error = $this->db->lasterror(); - $this->errors[] = $this->db->lasterror(); - break; + dol_syslog($this->db->lasterror(), LOG_ERR); + if ($this->db->lasterrno() != 'DB_ERROR_RECORD_ALREADY_EXISTS') + { + $this->error = $this->db->lasterror(); + $this->errors[] = $this->db->lasterror(); + $err++; + break; + } } } $i++;