mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-07 15:25:19 +00:00
fix: error when creating quotation from CRM (#54722)
(cherry picked from commit 2d3190effb)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
This commit is contained in:
@@ -565,7 +565,9 @@ def _make_customer(source_name, ignore_permissions=False):
|
|||||||
if quotation.quotation_to == "Customer":
|
if quotation.quotation_to == "Customer":
|
||||||
return frappe.get_doc("Customer", quotation.party_name)
|
return frappe.get_doc("Customer", quotation.party_name)
|
||||||
elif quotation.quotation_to == "CRM Deal":
|
elif quotation.quotation_to == "CRM Deal":
|
||||||
return frappe.get_doc("Customer", {"crm_deal": quotation.party_name})
|
customer_name = frappe.get_value("Customer", {"crm_deal": quotation.party_name})
|
||||||
|
if customer_name:
|
||||||
|
return frappe.get_doc("Customer", customer_name)
|
||||||
|
|
||||||
# Check if a Customer already exists for the Lead or Prospect.
|
# Check if a Customer already exists for the Lead or Prospect.
|
||||||
existing_customer = None
|
existing_customer = None
|
||||||
|
|||||||
Reference in New Issue
Block a user