mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
fix: patch for updating shipment status
This commit is contained in:
@@ -772,3 +772,4 @@ erpnext.patches.v12_0.purchase_receipt_status
|
|||||||
erpnext.patches.v13_0.fix_non_unique_represents_company
|
erpnext.patches.v13_0.fix_non_unique_represents_company
|
||||||
erpnext.patches.v12_0.add_document_type_field_for_italy_einvoicing
|
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.make_non_standard_user_type #13-04-2021
|
||||||
|
erpnext.patches.v13_0.update_shipment_status
|
||||||
|
|||||||
14
erpnext/patches/v13_0/update_shipment_status.py
Normal file
14
erpnext/patches/v13_0/update_shipment_status.py
Normal file
@@ -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""")
|
||||||
Reference in New Issue
Block a user