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

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

11 lines
391 B
Python
Raw Normal View History

# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
2014-12-18 07:11:09 +00:00
frappe.reload_doc("manufacturing", "doctype", "bom")
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)