fix: Ignore PO on So cancel
This commit is contained in:
parent
61757c17ae
commit
051aaa708d
@ -823,7 +823,7 @@ class AccountsController(TransactionBase):
|
||||
for item in self.items:
|
||||
so_items.append(item.name)
|
||||
|
||||
linked_po = frappe.get_all(
|
||||
linked_po = list(set(frappe.get_all(
|
||||
'Purchase Order Item',
|
||||
filters = {
|
||||
'sales_order': self.name,
|
||||
@ -831,7 +831,7 @@ class AccountsController(TransactionBase):
|
||||
'docstatus': ['<', 2]
|
||||
},
|
||||
pluck='parent'
|
||||
)
|
||||
)))
|
||||
|
||||
if linked_po:
|
||||
frappe.db.set_value(
|
||||
|
@ -78,6 +78,8 @@ frappe.ui.form.on("Sales Order", {
|
||||
});
|
||||
|
||||
erpnext.queries.setup_warehouse_query(frm);
|
||||
|
||||
frm.ignore_doctypes_on_cancel_all = ['Purchase Order'];
|
||||
},
|
||||
|
||||
delivery_date: function(frm) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user