From 8e7d47b3a7453ce7ded83c4205c556716f2afa19 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 20 Feb 2024 15:19:06 +0530 Subject: [PATCH] fix: 'NoneType' object is not iterable (#39977) --- erpnext/stock/doctype/pick_list/pick_list.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index 0e1f8d78b840..8a1f79d4a278 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -73,6 +73,10 @@ def before_save(self): self.update_status() self.set_item_locations() + if self.get("locations"): + self.validate_sales_order_percentage() + + def validate_sales_order_percentage(self): # set percentage picked in SO for location in self.get("locations"): if (