diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js
index 3ac677e..9be30aa 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.js
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js
@@ -354,9 +354,7 @@
 
 cur_frm.cscript.get_balance = function(doc,dt,dn) {
 	cur_frm.cscript.update_totals(doc);
-	return $c_obj(cur_frm.doc, 'get_balance', '', function(r, rt){
-		cur_frm.refresh();
-	});
+	cur_frm.call('get_balance', null, () => { cur_frm.refresh(); });
 }
 
 cur_frm.cscript.validate = function(doc,cdt,cdn) {
diff --git a/erpnext/crm/doctype/opportunity/opportunity.js b/erpnext/crm/doctype/opportunity/opportunity.js
index 78ff339..967459f 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.js
+++ b/erpnext/crm/doctype/opportunity/opportunity.js
@@ -115,13 +115,15 @@
 		if(!this.frm.doc.enquiry_from && this.frm.doc.lead)
 			this.frm.doc.enquiry_from = "Lead";
 
-		if(!this.frm.doc.status)
-			set_multiple(this.frm.doc.doctype, this.frm.doc.name, { status:'Open' });
-		if(!this.frm.doc.company && frappe.defaults.get_user_default("Company"))
-			set_multiple(this.frm.doc.doctype, this.frm.doc.name,
-				{ company:frappe.defaults.get_user_default("Company") });
-		if(!this.frm.doc.currency)
-			set_multiple(this.frm.doc.doctype, this.frm.doc.name, { currency:frappe.defaults.get_user_default("Currency") });
+		if(!this.frm.doc.status) {
+			frm.set_value('status', 'Open');
+		}
+		if(!this.frm.doc.company && frappe.defaults.get_user_default("Company")) {
+			frm.set_value('company', frappe.defaults.get_user_default("Company"));
+		}
+		if(!this.frm.doc.currency) {
+			frm.set_value('currency', frappe.defaults.get_user_default("Currency"));
+		}
 
 		this.setup_queries();
 	},
diff --git a/erpnext/hr/doctype/appraisal/appraisal.js b/erpnext/hr/doctype/appraisal/appraisal.js
index 30317d9..1224282 100644
--- a/erpnext/hr/doctype/appraisal/appraisal.js
+++ b/erpnext/hr/doctype/appraisal/appraisal.js
@@ -1,77 +1,54 @@
 // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
