From 9c0a17e4d5dceff6e4ef0a90e1d36de762f8d3af Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 14:26:38 +0530 Subject: [PATCH] fix: removed validation for materials return (backport #43461) (#43463) fix: removed validation for materials return (#43461) (cherry picked from commit 1c7154c7ca3df8b53be00e60b977e48ec9dd2ae3) Co-authored-by: rohitwaghchaure --- erpnext/stock/doctype/stock_entry/stock_entry.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 627ad78be58..ae6ca4e25d0 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -1594,10 +1594,6 @@ class StockEntry(StockController): if pro_doc.status == "Stopped": msg = f"Transaction not allowed against stopped Work Order {self.work_order}" - if self.is_return and pro_doc.status not in ["Completed", "Closed"]: - title = _("Stock Return") - msg = f"Work Order {self.work_order} must be completed or closed" - if msg: frappe.throw(_(msg), title=title)