Files
schuetz3-erpnext/erpnext/patches/v13_0/rename_non_profit_fields.py
Ankush Menat c07713b860 style: bulk format code with black
v13 port because otherwise backports will result in conflicts always
2022-03-29 17:29:34 +05:30

17 lines
649 B
Python

import frappe
from frappe.model.utils.rename_field import rename_field
def execute():
if frappe.db.table_exists("Donation"):
frappe.reload_doc("non_profit", "doctype", "Donation")
rename_field("Donation", "razorpay_payment_id", "payment_id")
if frappe.db.table_exists("Tax Exemption 80G Certificate"):
frappe.reload_doc("regional", "doctype", "Tax Exemption 80G Certificate")
frappe.reload_doc("regional", "doctype", "Tax Exemption 80G Certificate Detail")
rename_field("Tax Exemption 80G Certificate", "razorpay_payment_id", "payment_id")
rename_field("Tax Exemption 80G Certificate Detail", "razorpay_payment_id", "payment_id")