[setup] Address template message if setup complete

This commit is contained in:
Prateeksha Singh 2018-11-19 15:15:53 +05:30
parent f05486f814
commit 76386603a4

View file

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