2015-03-03 14:55:30 +05:30
|
|
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
2014-03-06 18:20:45 +05:30
|
|
|
# MIT License. See license.txt
|
|
|
|
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
import frappe
|
2014-09-09 12:38:21 +05:30
|
|
|
from frappe.geo.country_info import get_all
|
2017-04-13 13:13:52 +05:30
|
|
|
from frappe.utils.install import import_country_and_currency
|
2014-03-06 18:20:45 +05:30
|
|
|
|
|
|
|
def execute():
|
|
|
|
frappe.reload_doc("setup", "doctype", "country")
|
2014-03-25 13:50:52 +05:30
|
|
|
import_country_and_currency()
|
2014-03-06 18:20:45 +05:30
|
|
|
for name, country in get_all().iteritems():
|
|
|
|
frappe.set_value("Country", name, "code", country.get("code"))
|