From 31c4c1ccf35074c8469ba074bc7f88d229d8c60f Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 15 May 2025 14:53:32 +0530 Subject: [PATCH] fix: sales order qty issue (#47560) --- erpnext/manufacturing/doctype/work_order/work_order.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 1a268d5b365..969375c36bf 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1550,14 +1550,14 @@ class WorkOrder(Document): return query.run(as_dict=1) def get_so_details(self): - return frappe.db.get_value( + return frappe.get_all( "Sales Order Item", - { + filters={ "parent": self.sales_order, "item_code": self.production_item, "docstatus": 1, }, - [ + fields=[ "name", "stock_qty", "stock_reserved_qty", @@ -1566,7 +1566,6 @@ class WorkOrder(Document): "parenttype as voucher_type", "delivered_qty", ], - as_dict=1, ) def get_voucher_details(self, stock_entry):