From afd7d59c733ff581ba4b7eb1aaf252abc8792984 Mon Sep 17 00:00:00 2001 From: s-aga-r Date: Sat, 26 Aug 2023 13:10:47 +0530 Subject: [PATCH] fix: `AttributeError` while saving subcontracting order --- erpnext/controllers/subcontracting_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/subcontracting_controller.py b/erpnext/controllers/subcontracting_controller.py index 913c80b26a..d4270a76d4 100644 --- a/erpnext/controllers/subcontracting_controller.py +++ b/erpnext/controllers/subcontracting_controller.py @@ -97,7 +97,7 @@ class SubcontractingController(StockController): if not is_stock_item: frappe.throw(_("Row {0}: Item {1} must be a stock item.").format(item.idx, item.item_name)) - if not item.is_scrap_item: + if not item.get("is_scrap_item"): if not is_sub_contracted_item: frappe.throw( _("Row {0}: Item {1} must be a subcontracted item.").format(item.idx, item.item_name)