brotherton-erpnext/patches/december_2012/repost_ordered_qty.py

11 lines
363 B
Python
Raw Normal View History

# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
# License: GNU General Public License v3. See license.txt
2012-12-05 10:21:05 +00:00
def execute():
import webnotes
from utilities.repost_stock import get_ordered_qty, update_bin
2013-10-10 13:34:18 +00:00
for d in webnotes.conn.sql("select item_code, warehouse from tabBin"):
update_bin(d[0], d[1], {
"ordered_qty": get_ordered_qty(d[0], d[1])
})