Merge pull request #5870 from saurabh6790/fee_component_patch_fix

[fix] fee component rename patch fix
This commit is contained in:
Rushabh Mehta 2016-07-26 15:06:56 +05:30 committed by GitHub
commit 9b542f303c

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")