[fix] Set Customer name in opportunity as per company name in lead
This commit is contained in:
parent
621d6eac3c
commit
3b3c48c877
@ -79,7 +79,8 @@ class Opportunity(TransactionBase):
|
||||
if self.customer:
|
||||
self.customer_name = frappe.db.get_value("Customer", self.customer, "customer_name")
|
||||
elif self.lead:
|
||||
self.customer_name = frappe.db.get_value("Lead", self.lead, "lead_name")
|
||||
lead_name, company_name = frappe.db.get_value("Lead", self.lead, ["lead_name", "company_name"])
|
||||
self.customer_name = company_name or lead_name
|
||||
|
||||
def get_cust_address(self,name):
|
||||
details = frappe.db.sql("""select customer_name, address, territory, customer_group
|
||||
|
Loading…
x
Reference in New Issue
Block a user