Hi,
Try below code,
frappe.ui.form.on("Quotation", "item_group", function (frm, cdt, cdn) {
if(frm.doc.__islocal) {
frappe.call({
method: "frappe.client.get_list",
args: {
doctype: "Item",
filters: {
"item_group": frm.doc.item_group,
"is_sales_item": 1
},
fields:["item_code", "item_name", "description", "stock_uom"]
},
callback: function(r) {
var items = [];
frm.clear_table("items");
for(var i=0; i< r.message.length; i++) {
var d = frm.add_child("items");
$.extend(d, r.message[i]);
if(!d.qty) d.qty = 1;
if(!d.uom) d.uom = d.stock_uom;
}
frm.refresh_field("items");
}
})
}
});