Merge pull request #58495 from frappe/mergify/bp/version-16-hotfix/pr-58493

fix(selling): check quotation write permission before marking lost (backport #58493)
This commit is contained in:
Sudharsanan Ashok
2026-08-28 13:11:58 +05:30
committed by GitHub

View File

@@ -261,7 +261,11 @@ class Quotation(SellingController):
opp.set_status(status=status, update=True)
@frappe.whitelist()
def declare_enquiry_lost(self, lost_reasons_list, competitors, detailed_reason=None):
def declare_enquiry_lost(
self, lost_reasons_list: list, competitors: list, detailed_reason: str | None = None
):
self.check_permission("write")
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]