[merge] merged with master

This commit is contained in:
Nabin Hait
2013-10-24 11:21:11 +05:30
61 changed files with 974 additions and 705 deletions

View File

@@ -13,8 +13,11 @@ def repost():
"""
webnotes.conn.auto_commit_on_many_writes = 1
for d in webnotes.conn.sql("select item_code, warehouse from tabBin"):
repost_stock(d[0], d[1])
for d in webnotes.conn.sql("""select distinct item_code, warehouse from
(select item_code, warehouse from tabBin
union
select item_code, warehouse from `tabStock Ledger Entry`) a"""):
repost_stock(d[0], d[1])
webnotes.conn.auto_commit_on_many_writes = 0
@@ -31,7 +34,10 @@ def repost_stock(item_code, warehouse):
def repost_actual_qty(item_code, warehouse):
from stock.stock_ledger import update_entries_after
update_entries_after({ "item_code": item_code, "warehouse": warehouse })
try:
update_entries_after({ "item_code": item_code, "warehouse": warehouse })
except:
pass
def get_reserved_qty(item_code, warehouse):
reserved_qty = webnotes.conn.sql("""