From 2834952fcb2ce064ae2e4cd7d5346420269c85b4 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Thu, 9 Oct 2025 20:14:12 +0200 Subject: [PATCH] fix: use link title as address title --- frappe/contacts/doctype/address/address.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frappe/contacts/doctype/address/address.py b/frappe/contacts/doctype/address/address.py index 15f326bafc..65622a9c4f 100644 --- a/frappe/contacts/doctype/address/address.py +++ b/frappe/contacts/doctype/address/address.py @@ -57,9 +57,8 @@ class Address(Document): self.flags.linked = False def autoname(self): - if not self.address_title: - if self.links: - self.address_title = self.links[0].link_name + if not self.address_title and self.links: + self.address_title = self.links[0].link_title or self.links[0].link_name if self.address_title: self.name = cstr(self.address_title).strip() + "-" + cstr(_(self.address_type)).strip()