Skip to content

Commit

Permalink
fix: warehouse issue in pick list (backport #39826) (#39827)
Browse files Browse the repository at this point in the history
fix: warehouse issue in pick list (#39826)

(cherry picked from commit 159a123)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
  • Loading branch information
mergify[bot] and rohitwaghchaure authored Feb 9, 2024
1 parent 30dacce commit b625b05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions erpnext/stock/doctype/pick_list/pick_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ frappe.ui.form.on('Pick List', {
},
freeze: 1,
freeze_message: __("Setting Item Locations..."),
callback(r) {
refresh_field("locations");
}
});
}
},
Expand Down
4 changes: 2 additions & 2 deletions erpnext/stock/doctype/pick_list/pick_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,9 @@ def set_item_locations(self, save=False):
picked_items_details = self.get_picked_items_details(items)
self.item_location_map = frappe._dict()

from_warehouses = None
from_warehouses = [self.parent_warehouse] if self.parent_warehouse else []
if self.parent_warehouse:
from_warehouses = get_descendants_of("Warehouse", self.parent_warehouse)
from_warehouses.extend(get_descendants_of("Warehouse", self.parent_warehouse))

# Create replica before resetting, to handle empty table on update after submit.
locations_replica = self.get("locations")
Expand Down

0 comments on commit b625b05

Please sign in to comment.