From 3e6663d47ed5ee970dd2725efa930c8ea6818486 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 5 Nov 2018 14:01:59 +0530 Subject: [PATCH 1/2] fix(serial no): Set supplier info based on pur invoice if serial no is created from Purchase Invoice (#15820) --- erpnext/stock/doctype/serial_no/serial_no.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py index 3d1979dd81..e04343dc42 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.py +++ b/erpnext/stock/doctype/serial_no/serial_no.py @@ -81,9 +81,9 @@ class SerialNo(StockController): self.purchase_date = purchase_sle.posting_date self.purchase_time = purchase_sle.posting_time self.purchase_rate = purchase_sle.incoming_rate - if purchase_sle.voucher_type == "Purchase Receipt": + if purchase_sle.voucher_type in ("Purchase Receipt", "Purchase Invoice"): self.supplier, self.supplier_name = \ - frappe.db.get_value("Purchase Receipt", purchase_sle.voucher_no, + frappe.db.get_value(purchase_sle.voucher_type, purchase_sle.voucher_no, ["supplier", "supplier_name"]) # If sales return entry @@ -253,8 +253,8 @@ def has_duplicate_serial_no(sn, sle): status = False if sn.purchase_document_no: - if sle.voucher_type in ['Purchase Receipt', 'Stock Entry'] and \ - sn.delivery_document_type not in ['Purchase Receipt', 'Stock Entry']: + if sle.voucher_type in ['Purchase Receipt', 'Stock Entry', "Purchase Invoice"] and \ + sn.delivery_document_type not in ['Purchase Receipt', 'Stock Entry', "Purchase Invoice"]: status = True if status and sle.voucher_type == 'Stock Entry' and \ From a97a520aa85fdf31e0a753993d638361973841f6 Mon Sep 17 00:00:00 2001 From: Ameya Shenoy Date: Tue, 6 Nov 2018 11:02:04 +0000 Subject: [PATCH 2/2] bumped to version 10.1.68 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 7461fda9f7..7c307b760b 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '10.1.67' +__version__ = '10.1.68' def get_default_company(user=None): '''Get default company for user'''