Merge pull request #20519 from joseplluis/patch-11
BUG expedition and warehouse with children
This commit is contained in:
commit
4fc07d96d8
@ -13,6 +13,7 @@
|
||||
* Copyright (C) 2016 Yasser Carreón <yacasia@gmail.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2020 Lenin Rivas <lenin@leninrivas.com>
|
||||
* Copyright (C) 2022 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -1459,6 +1460,11 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
foreach ($product->stock_warehouse as $warehouse_id => $stock_warehouse) {
|
||||
if (!empty($warehousePicking) && !in_array($warehouse_id, $warehousePicking)) {
|
||||
// if a warehouse was selected by user, picking is limited to this warehouse and his children
|
||||
continue;
|
||||
}
|
||||
|
||||
$tmpwarehouseObject->fetch($warehouse_id);
|
||||
if (($stock_warehouse->real > 0) && (count($stock_warehouse->detail_batch))) {
|
||||
foreach ($stock_warehouse->detail_batch as $dbatch) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user