From 1d90b41aea54ced3ce7cfdf86c77850887e0510f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Sat, 24 Dec 2016 10:42:23 +0530 Subject: [PATCH] [fix] Fetch serial nos on change of Warehouse --- erpnext/selling/sales_common.js | 2 +- .../stock/doctype/delivery_note_item/delivery_note_item.json | 2 +- erpnext/stock/get_item_details.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index fc3cb3df33..7ddf45d529 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -212,7 +212,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ item_code: item.item_code, warehouse: item.warehouse, qty: item.qty, - serial_no:item.serial_no + serial_no: item.serial_no || "" }, callback:function(r){ if (inList(['Delivery Note', 'Sales Invoice'], doc.doctype)) { diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json index 1cb0fcdefc..e1ac06e113 100644 --- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json +++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json @@ -1691,7 +1691,7 @@ "issingle": 0, "istable": 1, "max_attachments": 0, - "modified": "2016-11-23 12:33:37.728117", + "modified": "2016-12-24 12:33:37.728117", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note Item", diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 7bcad08e89..0ed6952c74 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -384,7 +384,7 @@ def get_serial_no_details(item_code, warehouse, qty, serial_no): return {'serial_no': serial_no} @frappe.whitelist() -def get_bin_details_and_serial_nos(item_code, warehouse, qty, serial_no): +def get_bin_details_and_serial_nos(item_code, warehouse, qty=None, serial_no=None): bin_details_and_serial_nos = {} bin_details_and_serial_nos.update(get_bin_details(item_code, warehouse)) bin_details_and_serial_nos.update(get_serial_no_details(item_code, warehouse, qty, serial_no))