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()