diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 37b81403acd..205e88c8272 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -249,7 +249,11 @@ class Societe extends CommonObject $result=$interface->run_triggers('COMPANY_CREATE',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers - + } + else $error++; + + if (! $error) + { dol_syslog(get_class($this)."::Create success id=".$this->id); $this->db->commit(); return $this->id;