[minor] added currency for Ghana, fixes frappe/erpnext#3795

This commit is contained in:
Rushabh Mehta 2015-08-13 13:01:40 +05:30
parent 7e290587ef
commit 5cbfecc299
4 changed files with 13 additions and 2 deletions

View file

@ -911,6 +911,7 @@
},
"Ghana": {
"code": "gh",
"currency": "GHS",
"currency_fraction": "Pesewa",
"currency_fraction_units": 100,
"currency_symbol": "\u20b5",

View file

@ -88,3 +88,4 @@ frappe.patches.v5_3.rename_chinese_languages
frappe.patches.v6_0.make_task_log_folder
frappe.patches.v6_0.document_type_rename
frappe.patches.v6_0.fix_ghana_currency

View file

@ -0,0 +1,7 @@
def execute():
from frappe.geo.country_info import get_all
import frappe.utils.install
countries = get_all()
frappe.utils.install.add_country_and_currency("Ghana", frappe._dict(countries["Ghana"]))

View file

@ -106,7 +106,8 @@ def add_country_and_currency(name, country):
"country_name": name,
"code": country.code,
"date_format": country.date_format or "dd-mm-yyyy",
"time_zones": "\n".join(country.timezones or [])
"time_zones": "\n".join(country.timezones or []),
"docstatus": 0
}).db_insert()
if country.currency and not frappe.db.exists("Currency", country.currency):
@ -116,6 +117,7 @@ def add_country_and_currency(name, country):
"fraction": country.currency_fraction,
"symbol": country.currency_symbol,
"fraction_units": country.currency_fraction_units,
"number_format": country.number_format
"number_format": country.number_format,
"docstatus": 0
}).db_insert()