fix: only allow a submitted quotation to be set as Lost

This commit is contained in:
Shllokkk
2026-10-29 00:12:24 +05:30
parent 35ad2e1aef
commit ebd35584b2
@@ -263,6 +263,9 @@ class Quotation(SellingController):
):
self.check_permission("write")
if self.docstatus != 1:
frappe.throw(_("Only a submitted Quotation can be set as Lost."))
if not (self.is_fully_ordered() or self.is_partially_ordered()):
get_lost_reasons = frappe.get_list("Quotation Lost Reason", fields=["name"])
lost_reasons_lst = [reason.get("name") for reason in get_lost_reasons]