fix: error listindexoutofrange when save a production plan (#36807)

fix: error listindexoutof range when save a production plan
This commit is contained in:
ViralKansodiya
2023-08-25 13:43:53 +05:30
committed by GitHub
parent 95a6e1d855
commit fd4159423d

View File

@@ -53,7 +53,7 @@ class ProductionPlan(Document):
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)