FIX #26965 add check for global variable VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT

Adding an OR clause in the check if product is a variant.
Same structure as in check if user has rights to create movement.
This commit is contained in:
Dario Contrino 2023-12-04 21:51:02 +01:00
parent e4536e0a2e
commit 92161b67cd

View File

@ -959,7 +959,7 @@ if (empty($reshook)) {
}
if (!$variants) {
if (!$variants || getDolGlobalString('VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT')) {
/*
* Stock detail (by warehouse). May go down into batch details.
*/