feat(Lead)!: send notifications to lead owner (#53959)

This commit is contained in:
Raffael Meyer
2026-05-08 12:40:23 +02:00
committed by GitHub
parent ddc6d2c4e0
commit 6f9f3d0a5c

View File

@@ -314,6 +314,13 @@ class Lead(SellingController, CRMNote):
except frappe.DuplicateEntryError:
frappe.throw(_("Prospect {0} already exists").format(company_name or self.company_name))
def get_notification_email(self):
"""Hook to return the target email address for notifications."""
if self.lead_owner:
return frappe.db.get_value("User", self.lead_owner, "email")
return None
@frappe.whitelist()
def make_customer(source_name: str, target_doc: str | Document | None = None):