From 8e71665e4f19cddedc534c7e7996d76a6d83d0cc Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 15:53:20 +0530 Subject: [PATCH] fix: 'NoneType' object is not iterable (backport #39977) (#39980) fix: 'NoneType' object is not iterable (#39977) (cherry picked from commit 8e7d47b3a7453ce7ded83c4205c556716f2afa19) Co-authored-by: rohitwaghchaure --- 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 36c877ebc884..86462476a5d6 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -32,6 +32,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 (