fix(selling): check quotation write permission before marking lost (#58493)

(cherry picked from commit 5f99a3418d)

# Conflicts:
#	erpnext/selling/doctype/quotation/quotation.py
This commit is contained in:
Pandiyan P
2026-08-27 17:34:27 +05:30
committed by Mergify
parent eedf991b43
commit fb981667f6

View File

@@ -261,7 +261,15 @@ class Quotation(SellingController):
opp.set_status(status=status, update=True)
@frappe.whitelist()
<<<<<<< HEAD
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")
>>>>>>> 5f99a34 (fix(selling): check quotation write permission before marking lost (#58493))
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]