Update repost_reserved_qty_for_production.py

This commit is contained in:
Nabin Hait
2018-07-25 17:49:47 +05:30
committed by GitHub
parent cd717e422f
commit e50e0e4b30

View File

@@ -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()
bin_doc.update_reserved_qty_for_production()