mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 05:39:12 +00:00
feat: Adding support for discarding document (#51316)
Co-authored-by: Nishka Gosalia <nishkagosalia@Nishkas-MacBook-Air.local>
This commit is contained in:
16
erpnext/patches/v16_0/update_corrected_cancelled_status.py
Normal file
16
erpnext/patches/v16_0/update_corrected_cancelled_status.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
stock_closing_entry = frappe.qb.DocType("Stock Closing Entry")
|
||||
call_log = frappe.qb.DocType("Call Log")
|
||||
|
||||
# updating stock closing entry status to cancelled from canceled
|
||||
(
|
||||
frappe.qb.update(stock_closing_entry)
|
||||
.set(stock_closing_entry.status, "Cancelled")
|
||||
.where(stock_closing_entry.status == "Canceled")
|
||||
).run()
|
||||
|
||||
# updating call log status to cancelled from canceled
|
||||
(frappe.qb.update(call_log).set(call_log.status, "Cancelled").where(call_log.status == "Canceled")).run()
|
||||
Reference in New Issue
Block a user