brotherton-erpnext/patches/november_2012/production_order_patch.py

13 lines
447 B
Python
Raw Normal View History

def execute():
import webnotes
webnotes.reload_doc("manufacturing", "doctype", "production_order")
webnotes.reload_doc("stock", "doctype", "stock_entry")
webnotes.conn.sql("""update `tabStock Entry`
set use_multi_level_bom = if(consider_sa_items_as_raw_materials='Yes', 0, 1)""")
webnotes.conn.sql("""update `tabProduction Order`
2012-12-25 13:13:15 +00:00
set use_multi_level_bom = if(consider_sa_items='Yes', 0, 1)
where use_multi_level_bom is null""")