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

11 lines
415 B
Python
Raw Normal View History

2015-05-21 09:13:24 +00:00
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
2015-05-21 09:13:24 +00:00
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
2015-05-21 09:13:24 +00:00
where ifnull(description, '') = ''""")