diff --git a/frappe/contacts/doctype/address/address.py b/frappe/contacts/doctype/address/address.py index 75fd0ad8c6..f36122cd35 100644 --- a/frappe/contacts/doctype/address/address.py +++ b/frappe/contacts/doctype/address/address.py @@ -58,7 +58,8 @@ class Address(Document): def validate_reference(self): if self.is_your_company_address: if not [row for row in self.links if row.link_doctype == "Company"]: - frappe.throw(_("Company is mandatory, as it is your company address")) + frappe.throw(_("Address needs to be linked to a Company.Please add a row for {0} in the Links table below.") \ + .format(frappe.bold(_("Company"))), title =_("Address not Linked")) def get_display(self): return get_address_display(self.as_dict()) @@ -256,4 +257,4 @@ def address_query(doctype, txt, searchfield, start, page_len, filters): def get_condensed_address(doc): fields = ["address_title", "address_line1", "address_line2", "city", "county", "state", "country"] - return ", ".join([doc.get(d) for d in fields if doc.get(d)]) \ No newline at end of file + return ", ".join([doc.get(d) for d in fields if doc.get(d)])