2014-06-05 09:14:16 +00:00
|
|
|
import frappe
|
|
|
|
|
|
|
|
def execute():
|
2014-06-05 12:04:59 +00:00
|
|
|
frappe.reload_doc("utilities", "doctype", "address_template")
|
2014-06-06 11:37:50 +00:00
|
|
|
if not frappe.db.sql("select name from `tabAddress Template`"):
|
2014-06-06 12:07:31 +00:00
|
|
|
try:
|
|
|
|
d = frappe.new_doc("Address Template")
|
|
|
|
d.update({"country":frappe.db.get_default("country")})
|
|
|
|
d.insert()
|
|
|
|
except:
|
|
|
|
print frappe.get_traceback()
|
|
|
|
|