From 0885485a61d760f096bf25692722d6d4555de59f Mon Sep 17 00:00:00 2001 From: Anurag Mishra <32095923+Anurag810@users.noreply.github.com> Date: Tue, 1 Jan 2019 15:00:16 +0530 Subject: [PATCH] changes --- erpnext/controllers/stock_controller.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index 5ea3dee2162..0b19b7aaf9a 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -343,8 +343,7 @@ class StockController(AccountsController): qa_doc = frappe.get_doc("Quality Inspection", d.quality_inspection) if qa_doc.docstatus == 0: link = frappe.utils.get_link_to_form('Quality Inspection', d.quality_inspection) - frappe.msgprint(_("Quality Inspection: {0} is not submitted for the item: {1} in row {2}").format(link, d.item_code, d.idx)) - raise QualityInspectionNotSubmittedError + frappe.throw(_("Quality Inspection: {0} is not submitted for the item: {1} in row {2}").format(link, d.item_code, d.idx), QualityInspectionNotSubmittedError) qa_failed = any([r.status=="Rejected" for r in qa_doc.readings]) if qa_failed: @@ -432,4 +431,4 @@ def get_voucherwise_gl_entries(future_stock_vouchers, posting_date): tuple([posting_date] + [d[1] for d in future_stock_vouchers]), as_dict=1): gl_entries.setdefault((d.voucher_type, d.voucher_no), []).append(d) - return gl_entries \ No newline at end of file + return gl_entries