diff --git a/erpnext/patches/v9_2/repost_reserved_qty_for_production.py b/erpnext/patches/v9_2/repost_reserved_qty_for_production.py index 27cce1dc5db..c4eab19d2ec 100644 --- a/erpnext/patches/v9_2/repost_reserved_qty_for_production.py +++ b/erpnext/patches/v9_2/repost_reserved_qty_for_production.py @@ -1,7 +1,8 @@ import frappe def execute(): + frappe.reload_doc("stock", "doctype", "bin") bins = frappe.db.sql("select name from `tabBin` where reserved_qty_for_production > 0") for d in bins: bin_doc = frappe.get_doc("Bin", d[0]) - bin_doc.update_reserved_qty_for_production() \ No newline at end of file + bin_doc.update_reserved_qty_for_production()