Hi @Dbone,
Thank you so much for your kind help and advice.
try the following script
frappe.ui.form.on("Quotation", { refresh: function(frm) { cur_frm.fields_dict.items.grid.get_field("item_code").get_query = function(doc) { items = $.map( cur_frm.doc.items, function(item,idx) { return item.item_code } ) added_items = items.join(",") return { filters: { "item_code": ["not in", added_items] } } } } });
Just tested this on my setup. Works perfectly! What a fantastic script, Iām going to use this on most of my forms.