Skip to content

Commit

Permalink
fix(patch): to migrate properly in post section (#38045)
Browse files Browse the repository at this point in the history
  • Loading branch information
blaggacao authored Nov 11, 2023
1 parent ae50814 commit 4ed9927
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions erpnext/patches/v15_0/migrate_payment_request_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 4ed9927

Please sign in to comment.