From ce2bf5fb1c55d3bb4b566e50b9b12f3d89676ccd Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sat, 17 Jun 2023 12:14:32 +0530 Subject: [PATCH] fix: validation of job card in stock entry (cherry picked from commit df8c3f0888e06c28da0937190e97c3589d67c44d) --- erpnext/stock/doctype/stock_entry/stock_entry.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 3f5457c633e..ae9adc826c6 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -268,10 +268,10 @@ class StockEntry(StockController): return for row in self.items: - if row.job_card_item: + if row.job_card_item or not row.s_warehouse: continue - msg = f"""Row #{0}: The job card item reference + msg = f"""Row #{row.idx}: The job card item reference is missing. Kindly create the stock entry from the job card. If you have added the row manually then you won't be able to add job card item reference."""