brotherton-erpnext/erpnext/patches/before_jan_2012/auto_indent.py

9 lines
409 B
Python

def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
reload_doc('setup', 'doctype', 'manage_account')
reload_doc('stock', 'doctype', 'item')
webnotes.conn.sql("delete from `tabDocField` where fieldname='minimum_inventory_level' and parent='item'")
webnotes.conn.sql("update `tabItem` set re_order_level = minimum_inventory_level where ifnull(re_order_level,0) = 0 ")