brotherton-erpnext/erpnext/patches/v5_0/update_from_bom.py

10 lines
325 B
Python
Raw Normal View History

# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
2015-02-25 15:55:57 +05:30
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
2015-02-25 16:28:33 +05:30
frappe.reload_doctype("Stock Entry")
2015-02-25 15:55:57 +05:30
frappe.db.sql("update `tabStock Entry` set from_bom = if(ifnull(bom_no, '')='', 0, 1)")