brotherton-erpnext/erpnext/patches/v5_0/update_operation_description.py
2015-05-21 14:43:24 +05:30

10 lines
376 B
Python

# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import frappe
import frappe.permissions
def execute():
if "opn_description" in frappe.db.get_table_columns("BOM Operation"):
frappe.db.sql("""update `tabBOM Operation` set description = opn_description
where ifnull(description, '') = ''""")