only fetch distinct names of events (#11846)
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index c9e7733..bb6b0a0 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -668,7 +668,7 @@
data = frappe.db.sql("""
select
- `tabSales Order`.name, `tabSales Order`.customer_name, `tabSales Order`.status,
+ distinct `tabSales Order`.name, `tabSales Order`.customer_name, `tabSales Order`.status,
`tabSales Order`.delivery_status, `tabSales Order`.billing_status,
`tabSales Order Item`.delivery_date
from