fix(patch): to migrate properly in post section (#38045)

This commit is contained in:
David Arnold 2023-11-11 15:07:23 +01:00 committed by GitHub
parent ae508144cd
commit 4ed9927a30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,9 +7,7 @@ def execute():
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.
"""
if frappe.reload_doc("accounts", "doctype", "Payment Request"):
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()
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()