hello Everybody,
when creating new invoice
I need to make items filtered by the item group which the user selected in item Group ?
I tried this stuff but not working
frappe.ui.form.on("Contracting Invoice","item_group", { function(frm)
{
cur_frm.fields_dict['items'].grid.get_field('item_code').get_query = function(doc) {
return {
filters:['Item', 'item_group', 'in', doc.item_group]
};console.log(cur_frm.doc.item_group)
};
}});