[minor] setup wizard via error report
This commit is contained in:
parent
92015a1268
commit
8f96c39be6
@ -419,23 +419,25 @@ $.extend(erpnext.wiz, {
|
|||||||
load_chart_of_accounts: function(slide) {
|
load_chart_of_accounts: function(slide) {
|
||||||
var country = slide.wiz.get_values().country;
|
var country = slide.wiz.get_values().country;
|
||||||
|
|
||||||
frappe.call({
|
if(country) {
|
||||||
method: "erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts.get_charts_for_country",
|
frappe.call({
|
||||||
args: {"country": country},
|
method: "erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts.get_charts_for_country",
|
||||||
callback: function(r) {
|
args: {"country": country},
|
||||||
if(r.message) {
|
callback: function(r) {
|
||||||
slide.get_input("chart_of_accounts").empty()
|
if(r.message) {
|
||||||
.add_options(r.message);
|
slide.get_input("chart_of_accounts").empty()
|
||||||
|
.add_options(r.message);
|
||||||
|
|
||||||
if (r.message.length===1) {
|
if (r.message.length===1) {
|
||||||
var field = slide.get_field("chart_of_accounts");
|
var field = slide.get_field("chart_of_accounts");
|
||||||
field.set_value(r.message[0]);
|
field.set_value(r.message[0]);
|
||||||
field.df.hidden = 1;
|
field.df.hidden = 1;
|
||||||
field.refresh();
|
field.refresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
bind_events: function(slide) {
|
bind_events: function(slide) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user