From 2087e574aa9fa4a0c92d845d9361571bbfa72a53 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 27 Feb 2017 13:43:04 +0530 Subject: [PATCH] [Fix] Serial nos not pulling on the delivery note, for language spanish add serial no button was not working --- erpnext/public/js/controllers/transaction.js | 4 +++- erpnext/public/js/utils.js | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 799730edd57..4e082870042 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -781,7 +781,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ if(k=="price_list_rate") { if(flt(v) != flt(d.price_list_rate)) price_list_rate_changed = true; } - frappe.model.set_value(d.doctype, d.name, k, v); + if(v) { + frappe.model.set_value(d.doctype, d.name, k, v); + } } } diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js index 74e9fb655c3..bf6941b3475 100644 --- a/erpnext/public/js/utils.js +++ b/erpnext/public/js/utils.js @@ -47,6 +47,7 @@ $.extend(erpnext, { fields: [ { "fieldtype": "Link", + "fieldname": "serial_no", "options": "Serial No", "label": __("Serial No"), "get_query": function () { @@ -60,6 +61,7 @@ $.extend(erpnext, { }, { "fieldtype": "Button", + "fieldname": "add", "label": __("Add") } ]