fix: patch for updating shipment status
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 112f6d8..620cc5b 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -772,3 +772,4 @@
erpnext.patches.v13_0.fix_non_unique_represents_company
erpnext.patches.v12_0.add_document_type_field_for_italy_einvoicing
erpnext.patches.v13_0.make_non_standard_user_type #13-04-2021
+erpnext.patches.v13_0.update_shipment_status
diff --git a/erpnext/patches/v13_0/update_shipment_status.py b/erpnext/patches/v13_0/update_shipment_status.py
new file mode 100644
index 0000000..c425599
--- /dev/null
+++ b/erpnext/patches/v13_0/update_shipment_status.py
@@ -0,0 +1,14 @@
+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""")