From 79251492fede460c4a929fc7dcd2cd05dac33dce Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 9 Aug 2013 00:20:34 +0530 Subject: [PATCH] [fix] [minor] call set_dynamic_labels after onload_post_render --- accounts/doctype/sales_invoice/sales_invoice.js | 7 +++++-- public/js/transaction.js | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/accounts/doctype/sales_invoice/sales_invoice.js b/accounts/doctype/sales_invoice/sales_invoice.js index bc36f58a48..928728bb6b 100644 --- a/accounts/doctype/sales_invoice/sales_invoice.js +++ b/accounts/doctype/sales_invoice/sales_invoice.js @@ -98,8 +98,6 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte // }, 'icon-desktop'); } - - cur_frm.cscript.hide_fields(doc, dt, dn); }, toggle_pos: function(show) { @@ -178,6 +176,11 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte entries_add: function(doc, cdt, cdn) { var row = wn.model.get_doc(cdt, cdn); this.frm.script_manager.copy_from_first_row("entries", row, ["income_account", "cost_center"]); + }, + + set_dynamic_labels: function() { + this._super(); + this.hide_fields(this.frm.doc); } }); diff --git a/public/js/transaction.js b/public/js/transaction.js index 67204f3a83..c4601dd0c9 100644 --- a/public/js/transaction.js +++ b/public/js/transaction.js @@ -42,6 +42,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({ callback: function(r) { // remove this call when using client side mapper me.set_default_values(); + me.set_dynamic_labels(); } }); }