brotherton-erpnext/erpnext/patches/v5_1/default_bom.py
2015-07-16 11:27:06 +05:30

7 lines
250 B
Python

from __future__ import unicode_literals
import frappe
def execute():
frappe.db.sql("""Update `tabItem` as item set default_bom = NULL where
not exists(select name from `tabBOM` as bom where item.default_bom = bom.name and bom.docstatus =1 )""")