[setup] Address template message if setup complete
This commit is contained in:
parent
f05486f814
commit
76386603a4
1 changed files with 3 additions and 1 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue