Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0

This commit is contained in:
Laurent Destailleur 2023-01-18 00:16:03 +01:00
commit af7570a2cd

View File

@ -120,7 +120,7 @@ if (empty($reshook)) {
}
// Close inventory by recording the stock movements
if ($action == 'update' && !empty($user->rights->stock->mouvement->creer)) {
if ($action == 'update' && !empty($user->rights->stock->mouvement->creer) && $object->status == $object::STATUS_VALIDATED) {
$stockmovment = new MouvementStock($db);
$stockmovment->setOrigin($object->element, $object->id);