From e73db0e33103fc5d00390c8544c3e318753780fb Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 1 Mar 2012 12:26:12 +0530 Subject: [PATCH] set serial_no status="In Store" if purchase return cancelled --- 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 1a3e783327b..d9196d87182 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -437,8 +437,8 @@ class DocType: if self.doc.purpose == 'Purchase Return': #delete_doc("Serial No", serial_no) serial_doc = Document("Serial No", serial_no) - serial_doc.status = 'Purchase Returned' - serial_doc.docstatus = 2 + serial_doc.status = is_submit and 'Purchase Returned' or 'In Store' + serial_doc.docstatus = is_submit and 2 or 0 serial_doc.save()