Merge pull request #37528 from s-aga-r/FIX-4360
perf: index `dn_detail` in `Delivery Note Item`
diff --git a/erpnext/public/js/utils/item_selector.js b/erpnext/public/js/utils/item_selector.js
index 9fc2640..e74d291 100644
--- a/erpnext/public/js/utils/item_selector.js
+++ b/erpnext/public/js/utils/item_selector.js
@@ -97,14 +97,14 @@
}
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}));
});
}
};
diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
index 466e8e7..cdf5053 100644
--- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
@@ -2142,8 +2142,6 @@
for entry in gl_entries:
self.assertEqual(abs(entry.debit + entry.credit), abs(sl_entries[0].stock_value_difference))
- self.assertIsNotNone(get_gl_entries(pr_return.doctype, pr_return.name))
-
def prepare_data_for_internal_transfer():
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_internal_supplier