diff --git a/setup/doctype/global_defaults/global_defaults.txt b/setup/doctype/global_defaults/global_defaults.txt index fbfa8ca14d..a8a80b1045 100644 --- a/setup/doctype/global_defaults/global_defaults.txt +++ b/setup/doctype/global_defaults/global_defaults.txt @@ -2,7 +2,7 @@ { "creation": "2013-05-02 17:53:24", "docstatus": 0, - "modified": "2013-08-06 11:22:22", + "modified": "2013-10-23 10:22:44", "modified_by": "Administrator", "owner": "Administrator" }, @@ -175,13 +175,6 @@ "options": "Standard\nClassic\nModern\nSpartan", "read_only": 0 }, - { - "doctype": "DocField", - "fieldname": "hr", - "fieldtype": "Section Break", - "label": "HR", - "read_only": 0 - }, { "doctype": "DocPerm" } diff --git a/utilities/repost_stock.py b/utilities/repost_stock.py index 735930486e..e2ecdeeb9b 100644 --- a/utilities/repost_stock.py +++ b/utilities/repost_stock.py @@ -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`)"""): + repost_stock(d[0], d[1]) webnotes.conn.auto_commit_on_many_writes = 0