Merge pull request #28958 from frappe/addr_fix

fix: update address link title on update of customer
This commit is contained in:
Sumit Bhanushali 2024-12-30 15:02:52 +05:30 committed by GitHub
commit c654559a4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -144,6 +144,7 @@ def set_link_title(doc):
if not doc.links:
return
for link in doc.links:
if not link.link_title:
linked_doc = frappe.get_doc(link.link_doctype, link.link_name)
link.link_title = linked_doc.get_title() or link.link_name
linked_doc = frappe.get_doc(link.link_doctype, link.link_name)
doc_title = linked_doc.get_title()
if link.link_title != doc_title:
link.link_title = doc_title or link.link_name