fix: Update frappe.link_search usage

refer https://github.com/frappe/frappe/pull/22745
This commit is contained in:
Ankush Menat 2023-10-16 15:43:14 +05:30
parent 08aec7f6d7
commit 2790ae0744

View File

@ -97,14 +97,14 @@ erpnext.ItemSelector = class ItemSelector {
}
var me = this;
frappe.link_search("Item", args, function(r) {
$.each(r.values, function(i, d) {
frappe.link_search("Item", args, function(results) {
$.each(results, function(i, d) {
if(!d.image) {
d.abbr = frappe.get_abbr(d.item_name);
d.color = frappe.get_palette(d.item_name);
}
});
me.dialog.results.html(frappe.render_template('item_selector', {'data':r.values}));
me.dialog.results.html(frappe.render_template('item_selector', {'data': results}));
});
}
};