-cur_frm.add_fetch('employee', 'company', 'company');
-cur_frm.add_fetch('employee', 'employee_name', 'employee_name');
-
-cur_frm.cscript.onload = function(doc,cdt,cdn){
-	if(!doc.status)
-		set_multiple(cdt,cdn,{status:'Draft'});
-	if(doc.amended_from && doc.__islocal) {
-		doc.status = "Draft";
-	}
-}
-
-cur_frm.cscript.onload_post_render = function(doc,cdt,cdn){
-	if(doc.__islocal && doc.employee==frappe.defaults.get_user_default("Employee")) {
-		cur_frm.set_value("employee", "");
-		cur_frm.set_value("employee_name", "")
-	}
-}
-
-cur_frm.cscript.refresh = function(doc,cdt,cdn){
-
-}
-
-cur_frm.cscript.kra_template = function(doc, dt, dn) {
-	doc.goals = [];
-	erpnext.utils.map_current_doc({
-		method: "erpnext.hr.doctype.appraisal.appraisal.fetch_appraisal_template",
-		source_name: cur_frm.doc.kra_template,
-		frm: cur_frm
-	});
-}
-
-cur_frm.cscript.calculate_total_score = function(doc,cdt,cdn){
-	//return get_server_fields('calculate_total','','',doc,cdt,cdn,1);
-	var val = doc.goals || [];
-	var total =0;
-	for(var i = 0; i<val.length; i++){
-		total = flt(total)+flt(val[i].score_earned)
-	}
-	doc.total_score = flt(total)
-	refresh_field('total_score')
-}
-
-cur_frm.cscript.score = function(doc,cdt,cdn){
-	var d = locals[cdt][cdn];
-	if (d.score){
-		if (flt(d.score) > 5) {
-			frappe.msgprint(__("Score must be less than or equal to 5"));
-			d.score = 0;
-			refresh_field('score', d.name, 'goals');
+frappe.ui.form.on('Appraisal', {
+	setup: function(frm) {
+		frm.add_fetch('employee', 'company', 'company');
+		frm.add_fetch('employee', 'employee_name', 'employee_name');
+		frm.fields_dict.employee.get_query = function(doc,cdt,cdn) {
+			return{	query: "erpnext.controllers.queries.employee_query" }
+		};
+	},
+	onload: function(frm) {
+		if(!frm.doc.status) {
+			frm.set_value('status', 'Open');
 		}
-		var total = flt(d.per_weightage*d.score)/100;
-		d.score_earned = total.toPrecision(2);
-		refresh_field('score_earned', d.name, 'goals');
+	},
+	kra_template: function(frm) {
+		frm.doc.goals = [];
+		erpnext.utils.map_current_doc({
+			method: "erpnext.hr.doctype.appraisal.appraisal.fetch_appraisal_template",
+			source_name: frm.doc.kra_template,
+			frm: frm
+		});
+	},
+	calculate_total: function(frm) {
+		let goals = frm.doc.goals || [];
+		let total =0;
+		for(let i = 0; i<goals.length; i++){
+			total = flt(total)+flt(goals[i].score_earned)
+		}
+		frm.set_value('total_score', total);
 	}
-	else{
-		d.score_earned = 0;
-		refresh_field('score_earned', d.name, 'goals');
-	}
-	cur_frm.cscript.calculate_total(doc,cdt,cdn);
-}
+});
 
-cur_frm.cscript.calculate_total = function(doc,cdt,cdn){
-	var val = doc.goals || [];
-	var total =0;
-	for(var i = 0; i<val.length; i++){
-		total = flt(total)+flt(val[i].score_earned);
+frappe.ui.form.on('Appraisal Goal', {
+	score: function(frm, cdt, cdn) {
+		var d = locals[cdt][cdn];
+		if (d.score){
+			if (flt(d.score) > 5) {
+				frappe.msgprint(__("Score must be less than or equal to 5"));
+				d.score = 0;
+				refresh_field('score', d.name, 'goals');
+			}
+			var total = flt(d.per_weightage*d.score)/100;
+			d.score_earned = total.toPrecision(2);
+			refresh_field('score_earned', d.name, 'goals');
+		}
+		else{
+			d.score_earned = 0;
+			refresh_field('score_earned', d.name, 'goals');
+		}
+		frm.trigger('calculate_total');
 	}
-	doc.total_score = flt(total);
-	refresh_field('total_score');
-}
-
-cur_frm.fields_dict.employee.get_query = function(doc,cdt,cdn) {
-	return{	query: "erpnext.controllers.queries.employee_query" }
-}
+});
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
index 7aeb8ea..5ab2edd 100644
--- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
+++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
@@ -1,32 +1,18 @@
 // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
-cur_frm.cscript.onload = function (doc, dt, dn) {
-	if (!doc.posting_date)
-		set_multiple(dt, dn, { posting_date: frappe.datetime.get_today() });
-	if (!doc.leave_transaction_type)
-		set_multiple(dt, dn, { leave_transaction_type: 'Allocation' });
-}
-
-cur_frm.cscript.to_date = function (doc, cdt, cdn) {
-	return $c('runserverobj', { 'method': 'to_date_validation', 'docs': doc },
-		function (r, rt) {
-			var doc = locals[cdt][cdn];
-			if (r.message) {
-				frappe.msgprint(__("To date cannot be before from date"));
-				doc.to_date = '';
-				refresh_field('to_date');
-			}
-		}
-	);
-}
-
-cur_frm.cscript.allocation_type = function (doc, cdt, cdn) {
-	doc.no_of_days = '';
-	refresh_field('no_of_days');
-}
-
 frappe.ui.form.on("Leave Control Panel", {
+	onload: function(frm) {
+		if (!frm.doc.posting_date) {
+			frm.set_value('posting_date', frappe.datetime.get_today());
+		}
+		if (!frm.doc.leave_transaction_type) {
+			frm.set_value('leave_transaction_type', 'Allocation');
+		}
+	},
+	refresh: function(frm) {
+		frm.disable_save();
+	},
 	company: function(frm) {
 		if(frm.doc.company) {
 			frm.set_query("department", function() {
@@ -38,7 +24,7 @@
 			});
 		}
 	},
-	refresh: function(frm) {
-		frm.disable_save();
+	allocation_type: function (frm) {
+		frm.set_value('no_of_days', '');
 	}
 });
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py
index 098002d..57e61b5 100644
--- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py
+++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py
@@ -27,10 +27,7 @@
 		for f in ["from_date", "to_date", "leave_type", "no_of_days"]:
 			if not self.get(f):
 				frappe.throw(_("{0} is required").format(self.meta.get_label(f)))
-
-	def to_date_validation(self):
-		if date_diff(self.to_date, self.from_date) <= 0:
-			return "Invalid period"
+		self.validate_from_to_dates('from_date', 'to_date')
 
 	def allocate_leave(self):
 		self.validate_values()
diff --git a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.js b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.js
index 79f9e63..ce95db3 100644
--- a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.js
+++ b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.js
@@ -7,6 +7,18 @@
 	setup: function(frm) {
 		frm.set_query('contact_person', erpnext.queries.contact_query);
 		frm.set_query('customer_address', erpnext.queries.address_query);
+		frm.set_query('customer', erpnext.queries.customer);
+
+		frm.add_fetch('item_code', 'item_name', 'item_name');
+		frm.add_fetch('item_code', 'description', 'description');
+	},
+	onload: function(frm) {
+		if (!frm.doc.status) {
+			frm.set_value({status:'Draft'});
+		}
+		if (frm.doc.__islocal) {
+			frm.set_value({transaction_date: frappe.datetime.get_today()});
+		}
 	},
 	customer: function(frm) {
 		erpnext.utils.get_party_details(frm)
@@ -16,8 +28,14 @@
 	},
 	contact_person: function(frm) {
 		erpnext.utils.get_contact_details(frm);
+	},
+	generate_schedule: function(frm) {
+		if (frm.is_new()) {
+			frappe.msgprint(__('Please save first'));
+		} else {
+			frm.call('generate_schedule');
+		}
 	}
-
 })
 
 // TODO commonify this code
@@ -93,30 +111,3 @@
 
 $.extend(cur_frm.cscript, new erpnext.maintenance.MaintenanceSchedule({frm: cur_frm}));
 
-cur_frm.cscript.onload = function(doc, dt, dn) {
-	if(!doc.status) set_multiple(dt,dn,{status:'Draft'});
-
-	if(doc.__islocal){
-		set_multiple(dt,dn,{transaction_date: frappe.datetime.get_today()});
-	}
-
-	// set add fetch for item_code's item_name and description
-	cur_frm.add_fetch('item_code', 'item_name', 'item_name');
-	cur_frm.add_fetch('item_code', 'description', 'description');
-
-}
-
-cur_frm.cscript.generate_schedule = function(doc, cdt, cdn) {
-	if (!doc.__islocal) {
-		return $c('runserverobj', {'method':'generate_schedule', 'docs':doc},
-			function(r, rt) {
-				refresh_field('schedules');
-			});
-	} else {
-		frappe.msgprint(__("Please save the document before generating maintenance schedule"));
-	}
-}
-
-cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
-	return { query: "erpnext.controllers.queries.customer_query" }
-}
diff --git a/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.js b/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.js
index a4f3abc..f3fc011 100644
--- a/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.js
+++ b/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.js
@@ -7,9 +7,18 @@
 	setup: function(frm) {
 		frm.set_query('contact_person', erpnext.queries.contact_query);
 		frm.set_query('customer_address', erpnext.queries.address_query);
+		frm.set_query('customer', erpnext.queries.customer);
+	},
+	onload: function(frm) {
+		if (!frm.doc.status) {
+			frm.set_value({status:'Draft'});
+		}
+		if (frm.doc.__islocal) {
+			frm.set_value({mntc_date: frappe.datetime.get_today()});
+		}
 	},
 	customer: function(frm) {
-		erpnext.utils.get_party_details(frm)
+		erpnext.utils.get_party_details(frm);
 	},
 	customer_address: function(frm) {
 		erpnext.utils.get_address_display(frm, 'customer_address', 'address_display');
@@ -79,17 +88,4 @@
 	},
 });
 
