Try to add PRODUIT_SOUSPRODUITS_ALSO_ENABLE_PARENT_STOCK_MOVE to restore

an old behaviour.
This commit is contained in:
ldestailleur 2025-09-27 02:28:41 +02:00
parent 7e77994cec
commit 8696b0ab6f

View file

@ -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;
}