Skip to content

Commit

Permalink
fix: Delayed Order Report not working (#41037)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure committed Apr 16, 2024
1 parent 42a5e61 commit d69a18b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ def filter_transactions_data(self, consolidated=False):
filters = {"parent": ("in", sales_orders), "name": ("in", sales_order_items)}

so_data = {}
for d in frappe.get_all(doctype, filters=filters, fields=["delivery_date", "parent", "name"]):
fields = ["delivery_date", "name"]
if frappe.db.has_column(doctype, "parent"):
fields.append("parent")

for d in frappe.get_all(doctype, filters=filters, fields=fields):
key = d.name if consolidated else (d.parent, d.name)
if key not in so_data:
so_data.setdefault(key, d.delivery_date)
Expand Down

0 comments on commit d69a18b

Please sign in to comment.