diff --git a/erpnext/manufacturing/doctype/production_order/production_order.py b/erpnext/manufacturing/doctype/production_order/production_order.py index 040a5592f9..8506c18071 100644 --- a/erpnext/manufacturing/doctype/production_order/production_order.py +++ b/erpnext/manufacturing/doctype/production_order/production_order.py @@ -510,6 +510,12 @@ def check_if_scrap_warehouse_mandatory(bom_no): return res +@frappe.whitelist() +def set_production_order_ops(name): + po = frappe.get_doc('Production Order', name) + po.set_production_order_operations() + po.save() + @frappe.whitelist() def make_stock_entry(production_order_id, purpose, qty=None): production_order = frappe.get_doc("Production Order", production_order_id)