From b63e4d0843fe317951943eaac0b515c4fc47ecee Mon Sep 17 00:00:00 2001 From: ubuntu Date: Tue, 22 Aug 2023 12:22:58 +0000 Subject: [PATCH] fix: error while saves a document --- .../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 131f438e206e..34e94232c45a 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -53,7 +53,7 @@ def validate_sales_orders(self, sales_order=None): data = sales_order_query(filters={"company": self.company, "sales_orders": sales_orders}) title = _("Production Plan Already Submitted") - if not data: + if not data and sales_orders: msg = _("No items are available in the sales order {0} for production").format(sales_orders[0]) if len(sales_orders) > 1: sales_orders = ", ".join(sales_orders)