[fix] [minor] new grid fix to hide other grid

This commit is contained in:
Akhilesh Darjee 2013-09-30 12:44:00 +05:30
parent d086d724b6
commit 7d36fc821b

View File

@ -13,11 +13,9 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.cscript.show_item_prices = function() {
var item_price = wn.model.get("Item Price", {parent: cur_frm.doc.name});
var show = item_price && item_price.length;
cur_frm.toggle_display("item_prices", show);
cur_frm.toggle_display("item_prices", true);
$(cur_frm.fields_dict.item_prices.wrapper).empty();
if (!show) return;
new wn.ui.form.TableGrid({
parent: cur_frm.fields_dict.item_prices.wrapper,