brotherton-erpnext/patches/january_2013/stock_reconciliation.py
2013-01-07 18:51:11 +05:30

14 lines
419 B
Python

import webnotes
def execute():
rename_fields()
def rename_fields():
webnotes.reload_doc("stock", "doctype", "stock_ledger_entry")
args = [["Stock Ledger Entry", "bin_aqat", "qty_after_transaction"],
["Stock Ledger Entry", "fcfs_stack", "stock_queue"]]
for doctype, old_fieldname, new_fieldname in args:
webnotes.conn.sql("""update `tab%s` set `%s`=`%s`""" %
(doctype, new_fieldname, old_fieldname))