Files
schuetz3-erpnext/erpnext/patches/v13_0/update_shipment_status.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

20 lines
386 B
Python

import frappe
def execute():
frappe.reload_doc("stock", "doctype", "shipment")
# update submitted status
frappe.db.sql(
"""UPDATE `tabShipment`
SET status = "Submitted"
WHERE status = "Draft" AND docstatus = 1"""
)
# update cancelled status
frappe.db.sql(
"""UPDATE `tabShipment`
SET status = "Cancelled"
WHERE status = "Draft" AND docstatus = 2"""
)