brotherton-erpnext/erpnext/patches/v5_1/default_bom.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

7 lines
250 B
Python
Raw Normal View History

2015-07-15 11:09:05 +00:00
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 )""")