removed languages filled methods, added this methods into new file
This commit is contained in:
parent
c14f2c29b9
commit
6b6977a090
@ -1,6 +1,8 @@
|
|||||||
// 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.require("assets/erpnext/js/controllers/load_languages.js")
|
||||||
|
|
||||||
frappe.ui.form.on("Supplier", {
|
frappe.ui.form.on("Supplier", {
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
frm.cscript.make_dashboard(frm.doc);
|
frm.cscript.make_dashboard(frm.doc);
|
||||||
@ -88,22 +90,3 @@ cur_frm.fields_dict['accounts'].grid.get_field('account').get_query = function(d
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.before_load = function(doc, dt, dn, callback) {
|
|
||||||
var update_language_select = function(user_language) {
|
|
||||||
cur_frm.set_df_property("print_language", "options", frappe.languages || ["", "English"]);
|
|
||||||
callback && callback();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!frappe.languages) {
|
|
||||||
frappe.call({
|
|
||||||
method: "frappe.core.doctype.user.user.get_languages",
|
|
||||||
callback: function(r) {
|
|
||||||
frappe.languages = r.message.languages;
|
|
||||||
update_language_select();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
update_language_select();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user