From 54099e592e16b49de1166a3d3198a1aef187be7d Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 12 Sep 2017 15:51:52 +0530 Subject: [PATCH] [fix] Serial No has already been received error while making purchase receipt entry for the returned serial no (#10736) --- erpnext/stock/doctype/serial_no/serial_no.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py index ca64b1eda2b..c39efa06f71 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.py +++ b/erpnext/stock/doctype/serial_no/serial_no.py @@ -240,7 +240,8 @@ def has_duplicate_serial_no(sn, sle): status = False if sn.purchase_document_no: - if sle.voucher_type in ['Purchase Receipt', 'Stock Entry']: + if sle.voucher_type in ['Purchase Receipt', 'Stock Entry'] and \ + sn.delivery_document_type not in ['Purchase Receipt', 'Stock Entry']: status = True if status and sle.voucher_type == 'Stock Entry' and \