From baa789be347d14420b66498cd978c5a8380d6d2a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 20 Mar 2023 14:48:46 +0530 Subject: [PATCH] perf: index against_sales_invoice field on DN items (backport #34509) (#34510) perf: index against_sales_invoice field on DN items (#34509) This is used on Sales invoice dashboard and takes a lot of time to load as db size increases. Results: Before: ~10-20 seconds to load dashboard After: few milliseconds because of index [skip ci] (cherry picked from commit 109a9f1390306740fa91f05ca458f5f1a968d6b8) Co-authored-by: Ankush Menat --- .../stock/doctype/delivery_note_item/delivery_note_item.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json index 916ab2a05be..1763269193a 100644 --- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json +++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.json @@ -636,7 +636,8 @@ "no_copy": 1, "options": "Sales Invoice", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "search_index": 1 }, { "fieldname": "so_detail", @@ -837,7 +838,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2022-11-09 12:17:50.850142", + "modified": "2023-03-20 14:24:10.406746", "modified_by": "Administrator", "module": "Stock", "name": "Delivery Note Item",