brotherton-erpnext/erpnext/patches/v4_0/import_country_codes.py
Rushabh Mehta ee4b8bee33 Revert "[patches] removed 4.0 patches"
This reverts commit 6f7cba8d730bcc3a7ac6d7102cce0a8369419956.
2014-12-31 15:01:48 +05:30

13 lines
470 B
Python

# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.geo.country_info import get_all
from erpnext.setup.install import import_country_and_currency
def execute():
frappe.reload_doc("setup", "doctype", "country")
import_country_and_currency()
for name, country in get_all().iteritems():
frappe.set_value("Country", name, "code", country.get("code"))