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