country code added

This commit is contained in:
Nabin Hait 2014-03-06 18:20:45 +05:30
parent d89f3403ac
commit a69c30edec
3 changed files with 15 additions and 0 deletions

View File

@ -29,3 +29,4 @@ erpnext.patches.4_0.remove_module_home_pages
erpnext.patches.4_0.split_email_settings
erpnext.patches.4_0.fix_employee_user_id
erpnext.patches.4_0.set_account_details
erpnext.patches.4_0.import_country_codes

View File

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

View File

@ -88,6 +88,7 @@ def create_fiscal_year_and_company(args):
'company_name':args.get('company_name'),
'abbr':args.get('company_abbr'),
'default_currency':args.get('currency'),
'country': args.get('country')
}]).insert()
args["curr_fiscal_year"] = curr_fiscal_year