From 1c32f5ace93ec5a1850c5b77ca65c761b9f9d097 Mon Sep 17 00:00:00 2001 From: bcornwellmott Date: Mon, 24 Jul 2017 10:13:44 -0700 Subject: [PATCH] Whitelist method for adding production orders ops (#9997) --- .../doctype/production_order/production_order.py | 6 ++++++ 1 file changed, 6 insertions(+) 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)