From 4605bc51ae3d0217a7f06d0e908214fb0c31b168 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 2 Aug 2023 12:59:31 +0530 Subject: [PATCH] fix: search not working for so in the Production Plan (backport #36459) (#36460) fix: search not working for so in the Production Plan (#36459) fix: search not working for so (cherry picked from commit 8c57d56240d2c35ae09350af5d3598b4773e9ac2) Co-authored-by: rohitwaghchaure --- .../manufacturing/doctype/production_plan/production_plan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 261aa76b706..8d75c3cb60d 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -1731,7 +1731,7 @@ def sales_order_query( query = query.where(so_table.name.isin(filters.get("sales_orders"))) if txt: - query = query.where(table.item_code.like(f"{txt}%")) + query = query.where(table.parent.like(f"%{txt}%")) if page_len: query = query.limit(page_len)