diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 442b3090955..96a420adfec 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -781,7 +781,7 @@ if ($action == 'validate' && $permissiontoadd && $objectclass !== null) { } else { $idwarehouse = 0; } - if ($objecttmp->valid($user, $idwarehouse)) { + if ($objecttmp->valid($user, $idwarehouse) > 0) { setEventMessages($langs->trans('hasBeenValidated', $objecttmp->ref), null, 'mesgs'); } else { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');