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

9 lines
300 B
Python
Raw Normal View History

# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import frappe
def execute():
2014-12-12 09:18:30 +00:00
company = frappe.db.get_value("Global Defaults", None, "default_company")
frappe.db.sql("""update `tabBOM` set company = %s""",company)