fix: cancel SRE on SO cancel
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index 9ed57df..13310f9 100755
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -31,6 +31,7 @@
from erpnext.setup.doctype.item_group.item_group import get_item_group_defaults
from erpnext.stock.doctype.item.item import get_item_defaults
from erpnext.stock.doctype.stock_reservation_entry.stock_reservation_entry import (
+ cancel_stock_reservation_entries,
get_sre_reserved_qty_details_for_voucher,
)
from erpnext.stock.get_item_details import get_default_bom, get_price_list_rate
@@ -275,6 +276,7 @@
self.db_set("status", "Cancelled")
self.update_blanket_order()
+ cancel_stock_reservation_entries("Sales Order", self.name)
unlink_inter_company_doc(self.doctype, self.name, self.inter_company_order_reference)
if self.coupon_code: