From 8696b0ab6f12a3a220155df2794d3ddbfa43e159 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Sat, 27 Sep 2025 02:28:41 +0200 Subject: [PATCH] Try to add PRODUIT_SOUSPRODUITS_ALSO_ENABLE_PARENT_STOCK_MOVE to restore an old behaviour. --- htdocs/product/stock/class/mouvementstock.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index 04a62ec501e..f36b4c5daaa 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -325,7 +325,7 @@ class MouvementStock extends CommonObject if (getDolGlobalInt('PRODUIT_SOUSPRODUITS')) { $productChildrenNb = $product->hasFatherOrChild(1); } - if (($product->type != Product::TYPE_SERVICE || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) && $productChildrenNb == 0) { + if (($product->type != Product::TYPE_SERVICE || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) && ($productChildrenNb == 0 || getDolGlobalInt('PRODUIT_SOUSPRODUITS_ALSO_ENABLE_PARENT_STOCK_MOVE'))) { $movestock = 1; }