perf: index most queried fields in Leave Ledger Entry
This commit is contained in:
@@ -27,7 +27,8 @@
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 1,
|
||||
"label": "Employee",
|
||||
"options": "Employee"
|
||||
"options": "Employee",
|
||||
"search_index": 1
|
||||
},
|
||||
{
|
||||
"fetch_from": "employee.employee_name",
|
||||
@@ -57,13 +58,15 @@
|
||||
"fieldtype": "Link",
|
||||
"in_standard_filter": 1,
|
||||
"label": "Transaction Type",
|
||||
"options": "DocType"
|
||||
"options": "DocType",
|
||||
"search_index": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "transaction_name",
|
||||
"fieldtype": "Dynamic Link",
|
||||
"label": "Transaction Name",
|
||||
"options": "transaction_type"
|
||||
"options": "transaction_type",
|
||||
"search_index": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "leaves",
|
||||
@@ -123,7 +126,7 @@
|
||||
"index_web_pages_for_search": 1,
|
||||
"is_submittable": 1,
|
||||
"links": [],
|
||||
"modified": "2021-01-04 18:47:45.146652",
|
||||
"modified": "2023-11-17 12:36:36.963697",
|
||||
"modified_by": "Administrator",
|
||||
"module": "HR",
|
||||
"name": "Leave Ledger Entry",
|
||||
@@ -186,5 +189,6 @@
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_order": "ASC",
|
||||
"states": [],
|
||||
"title_field": "employee"
|
||||
}
|
||||
@@ -225,3 +225,7 @@ def expire_carried_forward_allocation(allocation):
|
||||
to_date=allocation.to_date,
|
||||
)
|
||||
create_leave_ledger_entry(allocation, args)
|
||||
|
||||
|
||||
def on_doctype_update():
|
||||
frappe.db.add_index("Leave Ledger Entry", ["transaction_type", "transaction_name"])
|
||||
|
||||
Reference in New Issue
Block a user