[fix] [minor] call refresh_fields after cur_frm.call when doc is passed
This commit is contained in:
parent
742b55f700
commit
52b049145b
@ -120,6 +120,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
||||
}
|
||||
|
||||
// TODO toggle display of fields
|
||||
cur_frm.cscript.hide_fields(this.frm.doc);
|
||||
},
|
||||
|
||||
debit_to: function() {
|
||||
@ -162,7 +163,7 @@ $.extend(cur_frm.cscript, new erpnext.accounts.SalesInvoiceController({frm: cur_
|
||||
|
||||
// Hide Fields
|
||||
// ------------
|
||||
cur_frm.cscript.hide_fields = function(doc, cdt, cdn) {
|
||||
cur_frm.cscript.hide_fields = function(doc) {
|
||||
par_flds = ['project_name', 'due_date', 'is_opening', 'conversion_rate',
|
||||
'source', 'total_advance', 'gross_profit',
|
||||
'gross_profit_percent', 'get_advances_received',
|
||||
@ -189,6 +190,8 @@ cur_frm.cscript.hide_fields = function(doc, cdt, cdn) {
|
||||
var cp = wn.control_panel;
|
||||
if (cp.country == 'India') unhide_field(['c_form_applicable', 'c_form_no']);
|
||||
else hide_field(['c_form_applicable', 'c_form_no']);
|
||||
|
||||
cur_frm.refresh_fields();
|
||||
}
|
||||
|
||||
|
||||
|
@ -90,7 +90,6 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
|
||||
freeze: true,
|
||||
callback: function(r) {
|
||||
if(!r.exc) {
|
||||
me.frm.refresh_fields();
|
||||
if(me.frm.doc.price_list_name !== price_list_name) me.price_list_name();
|
||||
}
|
||||
}
|
||||
|
@ -81,9 +81,6 @@ erpnext.selling.InstallationNote = wn.ui.form.Controller.extend({
|
||||
this.frm.call({
|
||||
doc: this.frm.doc,
|
||||
method: "set_customer_defaults",
|
||||
callback: function(r) {
|
||||
if(!r.exc) me.frm.refresh_fields();
|
||||
}
|
||||
});
|
||||
|
||||
// TODO shift this to depends_on
|
||||
@ -105,9 +102,6 @@ erpnext.selling.InstallationNote = wn.ui.form.Controller.extend({
|
||||
},
|
||||
method: "get_customer_address",
|
||||
freeze: true,
|
||||
callback: function(r) {
|
||||
me.frm.refresh_fields();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -89,9 +89,6 @@ erpnext.selling.Opportunity = wn.ui.form.Controller.extend({
|
||||
this.frm.call({
|
||||
doc: this.frm.doc,
|
||||
method: "set_customer_defaults",
|
||||
callback: function(r) {
|
||||
if(!r.exc) me.frm.refresh_fields();
|
||||
}
|
||||
});
|
||||
|
||||
// TODO shift this to depends_on
|
||||
@ -208,7 +205,6 @@ cur_frm.cscript['Declare Opportunity Lost'] = function(){
|
||||
return;
|
||||
}
|
||||
dialog.hide();
|
||||
cur_frm.refresh();
|
||||
},
|
||||
btn: this
|
||||
})
|
||||
|
@ -142,7 +142,6 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
||||
freeze: true,
|
||||
callback: function(r) {
|
||||
if(!r.exc) {
|
||||
me.frm.refresh_fields();
|
||||
(me.frm.doc.price_list_name !== price_list_name) ?
|
||||
me.price_list_name() :
|
||||
me.price_list_currency();
|
||||
|
@ -29,9 +29,6 @@ erpnext.support.CustomerIssue = wn.ui.form.Controller.extend({
|
||||
this.frm.call({
|
||||
doc: this.frm.doc,
|
||||
method: "set_customer_defaults",
|
||||
callback: function(r) {
|
||||
if(!r.exc) me.frm.refresh_fields();
|
||||
}
|
||||
});
|
||||
|
||||
// TODO shift this to depends_on
|
||||
|
@ -47,9 +47,6 @@ erpnext.support.MaintenanceSchedule = wn.ui.form.Controller.extend({
|
||||
this.frm.call({
|
||||
doc: this.frm.doc,
|
||||
method: "set_customer_defaults",
|
||||
callback: function(r) {
|
||||
if(!r.exc) me.frm.refresh_fields();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -65,9 +65,6 @@ erpnext.support.MaintenanceVisit = wn.ui.form.Controller.extend({
|
||||
this.frm.call({
|
||||
doc: this.frm.doc,
|
||||
method: "set_customer_defaults",
|
||||
callback: function(r) {
|
||||
if(!r.exc) me.frm.refresh_fields();
|
||||
}
|
||||
});
|
||||
|
||||
// TODO shift this to depends_on
|
||||
|
@ -26,9 +26,6 @@ erpnext.support.CustomerIssue = wn.ui.form.Controller.extend({
|
||||
this.frm.call({
|
||||
doc: this.frm.doc,
|
||||
method: "set_customer_defaults",
|
||||
callback: function(r) {
|
||||
if(!r.exc) me.frm.refresh_fields();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user