-$.extend(cur_frm.cscript, new erpnext.maintenance.MaintenanceVisit({frm: cur_frm}));
-
-cur_frm.cscript.onload = function(doc, dt, dn) {
-	if(!doc.status) set_multiple(dt,dn,{status:'Draft'});
-	if(doc.__islocal) set_multiple(dt,dn,{mntc_date: frappe.datetime.get_today()});
-
-	// set add fetch for item_code's item_name and description
-	cur_frm.add_fetch('item_code', 'item_name', 'item_name');
-	cur_frm.add_fetch('item_code', 'description', 'description');
-}
-
-cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
-	return {query: "erpnext.controllers.queries.customer_query" }
-}
+$.extend(cur_frm.cscript, new erpnext.maintenance.MaintenanceVisit({frm: cur_frm}));
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.js b/erpnext/manufacturing/doctype/production_plan/production_plan.js
index 58fc29e..e4af255 100644
--- a/erpnext/manufacturing/doctype/production_plan/production_plan.js
+++ b/erpnext/manufacturing/doctype/production_plan/production_plan.js
@@ -198,7 +198,8 @@
 	},
 
 	download_materials_required: function(frm) {
-		$c_obj_csv(frm.doc, 'download_raw_materials', '', '');
+		let get_template_url = 'erpnext.manufacturing.doctype.production_plan.production_plan.download_raw_materials';
+		open_url_post(frappe.request.url, { cmd: get_template_url, name: frm.doc.name });
 	},
 
 	show_progress: function(frm) {
diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py
index 18ca9cc..e0a0ac6 100644
--- a/erpnext/manufacturing/doctype/production_plan/production_plan.py
+++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py
@@ -5,11 +5,13 @@
 from __future__ import unicode_literals
 import frappe, json
 from frappe import msgprint, _
-from frappe.model.document import Document
-from erpnext.manufacturing.doctype.bom.bom import validate_bom_no, get_children
-from frappe.utils import cstr, flt, cint, nowdate, add_days, comma_and, now_datetime, ceil
-from erpnext.manufacturing.doctype.work_order.work_order import get_item_details
 from six import string_types, iteritems
+
+from frappe.model.document import Document
+from frappe.utils import cstr, flt, cint, nowdate, add_days, comma_and, now_datetime, ceil
+from frappe.utils.csvutils import build_csv_response
+from erpnext.manufacturing.doctype.bom.bom import validate_bom_no, get_children
+from erpnext.manufacturing.doctype.work_order.work_order import get_item_details
 from erpnext.setup.doctype.item_group.item_group import get_item_group_defaults
 
 class ProductionPlan(Document):
@@ -404,25 +406,29 @@
 		else :
 			msgprint(_("No material request created"))
 
-	def download_raw_materials(self):
-		item_list = [['Item Code', 'Description', 'Stock UOM', 'Required Qty', 'Warehouse',
-			'projected Qty', 'Actual Qty']]
+@frappe.whitelist()
+def download_raw_materials(production_plan):
+	doc = frappe.get_doc('Production Plan', production_plan)
+	doc.check_permission()
 
-		doc = self.as_dict()
-		for d in get_items_for_material_requests(doc, ignore_existing_ordered_qty=True):
-			item_list.append([d.get('item_code'), d.get('description'), d.get('stock_uom'), d.get('quantity'),
-				d.get('warehouse'), d.get('projected_qty'), d.get('actual_qty')])
+	item_list = [['Item Code', 'Description', 'Stock UOM', 'Required Qty', 'Warehouse',
+		'projected Qty', 'Actual Qty']]
 
-			if not self.for_warehouse:
-				row = {'item_code': d.get('item_code')}
-				for bin_dict in get_bin_details(row, self.company, all_warehouse=True):
-					if d.get("warehouse") == bin_dict.get('warehouse'):
-						continue
+	doc = doc.as_dict()
+	for d in get_items_for_material_requests(doc, ignore_existing_ordered_qty=True):
+		item_list.append([d.get('item_code'), d.get('description'), d.get('stock_uom'), d.get('quantity'),
+			d.get('warehouse'), d.get('projected_qty'), d.get('actual_qty')])
 
-					item_list.append(['', '', '', '', bin_dict.get('warehouse'),
-						bin_dict.get('projected_qty'), bin_dict.get('actual_qty')])
+		if not doc.for_warehouse:
+			row = {'item_code': d.get('item_code')}
+			for bin_dict in get_bin_details(row, doc.company, all_warehouse=True):
+				if d.get("warehouse") == bin_dict.get('warehouse'):
+					continue
 
-		return item_list
+				item_list.append(['', '', '', '', bin_dict.get('warehouse'),
+					bin_dict.get('projected_qty'), bin_dict.get('actual_qty')])
+
+	build_csv_response(item_list)
 
 def get_exploded_items(item_details, company, bom_no, include_non_stock_items, planned_qty=1):
 	for d in frappe.db.sql("""select bei.item_code, item.default_bom as bom,
diff --git a/erpnext/projects/doctype/task/task.js b/erpnext/projects/doctype/task/task.js
index 9a8af69..1f609d7 100644
--- a/erpnext/projects/doctype/task/task.js
+++ b/erpnext/projects/doctype/task/task.js
@@ -60,13 +60,6 @@
 		};
 	},
 
-	project: function(frm) {
-		if(frm.doc.project) {
-			return get_server_fields('get_project_details', '','', frm.doc, frm.doc.doctype,
-				frm.doc.name, 1);
-		}
-	},
-
 	is_group: function (frm) {
 		frappe.call({
 			method: "erpnext.projects.doctype.task.task.check_if_child_exists",
diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py
index fa9a5a5..b5e4ff8 100755
--- a/erpnext/projects/doctype/task/task.py
+++ b/erpnext/projects/doctype/task/task.py
@@ -20,11 +20,6 @@
 	def get_feed(self):
 		return '{0}: {1}'.format(_(self.status), self.subject)
 
-	def get_project_details(self):
-		return {
-			"project": self.project
-		}
-
 	def get_customer_details(self):
 		cust = frappe.db.sql("select customer_name from `tabCustomer` where name=%s", self.customer)
 		if cust:
diff --git a/erpnext/selling/doctype/installation_note/installation_note.js b/erpnext/selling/doctype/installation_note/installation_note.js
index 9f0c050..a8d9ae8 100644
--- a/erpnext/selling/doctype/installation_note/installation_note.js
+++ b/erpnext/selling/doctype/installation_note/installation_note.js
@@ -1,46 +1,36 @@
 // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
-
-
-frappe.ui.form.on_change("Installation Note", "customer",
-	function(frm) { erpnext.utils.get_party_details(frm); });
-
-frappe.ui.form.on_change("Installation Note", "customer_address",
-	function(frm) { erpnext.utils.get_address_display(frm); });
-
-frappe.ui.form.on_change("Installation Note", "contact_person",
-	function(frm) { erpnext.utils.get_contact_details(frm); });
-
-frappe.provide("erpnext.selling");
-// TODO commonify this code
-erpnext.selling.InstallationNote = frappe.ui.form.Controller.extend({
-	onload: function() {
-		if(!this.frm.doc.status) {
-			set_multiple(this.frm.doc.doctype, this.frm.doc.name, { status:'Draft'});
-		}
-		if(this.frm.doc.__islocal) {
-			set_multiple(this.frm.doc.doctype, this.frm.doc.name,
-				{inst_date: frappe.datetime.get_today()});
-		}
-
-		this.setup_queries();
-	},
-
-	setup_queries: function() {
-		var me = this;
-
+frappe.ui.form.on('Installation Note', {
+	setup: function(frm) {
 		frappe.dynamic_link = {doc: this.frm.doc, fieldname: 'customer', doctype: 'Customer'}
 		frm.set_query('customer_address', erpnext.queries.address_query);
-		this.frm.set_query('contact_person', erpnext.queries.contact_query);
-
-		this.frm.set_query("customer", function() {
-			return {
-				query: "erpnext.controllers.queries.customer_query"
-			}
-		});
+		frm.set_query('contact_person', erpnext.queries.contact_query);
+		frm.set_query('customer', erpnext.queries.customer);
 	},
+	onload: function(frm) {
+		if(!frm.doc.status) {
+			frm.set_value({ status:'Draft'});
+		}
+		if(frm.doc.__islocal) {
+			frm.set_value({inst_date: frappe.datetime.get_today()});
+		}
+	},
+	customer: function(frm) {
+		erpnext.utils.get_party_details(frm);
+	},
+	customer_address: function(frm) {
+		erpnext.utils.get_address_display(frm);
+	},
+	contact_person: function(frm) {
+		erpnext.utils.get_contact_details(frm);
+	}
+});
 
+frappe.provide("erpnext.selling");
+
+// TODO commonify this code
+erpnext.selling.InstallationNote = frappe.ui.form.Controller.extend({
 	refresh: function() {
 		var me = this;
 		if (this.frm.doc.docstatus===0) {
diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js
index 308b8ed..1218dd3 100644
--- a/erpnext/selling/page/point_of_sale/point_of_sale.js
+++ b/erpnext/selling/page/point_of_sale/point_of_sale.js
@@ -573,7 +573,7 @@
 
 		function get_frm(_frm) {
 			const page = $('<div>');
-			const frm = _frm || new _f.Frm(doctype, page, false);
+			const frm = _frm || new frappe.ui.form.Form(doctype, page, false);
 			const name = frappe.model.make_new_doc_and_get_name(doctype, true);
 			frm.refresh(name);
 			frm.doc.items = [];
diff --git a/erpnext/setup/doctype/email_digest/email_digest.js b/erpnext/setup/doctype/email_digest/email_digest.js
index fcd0b0e..1071ea2 100644
--- a/erpnext/setup/doctype/email_digest/email_digest.js
+++ b/erpnext/setup/doctype/email_digest/email_digest.js
@@ -3,9 +3,6 @@
 
 cur_frm.cscript.refresh = function(doc, dt, dn) {
 	doc = locals[dt][dn];
-	var save_msg = __("You must Save the form before proceeding");
-	var err_msg = __("There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists.")
-
 	cur_frm.add_custom_button(__('View Now'), function() {
 		frappe.call({
 			method: 'erpnext.setup.doctype.email_digest.email_digest.get_digest_msg',
@@ -23,61 +20,47 @@
 		});
 	}, "fa fa-eye-open", "btn-default");
 
-	if(frappe.session.user==="Administrator") {
+	if (!cur_frm.is_new()) {
 		cur_frm.add_custom_button(__('Send Now'), function() {
-			doc = locals[dt][dn];
-			if(doc.__unsaved != 1) {
-				return $c_obj(doc, 'send', '', function(r, rt) {
-					if(r.exc) {
-						frappe.msgprint(err_msg);
-						console.log(r.exc);
-					} else {
-						//console.log(arguments);
-						frappe.msgprint(__('Message Sent'));
-					}
-				});
-			} else {
-				frappe.msgprint(save_msg);
-			}
-		}, "fa fa-envelope", "btn-default");
+			return cur_frm.call('send', null, (r) => {
+				frappe.show_alert(__('Message Sent'));
+			});
+		});
 	}
-}
+};
 
 cur_frm.cscript.addremove_recipients = function(doc, dt, dn) {
 	// Get user list
-	return $c_obj(doc, 'get_users', '', function(r, rt) {
-		if(r.exc) {
-			frappe.msgprint(r.exc);
-		} else {
-			// Open a dialog and display checkboxes against email addresses
-			doc = locals[dt][dn];
-			var d = new frappe.ui.Dialog({
-				title: __('Add/Remove Recipients'),
-				width: 400
-			});
 
-			$.each(r.user_list, function(i, v) {
-				var fullname = frappe.user.full_name(v.name);
-				if(fullname !== v.name) fullname = fullname + " &lt;" + v.name + "&gt;";
+	return cur_frm.call('get_users', null, function(r) {
+		// Open a dialog and display checkboxes against email addresses
+		doc = locals[dt][dn];
+		var d = new frappe.ui.Dialog({
+			title: __('Add/Remove Recipients'),
+			width: 400
+		});
 
-				if(v.enabled==0) {
-					fullname = repl("<span style='color: red'> %(name)s (" + __("disabled user") + ")</span>", {name: v.name});
-				}
+		$.each(r.user_list, function(i, v) {
+			var fullname = frappe.user.full_name(v.name);
+			if(fullname !== v.name) fullname = fullname + " &lt;" + v.name + "&gt;";
 
-				$('<div class="checkbox"><label>\
-					<input type="checkbox" data-id="' + v.name + '"'+
-						(v.checked ? 'checked' : '') +
-				'> '+ fullname +'</label></div>').appendTo(d.body);
-			});
+			if(v.enabled==0) {
+				fullname = repl("<span style='color: red'> %(name)s (" + __("disabled user") + ")</span>", {name: v.name});
+			}
 
-			// Display add recipients button
-			d.set_primary_action("Update", function() {
-				cur_frm.cscript.add_to_rec_list(doc, d.body, r.user_list.length);
-			});
+			$('<div class="checkbox"><label>\
+				<input type="checkbox" data-id="' + v.name + '"'+
+					(v.checked ? 'checked' : '') +
+			'> '+ fullname +'</label></div>').appendTo(d.body);
+		});
 
-			cur_frm.rec_dialog = d;
-			d.show();
-		}
+		// Display add recipients button
+		d.set_primary_action("Update", function() {
+			cur_frm.cscript.add_to_rec_list(doc, d.body, r.user_list.length);
+		});
+
+		cur_frm.rec_dialog = d;
+		d.show();
 	});
 }
 
diff --git a/erpnext/setup/doctype/global_defaults/global_defaults.js b/erpnext/setup/doctype/global_defaults/global_defaults.js
index 58b8c51..552331a 100644
--- a/erpnext/setup/doctype/global_defaults/global_defaults.js
+++ b/erpnext/setup/doctype/global_defaults/global_defaults.js
@@ -1,17 +1,15 @@
 // Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
-$.extend(cur_frm.cscript, {
-	onload: function (doc, cdt, cdn) {
-		cur_frm.trigger("get_distance_uoms");
+frappe.ui.form.on('Global Defaults', {
+	onload: function(frm) {
+		frm.trigger('get_distance_uoms');
 	},
-
-	validate: function (doc, cdt, cdn) {
-		return $c_obj(doc, 'get_defaults', '', function (r, rt) {
+	validate: function(frm) {
+		frm.call('get_defaults', null, r => {
 			frappe.sys_defaults = r.message;
-		});
+		})
 	},
-
 	get_distance_uoms: function (frm) {
 		let units = [];
 
@@ -27,9 +25,8 @@
 				r.message.forEach(row => units.push(row.to_uom));
 			}
 		});
-
-		cur_frm.set_query("default_distance_unit", function (doc) {
+		frm.set_query("default_distance_unit", function () {
 			return { filters: { "name": ["IN", units] } };
-		})
+		});
 	}
 });
diff --git a/erpnext/support/doctype/warranty_claim/warranty_claim.js b/erpnext/support/doctype/warranty_claim/warranty_claim.js
index ac8eb8d..2dc78f4 100644
--- a/erpnext/support/doctype/warranty_claim/warranty_claim.js
+++ b/erpnext/support/doctype/warranty_claim/warranty_claim.js
@@ -7,6 +7,23 @@
 	setup: function(frm) {
 		frm.set_query('contact_person', erpnext.queries.contact_query);
 		frm.set_query('customer_address', erpnext.queries.address_query);
+		frm.set_query('customer', erpnext.queries.customer);
+
+		frm.add_fetch('serial_no', 'item_code', 'item_code');
+		frm.add_fetch('serial_no', 'item_name', 'item_name');
+		frm.add_fetch('serial_no', 'description', 'description');
+		frm.add_fetch('serial_no', 'maintenance_status', 'warranty_amc_status');
+		frm.add_fetch('serial_no', 'warranty_expiry_date', 'warranty_expiry_date');
+		frm.add_fetch('serial_no', 'amc_expiry_date', 'amc_expiry_date');
+		frm.add_fetch('serial_no', 'customer', 'customer');
+		frm.add_fetch('serial_no', 'customer_name', 'customer_name');
+		frm.add_fetch('item_code', 'item_name', 'item_name');
+		frm.add_fetch('item_code', 'description', 'description');
+	},
+	onload: function(frm) {
+		if(!frm.doc.status) {
+			frm.set_value('status', 'Open');
+		}
 	},
 	customer: function(frm) {
 		erpnext.utils.get_party_details(frm);
@@ -40,11 +57,6 @@
 
 $.extend(cur_frm.cscript, new erpnext.support.WarrantyClaim({frm: cur_frm}));
 
-cur_frm.cscript.onload = function(doc,cdt,cdn){
-	if(!doc.status)
-		set_multiple(cdt,cdn,{status:'Open'});
-}
-
 cur_frm.fields_dict['serial_no'].get_query = function(doc, cdt, cdn) {
 	var cond = [];
 	var filter = [
@@ -63,17 +75,6 @@
 	}
 }
 
-cur_frm.add_fetch('serial_no', 'item_code', 'item_code');
-cur_frm.add_fetch('serial_no', 'item_name', 'item_name');
-cur_frm.add_fetch('serial_no', 'description', 'description');
-cur_frm.add_fetch('serial_no', 'maintenance_status', 'warranty_amc_status');
-cur_frm.add_fetch('serial_no', 'warranty_expiry_date', 'warranty_expiry_date');
-cur_frm.add_fetch('serial_no', 'amc_expiry_date', 'amc_expiry_date');
-cur_frm.add_fetch('serial_no', 'customer', 'customer');
-cur_frm.add_fetch('serial_no', 'customer_name', 'customer_name');
-cur_frm.add_fetch('item_code', 'item_name', 'item_name');
-cur_frm.add_fetch('item_code', 'description', 'description');
-
 cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) {
 	if(doc.serial_no) {
 		return{
@@ -92,10 +93,4 @@
 			]
 		}
 	}
-}
-
-
-
-cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
-	return{	query: "erpnext.controllers.queries.customer_query" } }
-
+}l
\ No newline at end of file
