From 76386603a4dffb47f87aeeceebfb6eb55dfe48b0 Mon Sep 17 00:00:00 2001 From: Prateeksha Singh Date: Mon, 19 Nov 2018 15:15:53 +0530 Subject: [PATCH] [setup] Address template message if setup complete --- frappe/contacts/doctype/address_template/address_template.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frappe/contacts/doctype/address_template/address_template.py b/frappe/contacts/doctype/address_template/address_template.py index 9336f75027..2ca9aebff5 100644 --- a/frappe/contacts/doctype/address_template/address_template.py +++ b/frappe/contacts/doctype/address_template/address_template.py @@ -5,6 +5,7 @@ from __future__ import unicode_literals import frappe from frappe.model.document import Document +from frappe.utils import cint from frappe.utils.jinja import validate_template from frappe import _ @@ -17,7 +18,8 @@ class AddressTemplate(Document): if not self.is_default: if not self.defaults: self.is_default = 1 - frappe.msgprint(_("Setting this Address Template as default as there is no other default")) + if cint(frappe.db.get_single_value('System Settings', 'setup_complete')): + frappe.msgprint(_("Setting this Address Template as default as there is no other default")) validate_template(self.template)