Open hpotabatti opened 2 years ago
@hpotabatti When will someone be assigned to fix this problem. It is a problem and it should not be possible to continue creating quotations from converted Leads.
if doc.quotation_to == "Lead":
lead = doc.party_name
lead_status = frappe.db.get_value("Lead", doc.party_name, "status")
if lead_status == "Converted":
frappe.throw("Not allowed to create quotation against converted lead")
Can be easily handled with a server script like this. @turner-james
Hard-coding these validations in code is usually not a good idea because not everyone uses it in same way.
There is no point in creating new Quotations against existing Converted Leads. In case we are approaching these Converted Leads for a new line of products or new products and need to send a Quotation, the user can create a New Lead/Opportunity based on the same.