From bd6d5eb5ac40cfe8463f45abf7235321bb668675 Mon Sep 17 00:00:00 2001 From: marination Date: Fri, 9 Oct 2020 20:57:17 +0530 Subject: [PATCH] fix: Remove Production Order reference from Item Validation --- erpnext/stock/doctype/item/item.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index d22fda85f4..bfdddbbb60 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -984,9 +984,7 @@ class Item(WebsiteGenerator): if self.stock_ledger_created(): return True - elif frappe.db.get_value(doctype, filters={"item_code": self.name, "docstatus": 1}) or \ - frappe.db.get_value("Production Order", - filters={"production_item": self.name, "docstatus": 1}): + elif frappe.db.get_value(doctype, filters={"item_code": self.name, "docstatus": 1}): return True def validate_auto_reorder_enabled_in_stock_settings(self):