[fix] fee component rename patch fix

This commit is contained in:
Saurabh 2016-07-26 15:03:41 +05:30
parent 0540d52449
commit 21a5658fdf

View File

@ -7,9 +7,10 @@ import frappe
from frappe.model.utils.rename_field import rename_field
def execute():
frappe.rename_doc("DocType", "Fee Amount", "Fee Component")
for dt in ("Fees", "Fee Structure"):
frappe.reload_doctype(dt)
rename_field(dt, "amount", "components")
if frappe.db.exists("DocType", "Fee Amount"):
frappe.rename_doc("DocType", "Fee Amount", "Fee Component")
for dt in ("Fees", "Fee Structure"):
frappe.reload_doctype(dt)
rename_field(dt, "amount", "components")