[Fix]Workstation holiday list

This commit is contained in:
Kanchan Chauhan 2016-11-21 11:23:01 +05:30
parent 535462fc20
commit d33c44e3a5

View File

@ -1,17 +1,19 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt // License: GNU General Public License v3. See license.txt
frappe.ui.form.on("Workstation", {
onload: function(frm) {
//--------- ONLOAD ------------- if(frm.is_new())
cur_frm.cscript.onload = function(doc, cdt, cdn) { {
frappe.call({ frappe.call({
type:"GET", type:"GET",
method:"erpnext.manufacturing.doctype.workstation.workstation.get_default_holiday_list", method:"erpnext.manufacturing.doctype.workstation.workstation.get_default_holiday_list",
callback: function(r) { callback: function(r) {
if(!r.exe && r.message){ if(!r.exe && r.message){
cur_frm.set_value("holiday_list", r.message); cur_frm.set_value("holiday_list", r.message);
} }
}
})
} }
}) }
} })