diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 85adbee88f..65a6de4348 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -156,4 +156,4 @@ erpnext.patches.v5_0.repost_requested_qty erpnext.patches.v5_0.fix_taxes_and_totals_in_party_currency erpnext.patches.v5_0.update_tax_amount_after_discount_in_purchase_cycle erpnext.patches.v5_0.rename_pos_setting -execute:frappe.db.sql("update `tabBOM Operation` set description=opn_description where ifnull(description, '') = ''") +erpnext.patches.v5_0.update_operation_description \ No newline at end of file diff --git a/erpnext/patches/v5_0/update_operation_description.py b/erpnext/patches/v5_0/update_operation_description.py new file mode 100644 index 0000000000..ae7b6326cb --- /dev/null +++ b/erpnext/patches/v5_0/update_operation_description.py @@ -0,0 +1,10 @@ +# 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, '') = ''""") \ No newline at end of file