Merge pull request #36694 from bradley-jarvis/fix-mo-production-dissassembly

Fix - Error when producing dissassembly MO
This commit is contained in:
Laurent Destailleur 2025-12-18 15:57:11 +01:00 committed by GitHub
commit 2cf6269caf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -391,7 +391,7 @@ if (empty($reshook)) {
$moline->batch = GETPOST('batchtoproduce-'.$line->id.'-'.$i);
$moline->role = 'produced';
$moline->fk_mrp_production = $line->id;
$moline->fk_stock_movement = $idstockmove;
$moline->fk_stock_movement = (($idstockmove == 0) ? null : $idstockmove);
$moline->fk_user_creat = $user->id;
$resultmoline = $moline->create($user);