From fa1378dd49f093d4cc8d1e5851b9e9fe1af68d35 Mon Sep 17 00:00:00 2001 From: Devin Slauenwhite Date: Fri, 29 Apr 2022 16:38:52 -0400 Subject: [PATCH] fix: prevent user from proceeding without all qty picked. --- erpnext/stock/doctype/pick_list/pick_list.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index 29dafbb5cac..2bcb93a69eb 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -43,13 +43,9 @@ class PickList(Document): for item in self.locations: # if the user has not entered any picked qty, set it to stock_qty, before submit if item.picked_qty < item.stock_qty: - frappe.msgprint( - _("Row {0} is short by {1} {2}").format( - item.idx, item.stock_qty - item.picked_qty, item.stock_uom - ), - _("Warning: Pick List Incomplete"), - indicator="yellow", - ) + frappe.throw(_("Row {0} is short by {1} {2}").format( + item.idx, item.stock_qty - item.picked_qty, item.stock_uom + ), title=_("Pick List Incomplete")) if item.sales_order_item: # update the picked_qty in SO Item