From d9f7070f92216c2422f4e1ad262e9397fb940969 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Fri, 12 Jan 2024 14:11:37 +0530 Subject: [PATCH 1/2] fix: added indexing to improve performance (cherry picked from commit ac81323fec7287a986feaf7ba496395bf3f6a424) # Conflicts: # erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py --- .../doctype/stock_entry/stock_entry.json | 8 ++- .../stock_entry_detail.json | 5 +- .../stock_entry_detail/stock_entry_detail.py | 63 +++++++++++++++++++ 3 files changed, 71 insertions(+), 5 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.json b/erpnext/stock/doctype/stock_entry/stock_entry.json index 564c380017b..d45296f1310 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.json +++ b/erpnext/stock/doctype/stock_entry/stock_entry.json @@ -104,7 +104,8 @@ "in_standard_filter": 1, "label": "Stock Entry Type", "options": "Stock Entry Type", - "reqd": 1 + "reqd": 1, + "search_index": 1 }, { "depends_on": "eval:doc.purpose == 'Material Transfer'", @@ -546,7 +547,8 @@ "label": "Job Card", "options": "Job Card", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "search_index": 1 }, { "fieldname": "amended_from", @@ -679,7 +681,7 @@ "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2023-06-19 18:23:40.748114", + "modified": "2024-01-12 11:56:58.644882", "modified_by": "Administrator", "module": "Stock", "name": "Stock Entry", diff --git a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json index 6b1a8efc997..5e523aef999 100644 --- a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json +++ b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.json @@ -557,7 +557,8 @@ "label": "Job Card Item", "no_copy": 1, "print_hide": 1, - "read_only": 1 + "read_only": 1, + "search_index": 1 }, { "default": "0", @@ -572,7 +573,7 @@ "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2023-05-09 12:41:18.210864", + "modified": "2024-01-12 11:56:04.626103", "modified_by": "Administrator", "module": "Stock", "name": "Stock Entry Detail", diff --git a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py index 000ff2dcf8b..d7250b23069 100644 --- a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py +++ b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py @@ -6,4 +6,67 @@ from frappe.model.document import Document class StockEntryDetail(Document): +<<<<<<< HEAD +======= + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + actual_qty: DF.Float + additional_cost: DF.Currency + against_stock_entry: DF.Link | None + allow_alternative_item: DF.Check + allow_zero_valuation_rate: DF.Check + amount: DF.Currency + barcode: DF.Data | None + basic_amount: DF.Currency + basic_rate: DF.Currency + batch_no: DF.Link | None + bom_no: DF.Link | None + conversion_factor: DF.Float + cost_center: DF.Link | None + description: DF.TextEditor | None + expense_account: DF.Link | None + has_item_scanned: DF.Check + image: DF.Attach | None + is_finished_item: DF.Check + is_scrap_item: DF.Check + item_code: DF.Link + item_group: DF.Data | None + item_name: DF.Data | None + job_card_item: DF.Data | None + material_request: DF.Link | None + material_request_item: DF.Link | None + original_item: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + po_detail: DF.Data | None + project: DF.Link | None + putaway_rule: DF.Link | None + qty: DF.Float + quality_inspection: DF.Link | None + reference_purchase_receipt: DF.Link | None + retain_sample: DF.Check + s_warehouse: DF.Link | None + sample_quantity: DF.Int + sco_rm_detail: DF.Data | None + serial_and_batch_bundle: DF.Link | None + serial_no: DF.SmallText | None + set_basic_rate_manually: DF.Check + ste_detail: DF.Data | None + stock_uom: DF.Link + subcontracted_item: DF.Link | None + t_warehouse: DF.Link | None + transfer_qty: DF.Float + transferred_qty: DF.Float + uom: DF.Link + valuation_rate: DF.Currency + # end: auto-generated types + +>>>>>>> ac81323fec (fix: added indexing to improve performance) pass From c2fee6c25dc16cf44b3da930254c70ad01d9e9a3 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 12 Jan 2024 20:56:40 +0530 Subject: [PATCH 2/2] chore: fix conflicts --- .../stock_entry_detail/stock_entry_detail.py | 63 ------------------- 1 file changed, 63 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py index d7250b23069..000ff2dcf8b 100644 --- a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py +++ b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py @@ -6,67 +6,4 @@ from frappe.model.document import Document class StockEntryDetail(Document): -<<<<<<< HEAD -======= - # begin: auto-generated types - # This code is auto-generated. Do not modify anything in this block. - - from typing import TYPE_CHECKING - - if TYPE_CHECKING: - from frappe.types import DF - - actual_qty: DF.Float - additional_cost: DF.Currency - against_stock_entry: DF.Link | None - allow_alternative_item: DF.Check - allow_zero_valuation_rate: DF.Check - amount: DF.Currency - barcode: DF.Data | None - basic_amount: DF.Currency - basic_rate: DF.Currency - batch_no: DF.Link | None - bom_no: DF.Link | None - conversion_factor: DF.Float - cost_center: DF.Link | None - description: DF.TextEditor | None - expense_account: DF.Link | None - has_item_scanned: DF.Check - image: DF.Attach | None - is_finished_item: DF.Check - is_scrap_item: DF.Check - item_code: DF.Link - item_group: DF.Data | None - item_name: DF.Data | None - job_card_item: DF.Data | None - material_request: DF.Link | None - material_request_item: DF.Link | None - original_item: DF.Link | None - parent: DF.Data - parentfield: DF.Data - parenttype: DF.Data - po_detail: DF.Data | None - project: DF.Link | None - putaway_rule: DF.Link | None - qty: DF.Float - quality_inspection: DF.Link | None - reference_purchase_receipt: DF.Link | None - retain_sample: DF.Check - s_warehouse: DF.Link | None - sample_quantity: DF.Int - sco_rm_detail: DF.Data | None - serial_and_batch_bundle: DF.Link | None - serial_no: DF.SmallText | None - set_basic_rate_manually: DF.Check - ste_detail: DF.Data | None - stock_uom: DF.Link - subcontracted_item: DF.Link | None - t_warehouse: DF.Link | None - transfer_qty: DF.Float - transferred_qty: DF.Float - uom: DF.Link - valuation_rate: DF.Currency - # end: auto-generated types - ->>>>>>> ac81323fec (fix: added indexing to improve performance) pass