brotherton-erpnext/erpnext/patches/v15_0/migrate_payment_request_status.py

14 lines
429 B
Python

import frappe
def execute():
"""
Description:
Change Inward Payment Requests from statut 'Initiated' to correct status 'Requested'.
Status 'Initiated' is reserved for Outward Payment Requests and was a semantic error in previour versions.
"""
so = frappe.qb.DocType("Payment Request")
frappe.qb.update(so).set(so.status, "Requested").where(so.payment_request_type == "Inward").where(
so.status == "Initiated"
).run()