2014-03-06 12:50:45 +00:00
|
|
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
|
|
|
# MIT License. See license.txt
|
|
|
|
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
import frappe
|
2014-09-09 07:08:21 +00:00
|
|
|
from frappe.geo.country_info import get_all
|
2014-03-25 08:20:52 +00:00
|
|
|
from erpnext.setup.install import import_country_and_currency
|
2014-03-06 12:50:45 +00:00
|
|
|
|
|
|
|
def execute():
|
|
|
|
frappe.reload_doc("setup", "doctype", "country")
|
2014-03-25 08:20:52 +00:00
|
|
|
import_country_and_currency()
|
2014-03-06 12:50:45 +00:00
|
|
|
for name, country in get_all().iteritems():
|
|
|
|
frappe.set_value("Country", name, "code", country.get("code"))
|