mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 12:19:12 +00:00
refactor: ignore unreconcile doc for PO and SO on cancel/delete
(cherry picked from commit b618d685c6)
This commit is contained in:
@@ -217,7 +217,11 @@ frappe.ui.form.on("Sales Order", {
|
||||
frm.set_value("advance_paid", 0);
|
||||
}
|
||||
|
||||
frm.ignore_doctypes_on_cancel_all = ["Purchase Order"];
|
||||
frm.ignore_doctypes_on_cancel_all = [
|
||||
"Purchase Order",
|
||||
"Unreconcile Payment",
|
||||
"Unreconcile Payment Entries",
|
||||
];
|
||||
},
|
||||
|
||||
delivery_date: function (frm) {
|
||||
|
||||
@@ -421,7 +421,13 @@ class SalesOrder(SellingController):
|
||||
self.create_stock_reservation_entries()
|
||||
|
||||
def on_cancel(self):
|
||||
self.ignore_linked_doctypes = ("GL Entry", "Stock Ledger Entry", "Payment Ledger Entry")
|
||||
self.ignore_linked_doctypes = (
|
||||
"GL Entry",
|
||||
"Stock Ledger Entry",
|
||||
"Payment Ledger Entry",
|
||||
"Unreconcile Payment",
|
||||
"Unreconcile Payment Entries",
|
||||
)
|
||||
super().on_cancel()
|
||||
|
||||
# Cannot cancel closed SO
|
||||
|
||||
Reference in New Issue
Block a user