mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-01 20:48:27 +00:00
Fixed Countrywise Chart of Accounts patch
This commit is contained in:
@@ -23,13 +23,14 @@ def import_country_and_currency():
|
||||
|
||||
for name in data:
|
||||
country = frappe._dict(data[name])
|
||||
frappe.doc({
|
||||
"doctype": "Country",
|
||||
"country_name": name,
|
||||
"code": country.code,
|
||||
"date_format": country.date_format or "dd-mm-yyyy",
|
||||
"time_zones": "\n".join(country.timezones or [])
|
||||
}).insert()
|
||||
if not frappe.db.exists("Country", name):
|
||||
frappe.doc({
|
||||
"doctype": "Country",
|
||||
"country_name": name,
|
||||
"code": country.code,
|
||||
"date_format": country.date_format or "dd-mm-yyyy",
|
||||
"time_zones": "\n".join(country.timezones or [])
|
||||
}).insert()
|
||||
|
||||
if country.currency and not frappe.db.exists("Currency", country.currency):
|
||||
frappe.doc({
|
||||
|
||||
Reference in New Issue
Block a user