mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 21:59:13 +00:00
fix: Create Opportunity without Default Company from Email (#23097)
* fix: Create Opoortunity without Default Company from Email * fix: Add Prompt to Select Company * Update communication.js Co-authored-by: Nabin Hait <nabinhait@gmail.com>
This commit is contained in:
@@ -325,7 +325,7 @@ def auto_close_opportunity():
|
||||
doc.save()
|
||||
|
||||
@frappe.whitelist()
|
||||
def make_opportunity_from_communication(communication, ignore_communication_links=False):
|
||||
def make_opportunity_from_communication(communication, company, ignore_communication_links=False):
|
||||
from erpnext.crm.doctype.lead.lead import make_lead_from_communication
|
||||
doc = frappe.get_doc("Communication", communication)
|
||||
|
||||
@@ -337,6 +337,7 @@ def make_opportunity_from_communication(communication, ignore_communication_link
|
||||
|
||||
opportunity = frappe.get_doc({
|
||||
"doctype": "Opportunity",
|
||||
"company": company,
|
||||
"opportunity_from": opportunity_from,
|
||||
"party_name": lead
|
||||
}).insert(ignore_permissions=True)
|
||||
|
||||
Reference in New Issue
Block a user