fix: patch for updating shipment status
This commit is contained in:
parent
9229ee1745
commit
e972ceb798
@ -772,3 +772,4 @@ erpnext.patches.v12_0.purchase_receipt_status
|
||||
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
|
||||
|
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""")
|
Loading…
x
Reference in New Issue
Block a user