update operation description patch

This commit is contained in:
Nabin Hait 2015-05-21 14:43:24 +05:30
parent e372fb11ea
commit 9895aba42e
2 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -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, '') = ''""")