2013-08-05 09:29:54 +00:00
|
|
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
|
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
2013-01-21 05:02:49 +00:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
import webnotes
|
|
|
|
|
|
|
|
def execute():
|
|
|
|
from webnotes.country_info import get_all
|
|
|
|
data = get_all()
|
|
|
|
|
|
|
|
webnotes.reload_doc("setup", "doctype", "currency")
|
|
|
|
|
|
|
|
for c in data:
|
|
|
|
info = webnotes._dict(data[c])
|
|
|
|
if webnotes.conn.exists("Currency", info.currency):
|
|
|
|
doc = webnotes.doc("Currency", info.currency)
|
|
|
|
doc.fields.update({
|
|
|
|
"number_format": info.number_format,
|
|
|
|
})
|
|
|
|
doc.save()
|