[minor] [fixes] removed onload_post_render from transaction.js, since it is already called after mapping on server side
This commit is contained in:
parent
132d3146b4
commit
a9b1c09166
@ -53,22 +53,6 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
|||||||
this.set_dynamic_labels();
|
this.set_dynamic_labels();
|
||||||
},
|
},
|
||||||
|
|
||||||
onload_post_render: function() {
|
|
||||||
if(this.frm.doc.__islocal && this.frm.doc.company) {
|
|
||||||
var me = this;
|
|
||||||
return this.frm.call({
|
|
||||||
doc: this.frm.doc,
|
|
||||||
method: "onload_post_render",
|
|
||||||
freeze: true,
|
|
||||||
callback: function(r) {
|
|
||||||
// remove this call when using client side mapper
|
|
||||||
me.set_default_values();
|
|
||||||
me.frm.refresh();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
validate: function() {
|
validate: function() {
|
||||||
this.calculate_taxes_and_totals();
|
this.calculate_taxes_and_totals();
|
||||||
},
|
},
|
||||||
@ -346,17 +330,6 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
|||||||
</table></div>';
|
</table></div>';
|
||||||
},
|
},
|
||||||
|
|
||||||
set_default_values: function() {
|
|
||||||
$.each(wn.model.get_doclist(this.frm.doctype, this.frm.docname), function(i, doc) {
|
|
||||||
var updated = wn.model.set_default_values(doc);
|
|
||||||
if(doc.parentfield) {
|
|
||||||
refresh_field(doc.parentfield);
|
|
||||||
} else {
|
|
||||||
refresh_field(updated);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
_validate_before_fetch: function(fieldname) {
|
_validate_before_fetch: function(fieldname) {
|
||||||
var me = this;
|
var me = this;
|
||||||
if(!me.frm.doc[fieldname]) {
|
if(!me.frm.doc[fieldname]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user