mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 22:19:18 +00:00
fix: sider issue
This commit is contained in:
@@ -179,15 +179,15 @@ class Customer(TransactionBase):
|
|||||||
def link_lead_address_contact(self):
|
def link_lead_address_contact(self):
|
||||||
if self.lead_name:
|
if self.lead_name:
|
||||||
# assign lead address to customer (if already not set)
|
# assign lead address to customer (if already not set)
|
||||||
linked_contacts_and_addresses = frappe.get_all('Dynamic Link', filters=[
|
linked_contacts_and_addresses = frappe.get_all(
|
||||||
["parenttype", "in", ["Contact", "Address"]],
|
"Dynamic Link",
|
||||||
["link_doctype", "=", "Lead"],
|
filters=[
|
||||||
["link_name", "=", self.lead_name]
|
["parenttype", "in", ["Contact", "Address"]],
|
||||||
], fields=[
|
["link_doctype", "=", "Lead"],
|
||||||
"parent as name",
|
["link_name", "=", self.lead_name],
|
||||||
"parenttype as doctype"
|
],
|
||||||
]
|
fields=["parent as name", "parenttype as doctype"],
|
||||||
)
|
)
|
||||||
|
|
||||||
for row in linked_contacts_and_addresses:
|
for row in linked_contacts_and_addresses:
|
||||||
linked_doc = frappe.get_doc(row.doctype, row.name)
|
linked_doc = frappe.get_doc(row.doctype, row.name)
|
||||||
|
|||||||
Reference in New Issue
Block a user