Merge branch 'edge'

This commit is contained in:
Rushabh Mehta 2013-01-17 18:24:09 +05:30
commit 8af47e8413
23 changed files with 476 additions and 1702 deletions

View File

@ -2,20 +2,20 @@
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-11-16 10:32:50",
"creation": "2013-01-17 12:30:10",
"modified_by": "Administrator",
"modified": "2012-12-03 11:26:49"
"modified": "2013-01-17 13:16:31"
},
{
"in_create": 1,
"allow_rename": 1,
"description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.",
"search_fields": "debit_or_credit, group_or_ledger",
"module": "Accounts",
"document_type": "Master",
"description": "Heads (or groups) against which Accounting Entries are made and balances are maintained.",
"name": "__common__",
"allow_rename": 1,
"doctype": "DocType",
"allow_copy": 1
"allow_copy": 1,
"document_type": "Master",
"name": "__common__"
},
{
"name": "__common__",
@ -28,8 +28,8 @@
"name": "__common__",
"parent": "Account",
"amend": 0,
"submit": 0,
"doctype": "DocPerm",
"submit": 0,
"read": 1,
"parenttype": "DocType",
"parentfield": "permissions"
@ -139,32 +139,28 @@
"doctype": "DocField",
"label": "Parent Account",
"oldfieldname": "parent_account",
"trigger": "Client",
"options": "Account",
"fieldname": "parent_account",
"fieldtype": "Link",
"search_index": 1,
"options": "Account",
"permlevel": 0
},
{
"description": "Setting Account Type helps in selecting this Account in transactions.",
"oldfieldtype": "Select",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Account Type",
"oldfieldname": "account_type",
"permlevel": 0,
"trigger": "Client",
"options": "\nFixed Asset Account\nBank or Cash\nExpense Account\nTax\nIncome Account\nChargeable",
"fieldname": "account_type",
"fieldtype": "Select",
"search_index": 0,
"in_filter": 1,
"options": "\nFixed Asset Account\nBank or Cash\nExpense Account\nTax\nIncome Account\nChargeable"
"permlevel": 0,
"in_filter": 1
},
{
"description": "Rate at which this tax is applied",
"oldfieldtype": "Currency",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Rate",
"oldfieldname": "tax_rate",
@ -177,7 +173,6 @@
{
"description": "If the account is frozen, entries are allowed for the \"Account Manager\" only.",
"oldfieldtype": "Select",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Frozen",
"oldfieldname": "freeze_account",
@ -189,7 +184,6 @@
{
"print_hide": 1,
"oldfieldtype": "Int",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Credit Days",
"oldfieldname": "credit_days",
@ -212,7 +206,6 @@
{
"description": "If this Account represents a Customer, Supplier or Employee, set it here.",
"oldfieldtype": "Select",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Master Type",
"oldfieldname": "master_type",
@ -226,98 +219,127 @@
"doctype": "DocField",
"label": "Master Name",
"oldfieldname": "master_name",
"trigger": "Client",
"options": "[Select]",
"fieldname": "master_name",
"fieldtype": "Link",
"options": "[Select]",
"permlevel": 0
},
{
"read_only": 1,
"print_hide": 1,
"doctype": "DocField",
"label": "Lft",
"fieldname": "lft",
"fieldtype": "Int",
"hidden": 1,
"permlevel": 0
},
{
"read_only": 1,
"print_hide": 1,
"doctype": "DocField",
"label": "Rgt",
"fieldname": "rgt",
"fieldtype": "Int",
"hidden": 1,
"permlevel": 0
},
{
"read_only": 1,
"print_hide": 1,
"doctype": "DocField",
"label": "Old Parent",
"fieldname": "old_parent",
"fieldtype": "Data",
"hidden": 1,
"permlevel": 0
},
{
"create": 0,
"doctype": "DocPerm",
"write": 1,
"cancel": 0,
"role": "Auditor",
"cancel": 0,
"permlevel": 0
},
{
"create": 0,
"doctype": "DocPerm",
"write": 0,
"cancel": 0,
"role": "Auditor",
"cancel": 0,
"permlevel": 2
},
{
"create": 0,
"doctype": "DocPerm",
"write": 0,
"cancel": 0,
"role": "Auditor",
"cancel": 0,
"permlevel": 1
},
{
"create": 0,
"doctype": "DocPerm",
"write": 0,
"cancel": 0,
"role": "Sales User",
"cancel": 0,
"permlevel": 0
},
{
"create": 0,
"doctype": "DocPerm",
"write": 0,
"cancel": 0,
"role": "Purchase User",
"cancel": 0,
"permlevel": 0
},
{
"create": 0,
"doctype": "DocPerm",
"write": 1,
"cancel": 0,
"role": "Accounts User",
"cancel": 0,
"permlevel": 0
},
{
"create": 1,
"doctype": "DocPerm",
"write": 1,
"cancel": 1,
"role": "Accounts Manager",
"cancel": 1,
"permlevel": 0
},
{
"create": 0,
"doctype": "DocPerm",
"write": 0,
"cancel": 0,
"role": "Accounts User",
"cancel": 0,
"permlevel": 1
},
{
"create": 0,
"doctype": "DocPerm",
"write": 0,
"cancel": 0,
"role": "Accounts Manager",
"cancel": 0,
"permlevel": 1
},
{
"create": 0,
"doctype": "DocPerm",
"write": 1,
"cancel": 0,
"role": "Accounts Manager",
"cancel": 0,
"permlevel": 2
},
{
"create": 0,
"doctype": "DocPerm",
"write": 0,
"cancel": 0,
"role": "Accounts User",
"cancel": 0,
"permlevel": 2
}
]

View File

@ -218,7 +218,7 @@ class DocType:
and (t2.against_invoice is null or t2.against_invoice = '')
and (t2.against_jv is null or t2.against_jv = '')
and t2.account = '%s' and t2.is_advance = 'Yes' and t1.docstatus = 1
order by t1.voucher_date """ % (dr_or_cr,account_head))
order by t1.posting_date""" % (dr_or_cr,account_head))
# clear advance table
obj.doclist = obj.doc.clear_table(obj.doclist,table_field_name)
# Create advance table

View File

@ -15,8 +15,6 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
cur_frm.cscript.onload = function(doc, cdt, cdn) {
if (!doc.voucher_date) doc.voucher_date = dateutil.obj_to_str(new Date());
cur_frm.cscript.load_defaults(doc, cdt, cdn);
}

View File

@ -2,14 +2,14 @@
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-12-03 17:26:38",
"creation": "2013-01-17 12:30:11",
"modified_by": "Administrator",
"modified": "2012-12-04 18:47:42"
"modified": "2013-01-17 14:27:43"
},
{
"is_submittable": 1,
"autoname": "naming_series:",
"name": "__common__",
"is_submittable": 1,
"search_fields": "voucher_type,posting_date, due_date, cheque_no",
"module": "Accounts",
"doctype": "DocType",
@ -47,7 +47,6 @@
"description": "To manage multiple series please go to Setup > Manage Series",
"no_copy": 1,
"oldfieldtype": "Select",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Series",
"oldfieldname": "naming_series",
@ -103,8 +102,8 @@
},
{
"print_hide": 0,
"allow_on_submit": 1,
"oldfieldtype": "Table",
"allow_on_submit": 1,
"doctype": "DocField",
"label": "Entries",
"oldfieldname": "entries",
@ -163,7 +162,6 @@
"oldfieldtype": "Button",
"doctype": "DocField",
"label": "Make Difference Entry",
"trigger": "Client",
"fieldname": "get_balance",
"fieldtype": "Button",
"permlevel": 0
@ -179,15 +177,14 @@
"description": "eg. Cheque Number",
"no_copy": 1,
"oldfieldtype": "Data",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Reference Number",
"oldfieldname": "cheque_no",
"fieldname": "cheque_no",
"fieldtype": "Data",
"search_index": 1,
"in_filter": 1,
"permlevel": 0
"permlevel": 0,
"in_filter": 1
},
{
"no_copy": 1,
@ -291,12 +288,10 @@
"print_hide": 1,
"default": "No",
"oldfieldtype": "Select",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Is Opening",
"oldfieldname": "is_opening",
"permlevel": 0,
"trigger": "Client",
"fieldname": "is_opening",
"fieldtype": "Select",
"search_index": 1,
@ -308,7 +303,6 @@
"description": "For opening invoice entry, this date will reflect in the period-wise aging report.",
"no_copy": 0,
"oldfieldtype": "Date",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Aging Date",
"oldfieldname": "aging_date",
@ -320,7 +314,6 @@
"print_hide": 1,
"default": "Accounts Receivable",
"depends_on": "eval:doc.voucher_type == 'Write Off Voucher'",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Write Off Based On",
"options": "Accounts Receivable\nAccounts Payable",
@ -332,7 +325,6 @@
{
"print_hide": 1,
"depends_on": "eval:doc.voucher_type == 'Write Off Voucher'",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Write Off Amount <=",
"fieldname": "write_off_amount",
@ -343,30 +335,11 @@
{
"print_hide": 1,
"depends_on": "eval:doc.voucher_type == 'Write Off Voucher'",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Get Outstanding Invoices",
"trigger": "Server",
"options": "get_outstanding_invoices",
"fieldname": "get_outstanding_invoices",
"fieldtype": "Button",
"options": "get_outstanding_invoices",
"permlevel": 0
},
{
"print_hide": 0,
"description": "Date of entry (not posting to ledgers)",
"default": "Today",
"oldfieldtype": "Date",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Voucher Date",
"oldfieldname": "voucher_date",
"no_copy": 1,
"fieldname": "voucher_date",
"fieldtype": "Date",
"search_index": 1,
"reqd": 1,
"in_filter": 1,
"permlevel": 0
},
{
@ -442,13 +415,11 @@
"print_hide": 1,
"no_copy": 1,
"oldfieldtype": "Link",
"colour": "White:FFF",
"allow_on_submit": 1,
"doctype": "DocField",
"label": "Select Print Heading",
"oldfieldname": "select_print_heading",
"permlevel": 0,
"trigger": "Client",
"fieldname": "select_print_heading",
"fieldtype": "Link",
"options": "Print Heading",
@ -493,16 +464,14 @@
"print_hide": 1,
"no_copy": 1,
"oldfieldtype": "Link",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Supplier Account",
"oldfieldname": "supplier_account",
"permlevel": 0,
"trigger": "Client",
"options": "Account",
"fieldname": "supplier_account",
"fieldtype": "Link",
"hidden": 0,
"options": "Account"
"permlevel": 0
},
{
"amend": 1,
@ -510,8 +479,8 @@
"doctype": "DocPerm",
"submit": 1,
"write": 1,
"cancel": 1,
"role": "Accounts User",
"cancel": 1,
"permlevel": 0
},
{
@ -520,8 +489,8 @@
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"cancel": 0,
"role": "Accounts User",
"cancel": 0,
"permlevel": 1
},
{
@ -530,8 +499,8 @@
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"cancel": 0,
"role": "Accounts Manager",
"cancel": 0,
"permlevel": 1
},
{
@ -540,8 +509,8 @@
"doctype": "DocPerm",
"submit": 1,
"write": 1,
"cancel": 1,
"role": "Accounts Manager",
"cancel": 1,
"permlevel": 0
},
{
@ -550,8 +519,8 @@
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"cancel": 0,
"role": "Auditor",
"cancel": 0,
"permlevel": 0
},
{
@ -560,8 +529,8 @@
"doctype": "DocPerm",
"submit": 0,
"write": 0,
"cancel": 0,
"role": "Auditor",
"cancel": 0,
"permlevel": 1
}
]

View File

@ -21,7 +21,6 @@ wn.require('app/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxe
wn.require('app/buying/doctype/purchase_common/purchase_common.js');
cur_frm.cscript.onload = function(doc,dt,dn) {
if(!doc.voucher_date) set_multiple(dt,dn,{voucher_date:get_today()});
if(!doc.posting_date) set_multiple(dt,dn,{posting_date:get_today()});
}

View File

@ -31,7 +31,6 @@ wn.require('app/utilities/doctype/sms_control/sms_control.js');
cur_frm.cscript.onload = function(doc,dt,dn) {
if(!doc.customer && doc.debit_to) wn.meta.get_docfield(dt, 'debit_to', dn).print_hide = 0;
if (doc.__islocal) {
//if(!doc.voucher_date) set_multiple(dt,dn,{voucher_date:get_today()});
if(!doc.due_date) set_multiple(dt,dn,{due_date:get_today()});
if(!doc.posting_date) set_multiple(dt,dn,{posting_date:get_today()});
if(!doc.currency && sys_defaults.currency) set_multiple(dt,dn,{currency:sys_defaults.currency});

View File

@ -45,7 +45,7 @@ report.get_query = function() {
date_fld = 'transaction_date';
if(based_on == 'Sales Invoice') {
based_on = 'Sales Invoice';
date_fld = 'voucher_date';
date_fld = 'posting_date';
}
sp_cond = '';

View File

@ -85,7 +85,14 @@ class DocType(TransactionBase):
return g
def add_account(self, ac, par, abbr):
arg = {'account_name':ac,'parent_account':par, 'group_or_ledger':'Group', 'company':self.doc.company,'account_type':'','tax_rate':'0'}
arg = {
'account_name':ac,
'parent_account':par,
'group_or_ledger':'Group',
'company':self.doc.company,
'account_type':'',
'tax_rate':'0'
}
t = get_obj('GL Control').add_ac(cstr(arg))
msgprint("Created Group " + t)

View File

@ -0,0 +1,12 @@
import webnotes
def execute():
webnotes.reload_doc("core", "doctype", "patch_log")
for d in webnotes.conn.sql("""select patch from __PatchLog"""):
webnotes.doc({
"doctype": "Patch Log",
"patch": d[0]
}).insert()
webnotes.conn.commit()
webnotes.conn.sql("drop table __PatchLog")

View File

@ -0,0 +1,27 @@
from __future__ import unicode_literals
import webnotes
def execute():
from webnotes.country_info import get_all
data = get_all()
webnotes.reload_doc("setup", "doctype", "country")
webnotes.reload_doc("setup", "doctype", "currency")
for c in webnotes.conn.sql("""select name from tabCountry"""):
if c[0] in data:
info = webnotes._dict(data[c[0]])
doc = webnotes.doc("Country", c[0])
doc.date_format = info.date_format or "dd-mm-yyyy"
doc.time_zones = "\n".join(info.timezones or [])
doc.save()
if webnotes.conn.exists("Currency", info.currency):
doc = webnotes.doc("Currency", info.currency)
doc.fields.update({
"fraction": info.currency_fraction,
"symbol": info.currency_symbol,
"fraction_units": info.currency_fraction_units
})
doc.save()

View File

@ -1,5 +1,3 @@
import webnotes
def execute():
webnotes.conn.sql("""delete from tabDocPerm where parent='Appraisal'""")
from webnotes.model.sync import sync
sync("hr", "appraisal", force=True)
webnotes.reset_perms("Appraisal")

View File

@ -1,9 +1,3 @@
import webnotes
def execute():
webnotes.conn.sql("""delete from `tabDocPerm` where parent='Custom Script'""")
webnotes.conn.commit()
from webnotes.model.sync import sync
sync("core", "custom_script", force=1)
webnotes.conn.begin()
webnotes.reset_perms("Custom Script")

View File

@ -16,586 +16,138 @@
from __future__ import unicode_literals
patch_list = [
{
'patch_module': 'patches.mar_2012',
'patch_file': 'so_rv_mapper_fix',
'description': 'SO-RV duplicate mapper entry removal'
},
{
'patch_module': 'patches.mar_2012',
'patch_file': 'clean_property_setter',
'description': 'Patch related to property setter cleanup'
},
{
'patch_module': 'patches.jan_mar_2012',
'patch_file': 'sync_ref_db',
'description': 'Deletes non required doctypes'
},
{
'patch_module': 'patches.april_2012',
'patch_file': 'naming_series_patch',
'description': 'Move naming series options into property setter'
},
{
'patch_module': 'patches.jan_mar_2012',
'patch_file': 'rename_dt',
'description': 'Rename DocType Patch'
},
{
'patch_module': 'patches.mar_2012',
'patch_file': 'cleanup_control_panel',
'description': 'Remove email related fields from Control Panel'
},
{
'patch_module': 'patches.mar_2012',
'patch_file': 'doctype_get_refactor',
'description': 'Patch related to doctype get refactoring'
},
{
'patch_module': 'patches.mar_2012',
'patch_file': 'delete_docformat',
'description': 'Deletes DocFormat from database'
},
{
'patch_module': 'patches.mar_2012',
'patch_file': 'usertags',
'description': 'Adds _user_tags columns to tables'
},
{
'patch_module': 'patches.april_2012',
'patch_file': 'reload_c_form',
'description': 'Added attchemnt option and total field'
},
{
'patch_module': 'patches.april_2012',
'patch_file': 'after_sync_cleanup',
'description': 'cleanup after sync'
},
{
'patch_module': 'patches.april_2012',
'patch_file': 'remove_default_from_rv_detail',
'description': ''
},
{
'patch_module': 'patches.april_2012',
'patch_file': 'update_role_in_address',
'description': 'updated roles in address'
},
{
'patch_module': 'patches.april_2012',
'patch_file': 'update_permlevel_in_address',
'description': 'updated permlevel in address'
},
{
'patch_module': 'patches.april_2012',
'patch_file': 'update_appraisal_permission',
'description': 'updated permission in appraisal'
},
{
'patch_module': 'patches.april_2012',
'patch_file': 'serial_no_fixes',
'description': 'fixes for sle creation while import'
},
{
'patch_module': 'patches.april_2012',
'patch_file': 'repost_stock_for_posting_time',
'description': 'repost stock for posting time 00:00:seconds'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'cleanup_property_setter',
'description': 'cleanup_property_setter'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'rename_prev_doctype',
'description': 'rename prev doctype fix'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'cleanup_notification_control',
'description': 'cleanup notification control'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'renamedt_in_custom_search_criteria',
'description': 'raname dt in custom search criteria'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'stock_reco_patch',
'description': 'stock reco patch: store diff info in field'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'reload_reports',
'description': 'reload reports: itemwise sales/delivery details'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'page_role_series_fix',
'description': 'reset series of page role at max'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'reload_sales_invoice_pf',
'description': 'Reload sales invoice print formats'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'std_pf_readonly',
'description': 'Make standard print formats readonly for system manager'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'reload_so_pending_items',
'description': 'reload so pending items'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'customize_form_cleanup',
'description': 'cleanup customize form records'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'cs_server_readonly',
'description': 'Make server custom script readonly for system manager'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'clear_session_cache',
'description': 'clears session cache as shifting to json format'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'same_purchase_rate_patch',
'description': 'Main same rate throughout pur cycle: in global defaults, by default set true'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'create_report_manager_role',
'description': 'Create report manager role if not exists'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'reload_customer_address_contact',
'description': 'Reload report customer address contact'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'profile_perm_patch',
'description': 'Make profile readonly for role All'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'remove_euro_currency',
'description': 'Remove EURO currency and replace with EUR'
},
{
'patch_module': 'patches.may_2012',
'patch_file': 'remove_communication_log',
'description': 'Remove Communication Log and replace it with Communication'
},
{
'patch_module': 'patches.june_2012',
'patch_file': 'barcode_in_feature_setup',
'description': 'Track item by barcode'
},
{
'patch_module': 'patches.june_2012',
'patch_file': 'copy_uom_for_pur_inv_item',
'description': 'Copy uom for pur inv item from PO and PR item table'
},
{
'patch_module': 'patches.june_2012',
'patch_file': 'fetch_organization_from_lead',
'description': 'Fetch organization from lead in quote'
},
{
'patch_module': 'patches.june_2012',
'patch_file': 'reports_list_permission',
'description': 'allow read permission to all for report list'
},
{
'patch_module': 'patches.june_2012',
'patch_file': 'support_ticket_autoreply',
'description': 'New Send Autoreply checkbox in Email Settings'
},
{
'patch_module': 'patches.june_2012',
'patch_file': 'series_unique_patch',
'description': "add unique constraint to series table's name column"
},
{
'patch_module': 'patches.june_2012',
'patch_file': 'set_recurring_type',
'description': "set recurring type as monthly in old"
},
{
'patch_module': 'patches.june_2012',
'patch_file': 'alter_tabsessions',
'description': "alter tabsessions to change user column definition"
},
{
'patch_module': 'patches.june_2012',
'patch_file': 'delete_old_parent_entries',
'description': "delete entries of child table having parent like old_par%% or ''"
},
{
'patch_module': 'patches.april_2012',
'patch_file': 'delete_about_contact',
'description': "delete depracated doctypes of website module"
},
{
'patch_module': 'patches.july_2012',
'patch_file': 'reload_pr_po_mapper',
'description': "order date should be greater than equal to request date"
},
{
'patch_module': 'patches.july_2012',
'patch_file': 'address_contact_perms',
'description': "sync address contact perms"
},
{
'patch_module': 'patches.july_2012',
'patch_file': 'packing_list_cleanup_and_serial_no',
'description': "packing list cleanup and serial no status update"
},
{
'patch_module': 'patches.july_2012',
'patch_file': 'deprecate_import_data_control',
'description': "deprecate doctype - Import Data Control and page - Import Data"
},
{
'patch_module': 'patches.july_2012',
'patch_file': 'default_freeze_account',
'description': "set default freeze_account as 'No' where NULL"
},
{
'patch_module': 'patches.july_2012',
'patch_file': 'update_purchase_tax',
'description': "rename options in purchase taxes and charges"
},
{ 'patch_module': 'patches.june_2012',
'patch_file': 'cms2',
'description': 'cms2 release patches'
},
{ 'patch_module': 'patches.july_2012',
'patch_file': 'auth_table',
'description': 'create new __Auth table'
},
{
'patch_module': 'patches.july_2012',
'patch_file': 'remove_event_role_owner_match',
'description': "Remove Owner match from Event DocType's Permissions"
},
{
'patch_module': 'patches.july_2012',
'patch_file': 'deprecate_bulk_rename',
'description': "Remove Bulk Rename Tool"
},
{
'patch_module': 'patches.july_2012',
'patch_file': 'blog_guest_permission',
},
{
'patch_module': 'patches.july_2012',
'patch_file': 'bin_permission',
},
{
'patch_module': 'patches.july_2012',
'patch_file': 'project_patch_repeat',
},
{
'patch_module': 'patches.july_2012',
'patch_file': 'repost_stock_due_to_wrong_packing_list',
},
{
'patch_module': 'patches.july_2012',
'patch_file': 'supplier_quotation',
},
{
'patch_module': 'patches.august_2012',
'patch_file': 'report_supplier_quotations',
},
{
'patch_module': 'patches.august_2012',
'patch_file': 'task_allocated_to_assigned',
},
{
'patch_module': 'patches.august_2012',
'patch_file': 'change_profile_permission',
},
{
'patch_module': 'patches.august_2012',
'patch_file': 'changed_blog_date_format',
},
{
'patch_module': 'patches.august_2012',
'patch_file': 'repost_billed_amt',
},
{
'patch_module': 'patches.august_2012',
'patch_file': 'remove_cash_flow_statement',
},
{
'patch_module': 'patches.september_2012',
'patch_file': 'stock_report_permissions_for_accounts',
},
{
'patch_module': 'patches.september_2012',
'patch_file': 'communication_delete_permission',
},
{
'patch_module': 'patches.september_2012',
'patch_file': 'all_permissions_patch',
},
{
'patch_module': 'patches.september_2012',
'patch_file': 'customer_permission_patch',
},
{
'patch_module': 'patches.september_2012',
'patch_file': 'add_stock_ledger_entry_index',
},
{
'patch_module': 'patches.september_2012',
'patch_file': 'plot_patch',
},
{
'patch_module': 'patches.september_2012',
'patch_file': 'event_permission',
},
{
'patch_module': 'patches.september_2012',
'patch_file': 'repost_stock',
},
{
'patch_module': 'patches.september_2012',
'patch_file': 'reload_gross_profit',
},
{
'patch_module': 'patches.september_2012',
'patch_file': 'rebuild_trees',
},
{
'patch_module': 'patches.september_2012',
'patch_file': 'deprecate_account_balance',
},
{
'patch_module': 'patches.september_2012',
'patch_file': 'profile_delete_permission',
},
{
'patch_module': 'patches.october_2012',
'patch_file': 'update_permission',
},
{
'patch_module': 'patches.october_2012',
'patch_file': 'reload_gl_mapper',
},
{
'patch_module': 'patches.october_2012',
'patch_file': 'fix_wrong_vouchers',
},
{
'patch_module': 'patches.october_2012',
'patch_file': 'remove_old_customer_contact_address',
},
{
'patch_module': 'patches.october_2012',
'patch_file': 'company_fiscal_year_docstatus_patch',
},
{
'patch_module': 'patches.october_2012',
'patch_file': 'update_account_property',
},
{
'patch_module': 'patches.october_2012',
'patch_file': 'remove_old_trial_bal',
},
{
'patch_module': 'patches.october_2012',
'patch_file': 'fix_cancelled_gl_entries',
},
{
'patch_module': 'patches.october_2012',
'patch_file': 'custom_script_delete_permission',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'custom_field_insert_after',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'delete_item_sales_register1',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'rename_employee_leave_balance_report',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'report_permissions',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'customer_issue_allocated_to_assigned',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'reset_appraisal_permissions',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'disable_cancelled_profiles',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'remove_old_unbilled_items_report',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'support_ticket_response_to_communication',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'cancelled_bom_patch',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'communication_sender_and_recipient',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'update_delivered_billed_percentage_for_pos',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'add_theme_to_profile',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'add_employee_field_in_employee',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'leave_application_cleanup',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'production_order_patch',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'gle_floating_point_issue',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'deprecate_tds',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'expense_leave_reload',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'repost_ordered_qty',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'repost_projected_qty',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'reload_debtors_creditors_ledger',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'website_cache_refactor',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'production_cleanup',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'fix_default_print_format',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'file_list_rename',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'replace_createlocal',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'clear_web_cache',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'remove_quotation_next_contact',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'stock_entry_cleanup',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'production_order_naming_series',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'rebuild_item_group_tree',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'address_title',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'delete_form16_print_format',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'remove_project_mapper',
},
{
'patch_module': 'patches.december_2012',
'patch_file': 'update_print_width',
},
{
'patch_module': 'patches.january_2013',
'patch_file': 'remove_bad_permissions',
},
{
'patch_module': 'patches.january_2013',
'patch_file': 'deprecate_stock_search_criteria',
},
{
'patch_module': 'patches.january_2013',
'patch_file': 'remove_support_search_criteria',
},
{
'patch_module': 'patches.january_2013',
'patch_file': 'holiday_list_patch',
},
{
'patch_module': 'patches.january_2013',
'patch_file': 'stock_reconciliation_patch',
},
{
'patch_module': 'patches.january_2013',
'patch_file': 'report_permission',
},
{
'patch_module': 'patches.january_2013',
'patch_file': 'give_report_permission_on_read',
},
{
'patch_module': 'patches.january_2013',
'patch_file': 'update_closed_on',
},
"patches.mar_2012.so_rv_mapper_fix",
"patches.mar_2012.clean_property_setter",
"patches.jan_mar_2012.sync_ref_db",
"patches.april_2012.naming_series_patch",
"patches.jan_mar_2012.rename_dt",
"patches.mar_2012.cleanup_control_panel",
"patches.mar_2012.doctype_get_refactor",
"patches.mar_2012.delete_docformat",
"patches.mar_2012.usertags",
"patches.april_2012.reload_c_form",
"patches.april_2012.after_sync_cleanup",
"patches.april_2012.remove_default_from_rv_detail",
"patches.april_2012.update_role_in_address",
"patches.april_2012.update_permlevel_in_address",
"patches.april_2012.update_appraisal_permission",
"patches.april_2012.serial_no_fixes",
"patches.april_2012.repost_stock_for_posting_time",
"patches.may_2012.cleanup_property_setter",
"patches.may_2012.rename_prev_doctype",
"patches.may_2012.cleanup_notification_control",
"patches.may_2012.renamedt_in_custom_search_criteria",
"patches.may_2012.stock_reco_patch",
"patches.may_2012.reload_reports",
"patches.may_2012.page_role_series_fix",
"patches.may_2012.reload_sales_invoice_pf",
"patches.may_2012.std_pf_readonly",
"patches.may_2012.reload_so_pending_items",
"patches.may_2012.customize_form_cleanup",
"patches.may_2012.cs_server_readonly",
"patches.may_2012.clear_session_cache",
"patches.may_2012.same_purchase_rate_patch",
"patches.may_2012.create_report_manager_role",
"patches.may_2012.reload_customer_address_contact",
"patches.may_2012.profile_perm_patch",
"patches.may_2012.remove_euro_currency",
"patches.may_2012.remove_communication_log",
"patches.june_2012.barcode_in_feature_setup",
"patches.june_2012.copy_uom_for_pur_inv_item",
"patches.june_2012.fetch_organization_from_lead",
"patches.june_2012.reports_list_permission",
"patches.june_2012.support_ticket_autoreply",
"patches.june_2012.series_unique_patch",
"patches.june_2012.set_recurring_type",
"patches.june_2012.alter_tabsessions",
"patches.june_2012.delete_old_parent_entries",
"patches.april_2012.delete_about_contact",
"patches.july_2012.reload_pr_po_mapper",
"patches.july_2012.address_contact_perms",
"patches.july_2012.packing_list_cleanup_and_serial_no",
"patches.july_2012.deprecate_import_data_control",
"patches.july_2012.default_freeze_account",
"patches.july_2012.update_purchase_tax",
"patches.june_2012.cms2",
"patches.july_2012.auth_table",
"patches.july_2012.remove_event_role_owner_match",
"patches.july_2012.deprecate_bulk_rename",
"patches.july_2012.blog_guest_permission",
"patches.july_2012.bin_permission",
"patches.july_2012.project_patch_repeat",
"patches.july_2012.repost_stock_due_to_wrong_packing_list",
"patches.july_2012.supplier_quotation",
"patches.august_2012.report_supplier_quotations",
"patches.august_2012.task_allocated_to_assigned",
"patches.august_2012.change_profile_permission",
"patches.august_2012.changed_blog_date_format",
"patches.august_2012.repost_billed_amt",
"patches.august_2012.remove_cash_flow_statement",
"patches.september_2012.stock_report_permissions_for_accounts",
"patches.september_2012.communication_delete_permission",
"patches.september_2012.all_permissions_patch",
"patches.september_2012.customer_permission_patch",
"patches.september_2012.add_stock_ledger_entry_index",
"patches.september_2012.plot_patch",
"patches.september_2012.event_permission",
"patches.september_2012.repost_stock",
"patches.september_2012.reload_gross_profit",
"patches.september_2012.rebuild_trees",
"patches.september_2012.deprecate_account_balance",
"patches.september_2012.profile_delete_permission",
"patches.october_2012.update_permission",
"patches.october_2012.reload_gl_mapper",
"patches.october_2012.fix_wrong_vouchers",
"patches.october_2012.remove_old_customer_contact_address",
"patches.october_2012.company_fiscal_year_docstatus_patch",
"patches.october_2012.update_account_property",
"patches.october_2012.remove_old_trial_bal",
"patches.october_2012.fix_cancelled_gl_entries",
"patches.october_2012.custom_script_delete_permission",
"patches.november_2012.custom_field_insert_after",
"patches.november_2012.delete_item_sales_register1",
"patches.november_2012.rename_employee_leave_balance_report",
"patches.november_2012.report_permissions",
"patches.november_2012.customer_issue_allocated_to_assigned",
"patches.november_2012.reset_appraisal_permissions",
"patches.november_2012.disable_cancelled_profiles",
"patches.november_2012.remove_old_unbilled_items_report",
"patches.november_2012.support_ticket_response_to_communication",
"patches.november_2012.cancelled_bom_patch",
"patches.november_2012.communication_sender_and_recipient",
"patches.november_2012.update_delivered_billed_percentage_for_pos",
"patches.november_2012.add_theme_to_profile",
"patches.november_2012.add_employee_field_in_employee",
"patches.november_2012.leave_application_cleanup",
"patches.november_2012.production_order_patch",
"patches.november_2012.gle_floating_point_issue",
"patches.december_2012.deprecate_tds",
"patches.december_2012.expense_leave_reload",
"patches.december_2012.repost_ordered_qty",
"patches.december_2012.repost_projected_qty",
"patches.december_2012.reload_debtors_creditors_ledger",
"patches.december_2012.website_cache_refactor",
"patches.december_2012.production_cleanup",
"patches.december_2012.fix_default_print_format",
"patches.december_2012.file_list_rename",
"patches.december_2012.replace_createlocal",
"patches.december_2012.clear_web_cache",
"patches.december_2012.remove_quotation_next_contact",
"patches.december_2012.stock_entry_cleanup",
"patches.december_2012.production_order_naming_series",
"patches.december_2012.rebuild_item_group_tree",
"patches.december_2012.address_title",
"patches.december_2012.delete_form16_print_format",
"patches.december_2012.remove_project_mapper",
"patches.december_2012.update_print_width",
"patches.january_2013.remove_bad_permissions",
"patches.january_2013.deprecate_stock_search_criteria",
"patches.january_2013.remove_support_search_criteria",
"patches.january_2013.holiday_list_patch",
"patches.january_2013.stock_reconciliation_patch",
"patches.january_2013.report_permission",
"patches.january_2013.give_report_permission_on_read",
"patches.january_2013.update_closed_on",
"patches.january_2013.change_patch_structure",
"patches.january_2013.update_country_info",
]

View File

@ -37,14 +37,14 @@ $.extend(erpnext.complete_setup, {
{fieldname:'fy_start', label:'Financial Year Start Date', fieldtype:'Select',
description:'Your financial year begins on"', reqd:1,
options: erpnext.complete_setup.fy_start_list.join('\n')},
{fieldname:'country', label: 'Country', reqd:1,
options: "", fieldtype: 'Select'},
{fieldname:'currency', label: 'Default Currency', reqd:1,
options: erpnext.complete_setup.currency_list.join('\n'), fieldtype: 'Select'},
options: "Currency", fieldtype: 'Link'},
{fieldname:'timezone', label: 'Time Zone', reqd:1,
options: "", fieldtype: 'Select'},
{fieldname:'industry', label: 'Industry', reqd:1,
options: erpnext.complete_setup.industry_list.join('\n'), fieldtype: 'Select'},
{fieldname:'country', label: 'Country', reqd:1,
options: erpnext.complete_setup.country_list.join('\n'), fieldtype: 'Select'},
{fieldname:'timezone', label: 'Time Zone', reqd:1,
options: '', fieldtype: 'Select'},
{fieldname:'update', label:'Setup',fieldtype:'Button'},
],
});
@ -54,6 +54,15 @@ $.extend(erpnext.complete_setup, {
$('header').toggle(false); // hide toolbar
}
wn.call({
method:"webnotes.country_info.get_all",
callback: function(data) {
erpnext.country_info = data.message;
d.get_input("country").empty()
.add_options([""].concat(keys(data.message).sort()));
}
})
// on clicking update
d.fields_dict.update.input.onclick = function() {
var data = d.get_values();
@ -74,12 +83,19 @@ $.extend(erpnext.complete_setup, {
var $timezone = $(d.fields_dict.timezone.input);
$timezone.empty();
if(country){
var timezone_list = erpnext.complete_setup.timezone_dict[country];
if(timezone_list.length > 1) {
timezone_list = [""].concat(timezone_list);
var timezone_list = erpnext.country_info[country].timezones;
if(timezone_list.length==0) {
timezone_list = $.map(erpnext.country_info, function(m) {
return m.timezones
});
}
$timezone.add_options(timezone_list);
$timezone.empty().add_options(timezone_list);
console.log(d.get_input("currency"))
d.get_input("currency").val(erpnext.country_info[country].currency);
}
};
// company name already set
@ -104,374 +120,12 @@ $.extend(erpnext.complete_setup, {
},
fy_start_list: ['', '1st Jan', '1st Apr', '1st Jul', '1st Oct'],
currency_list: ['', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AZN',
'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BRL', 'BSD', 'BTN', 'BYR',
'BZD', 'CAD', 'CDF', 'CFA', 'CFP', 'CHF', 'CLP', 'CNY', 'COP', 'CRC', 'CUC', 'CZK', 'DJF',
'DKK', 'DOP', 'DZD', 'EEK', 'EGP', 'ERN', 'ETB', 'EUR', 'EURO', 'FJD', 'FKP', 'FMG', 'GBP',
'GEL', 'GHS', 'GIP', 'GMD', 'GNF', 'GQE', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF',
'IDR', 'ILS', 'INR', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF',
'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LTL', 'LVL', 'LYD',
'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MYR',
'MZM', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NRs', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP',
'PKR', 'PLN', 'PYG', 'QAR', 'RMB', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SCR', 'SDG', 'SDR',
'SEK', 'SGD', 'SHP', 'SOS', 'SRD', 'STD', 'SYP', 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TRY',
'TTD', 'TWD', 'TZS', 'UAE', 'UAH', 'UGX', 'USD', 'USh', 'UYU', 'UZS', 'VEB', 'VND', 'VUV',
'WST', 'XAF', 'XCD', 'XDR', 'XOF', 'XPF', 'YEN', 'YER', 'YTL', 'ZAR', 'ZMK', 'ZWR'],
industry_list: ['', 'Aerospace and Defence', 'Agriculture', 'Apparel', 'Automobile',
'Banking', 'Biotechnology', 'Chemical', 'Communications', 'Consulting', 'Customer Service',
'Education', 'Electronics', 'Energy', 'Engineering', 'Entertainment', 'Environmental',
'Finance', 'Food and Beverage', 'Government', 'Healthcare', 'Hospitality',
'Information Technology', 'Insurance', 'Machinery', 'Manufacturing', 'Media',
'Not For Profit', 'Recreation', 'Retail', 'Shipping', 'Technology',
'Telecommunications', 'Transportation', 'Trading', 'Utilities', 'Other'],
country_list: ["", 'Afghanistan', 'Albania', 'Algeria', 'Andorra', 'Angola', 'Antigua and Barbuda',
'Argentina', 'Armenia', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas', 'Bahrain',
'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bhutan', 'Bolivia',
'Bosnia and Herzegovina', 'Botswana', 'Brazil', 'Brunei Darussalam', 'Bulgaria',
'Burkina Faso', 'Burundi', 'Cambodia', 'Cameroon', 'Canada', 'Cape Verde',
'Central African Republic', 'Chad', 'Chile', 'Colombia', 'Comoros', 'Costa Rica',
'Croatia', 'Cuba', 'Cyprus', 'Czech Republic', "C\xc3\xb4te d'Ivoire",
'Democratic Republic of the Congo', 'Denmark', 'Djibouti', 'Dominica',
'Dominican Republic', 'East Timor', 'Ecuador', 'Egypt', 'El Salvador',
'Equatorial Guinea', 'Eritrea', 'Estonia', 'Ethiopia', 'Federated States of Micronesia',
'Fiji', 'Finland', 'France', 'Gabon', 'Georgia', 'Germany', 'Ghana', 'Greece',
'Grenada', 'Guatemala', 'Guinea', 'Guinea-Bissau', 'Guyana', 'Haiti', 'Honduras', 'Hong Kong',
'Hungary', 'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Israel', 'Italy',
'Jamaica', 'Japan', 'Jordan', 'Kazakhstan', 'Kenya', 'Kingdom of the Netherlands',
'Kiribati', 'Kuwait', 'Kyrgyzstan', 'Laos', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia',
'Libya', 'Liechtenstein', 'Lithuania', 'Luxembourg', 'Macedonia', 'Madagascar', 'Malawi',
'Malaysia', 'Maldives', 'Mali', 'Malta', 'Marshall Islands', 'Mauritania', 'Mauritius',
'Mexico', 'Moldova', 'Monaco', 'Mongolia', 'Montenegro', 'Morocco', 'Mozambique',
'Myanmar', 'Namibia', 'Nauru', 'Nepal', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria',
'North Korea', 'Norway', 'Oman', 'Pakistan', 'Palau', 'Panama', 'Papua New Guinea',
'Paraguay', "China", 'Peru', 'Philippines', 'Poland', 'Portugal',
'Qatar', 'Republic of Ireland', 'Republic of the Congo', 'Romania', 'Russia', 'Rwanda',
'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Vincent and the Grenadines', 'Samoa',
'San Marino', 'Saudi Arabia', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone',
'Singapore', 'Slovakia', 'Slovenia', 'Solomon Islands', 'Somalia', 'South Africa',
'South Korea', 'Spain', 'Sri Lanka', 'Sudan', 'Suriname', 'Swaziland', 'Sweden',
'Switzerland', 'Syria', 'S\xc3\xa3o Tom\xc3\xa9 and Pr\xc3\xadncipe', 'Tajikistan',
'Tanzania', 'Thailand', 'The Gambia', 'Togo', 'Tonga', 'Trinidad and Tobago', 'Tunisia',
'Turkey', 'Turkmenistan', 'Tuvalu', 'Uganda', 'Ukraine', 'United Arab Emirates',
'United Kingdom', 'United States', 'Uruguay', 'Uzbekistan', 'Vanuatu', 'Vatican City',
'Venezuela', 'Vietnam', 'Yemen', 'Zambia', 'Zimbabwe'],
timezone_dict: {
'Afghanistan': ['Asia/Kabul'],
'Albania': ['Europe/Tirane'],
'Algeria': ['Africa/Algiers'],
'Andorra': ['Europe/Andorra'],
'Angola': ['Africa/Luanda'],
'Antigua and Barbuda': ['America/Antigua'],
'Argentina': ['America/Argentina/Buenos_Aires',
'America/Argentina/Cordoba',
'America/Argentina/Jujuy',
'America/Argentina/Tucuman',
'America/Argentina/Catamarca',
'America/Argentina/La_Rioja',
'America/Argentina/San_Juan',
'America/Argentina/Mendoza',
'America/Argentina/Rio_Gallegos',
'America/Argentina/Ushuaia'],
'Armenia': ['Asia/Yerevan'],
'Australia': ['Australia/Lord_Howe',
'Australia/Hobart',
'Australia/Currie',
'Australia/Melbourne',
'Australia/Sydney',
'Australia/Broken_Hill',
'Australia/Brisbane',
'Australia/Lindeman',
'Australia/Adelaide',
'Australia/Darwin',
'Australia/Perth'],
'Austria': ['Europe/Vienna'],
'Azerbaijan': ['Asia/Baku'],
'Bahamas': ['America/Nassau'],
'Bahrain': ['Asia/Bahrain'],
'Bangladesh': ['Asia/Dhaka'],
'Barbados': ['America/Barbados'],
'Belarus': ['Europe/Minsk'],
'Belgium': ['Europe/Brussels'],
'Belize': ['America/Belize'],
'Benin': ['Africa/Porto-Novo'],
'Bhutan': ['Asia/Thimphu'],
'Bolivia': ['America/La_Paz'],
'Bosnia and Herzegovina': ['Europe/Sarajevo'],
'Botswana': ['Africa/Gaborone'],
'Brazil': ['America/Noronha',
'America/Belem',
'America/Fortaleza',
'America/Recife',
'America/Araguaina',
'America/Maceio',
'America/Bahia',
'America/Sao_Paulo',
'America/Campo_Grande',
'America/Cuiaba',
'America/Porto_Velho',
'America/Boa_Vista',
'America/Manaus',
'America/Eirunepe',
'America/Rio_Branco'],
'Brunei Darussalam': ['Asia/Brunei'],
'Bulgaria': ['Europe/Sofia'],
'Burkina Faso': ['Africa/Ouagadougou'],
'Burundi': ['Africa/Bujumbura'],
'Cambodia': ['Asia/Phnom_Penh'],
'Cameroon': ['Africa/Douala'],
'Canada': ['America/St_Johns',
'America/Halifax',
'America/Glace_Bay',
'America/Moncton',
'America/Goose_Bay',
'America/Blanc-Sablon',
'America/Montreal',
'America/Toronto',
'America/Nipigon',
'America/Thunder_Bay',
'America/Pangnirtung',
'America/Iqaluit',
'America/Atikokan',
'America/Rankin_Inlet',
'America/Winnipeg',
'America/Rainy_River',
'America/Cambridge_Bay',
'America/Regina',
'America/Swift_Current',
'America/Edmonton',
'America/Yellowknife',
'America/Inuvik',
'America/Dawson_Creek',
'America/Vancouver',
'America/Whitehorse',
'America/Dawson'],
'Cape Verde': ['Atlantic/Cape_Verde'],
'Central African Republic': ['Africa/Bangui'],
'Chad': ['Africa/Ndjamena'],
'China': ['Asia/Shanghai',
'Asia/Harbin',
'Asia/Chongqing',
'Asia/Urumqi',
'Asia/Kashgar'],
'Chile': ['America/Santiago', 'Pacific/Easter'],
'Colombia': ['America/Bogota'],
'Comoros': ['Indian/Comoro'],
'Costa Rica': ['America/Costa_Rica'],
'Croatia': ['Europe/Zagreb'],
'Cuba': ['America/Havana'],
'Cyprus': ['Asia/Nicosia'],
'Czech Republic': ['Europe/Prague'],
"C\xc3\xb4te d'Ivoire": ['Africa/Abidjan'],
'Democratic Republic of the Congo': ['Africa/Kinshasa', 'Africa/Lubumbashi'],
'Denmark': ['Europe/Copenhagen'],
'Djibouti': ['Africa/Djibouti'],
'Dominica': ['America/Dominica'],
'Dominican Republic': ['America/Santo_Domingo'],
'East Timor': ['Asia/Dili'],
'Ecuador': ['America/Guayaquil', 'Pacific/Galapagos'],
'Egypt': ['Africa/Cairo'],
'El Salvador': ['America/El_Salvador'],
'Equatorial Guinea': ['Africa/Malabo'],
'Eritrea': ['Africa/Asmera'],
'Estonia': ['Europe/Tallinn'],
'Ethiopia': ['Africa/Addis_Ababa'],
'Federated States of Micronesia': ['Pacific/Truk',
'Pacific/Ponape',
'Pacific/Kosrae'],
'Fiji': ['Pacific/Fiji'],
'Finland': ['Europe/Helsinki'],
'France': ['Europe/Paris'],
'Gabon': ['Africa/Libreville'],
'Georgia': ['Asia/Tbilisi'],
'Germany': ['Europe/Berlin'],
'Ghana': ['Africa/Accra'],
'Greece': ['Europe/Athens'],
'Grenada': ['America/Grenada'],
'Guatemala': ['America/Guatemala'],
'Guinea': ['Africa/Conakry'],
'Guinea-Bissau': ['Africa/Bissau'],
'Guyana': ['America/Guyana'],
'Haiti': ['America/Guatemala'],
'Honduras': ['America/Tegucigalpa'],
'Hong Kong': ['Asia/Hong_Kong'],
'Hungary': ['Europe/Budapest'],
'Iceland': ['Atlantic/Reykjavik'],
'India': ['Asia/Calcutta'],
'Indonesia': ['Asia/Jakarta',
'Asia/Pontianak',
'Asia/Makassar',
'Asia/Jayapura'],
'Iran': ['Asia/Tehran'],
'Iraq': ['Asia/Baghdad'],
'Israel': ['Asia/Jerusalem'],
'Italy': ['Europe/Rome'],
'Jamaica': ['America/Jamaica'],
'Japan': ['Asia/Tokyo'],
'Jordan': ['Asia/Amman'],
'Kazakhstan': ['Asia/Almaty',
'Asia/Qyzylorda',
'Asia/Aqtobe',
'Asia/Aqtau',
'Asia/Oral'],
'Kenya': ['Africa/Nairobi'],
'Kingdom of the Netherlands': ['Europe/Amsterdam'],
'Kiribati': ['Pacific/Tarawa', 'Pacific/Enderbury', 'Pacific/Kiritimati'],
'Kuwait': ['Asia/Kuwait'],
'Kyrgyzstan': ['Asia/Bishkek'],
'Laos': ['Asia/Vientiane'],
'Latvia': ['Europe/Riga'],
'Lebanon': ['Asia/Beirut'],
'Lesotho': ['Africa/Maseru'],
'Liberia': ['Africa/Monrovia'],
'Libya': ['Africa/Tripoli'],
'Liechtenstein': ['Europe/Vaduz'],
'Lithuania': ['Europe/Vilnius'],
'Luxembourg': ['Europe/Luxembourg'],
'Macedonia': ['Europe/Skopje'],
'Madagascar': ['Indian/Antananarivo'],
'Malawi': ['Africa/Blantyre'],
'Malaysia': ['Asia/Kuala_Lumpur', 'Asia/Kuching'],
'Maldives': ['Indian/Maldives'],
'Mali': ['Africa/Bamako'],
'Malta': ['Europe/Malta'],
'Marshall Islands': ['Pacific/Majuro', 'Pacific/Kwajalein'],
'Mauritania': ['Africa/Nouakchott'],
'Mauritius': ['Indian/Mauritius'],
'Mexico': ['America/Mexico_City',
'America/Cancun',
'America/Merida',
'America/Monterrey',
'America/Mazatlan',
'America/Chihuahua',
'America/Hermosillo',
'America/Tijuana'],
'Moldova': ['Europe/Chisinau'],
'Monaco': ['Europe/Monaco'],
'Mongolia': ['Asia/Ulaanbaatar', 'Asia/Hovd', 'Asia/Choibalsan'],
'Montenegro': ['Europe/Podgorica'],
'Morocco': ['Africa/Casablanca'],
'Mozambique': ['Africa/Maputo'],
'Myanmar': ['Asia/Rangoon'],
'Namibia': ['Africa/Windhoek'],
'Nauru': ['Pacific/Nauru'],
'Nepal': ['Asia/Katmandu'],
'New Zealand': ['Pacific/Auckland', 'Pacific/Chatham'],
'Nicaragua': ['America/Managua'],
'Niger': ['Africa/Niamey'],
'Nigeria': ['Africa/Lagos'],
'North Korea': ['Asia/Pyongyang'],
'Norway': ['Europe/Oslo'],
'Oman': ['Asia/Muscat'],
'Pakistan': ['Asia/Karachi'],
'Palau': ['Pacific/Palau'],
'Panama': ['America/Panama'],
'Papua New Guinea': ['Pacific/Port_Moresby'],
'Paraguay': ['America/Asuncion'],
'Peru': ['America/Lima'],
'Philippines': ['Asia/Manila'],
'Poland': ['Europe/Warsaw'],
'Portugal': ['Europe/Lisbon', 'Atlantic/Madeira', 'Atlantic/Azores'],
'Qatar': ['Asia/Qatar'],
'Republic of Ireland': ['Europe/Dublin'],
'Republic of the Congo': ['Africa/Brazzaville'],
'Romania': ['Europe/Bucharest'],
'Russia': ['Europe/Kaliningrad',
'Europe/Moscow',
'Europe/Volgograd',
'Europe/Samara',
'Asia/Yekaterinburg',
'Asia/Omsk',
'Asia/Novosibirsk',
'Asia/Krasnoyarsk',
'Asia/Irkutsk',
'Asia/Yakutsk',
'Asia/Vladivostok',
'Asia/Sakhalin',
'Asia/Magadan',
'Asia/Kamchatka',
'Asia/Anadyr'],
'Rwanda': ['Africa/Kigali'],
'Saint Kitts and Nevis': ['America/St_Kitts'],
'Saint Lucia': ['America/St_Lucia'],
'Saint Vincent and the Grenadines': ['America/St_Vincent'],
'Samoa': ['Pacific/Apia'],
'San Marino': ['Europe/San_Marino'],
'Saudi Arabia': ['Asia/Riyadh'],
'Senegal': ['Africa/Dakar'],
'Serbia': ['Europe/Belgrade'],
'Seychelles': ['Indian/Mahe'],
'Sierra Leone': ['Africa/Freetown'],
'Singapore': ['Asia/Singapore'],
'Slovakia': ['Europe/Bratislava'],
'Slovenia': ['Europe/Ljubljana'],
'Solomon Islands': ['Pacific/Guadalcanal'],
'Somalia': ['Africa/Mogadishu'],
'South Africa': ['Africa/Johannesburg'],
'South Korea': ['Asia/Seoul'],
'Spain': ['Europe/Madrid', 'Africa/Ceuta', 'Atlantic/Canary'],
'Sri Lanka': ['Asia/Colombo'],
'Sudan': ['Africa/Khartoum'],
'Suriname': ['America/Paramaribo'],
'Swaziland': ['Africa/Mbabane'],
'Sweden': ['Europe/Stockholm'],
'Switzerland': ['Europe/Zurich'],
'Syria': ['Asia/Damascus'],
'S\xc3\xa3o Tom\xc3\xa9 and Pr\xc3\xadncipe': ['Africa/Sao_Tome'],
'Tajikistan': ['Asia/Dushanbe'],
'Tanzania': ['Africa/Dar_es_Salaam'],
'Thailand': ['Asia/Bangkok'],
'The Gambia': ['Africa/Banjul'],
'Togo': ['Africa/Lome'],
'Tonga': ['Pacific/Tongatapu'],
'Trinidad and Tobago': ['America/Port_of_Spain'],
'Tunisia': ['Africa/Tunis'],
'Turkey': ['Europe/Istanbul'],
'Turkmenistan': ['Asia/Ashgabat'],
'Tuvalu': ['Pacific/Funafuti'],
'Uganda': ['Africa/Kampala'],
'Ukraine': ['Europe/Kiev',
'Europe/Uzhgorod',
'Europe/Zaporozhye',
'Europe/Simferopol'],
'United Arab Emirates': ['Asia/Dubai'],
'United Kingdom': ['Europe/London'],
'United States': ['America/New_York',
'America/Detroit',
'America/Kentucky/Louisville',
'America/Kentucky/Monticello',
'America/Indiana/Indianapolis',
'America/Indiana/Marengo',
'America/Indiana/Knox',
'America/Indiana/Vevay',
'America/Chicago',
'America/Indiana/Vincennes',
'America/Indiana/Petersburg',
'America/Menominee',
'America/North_Dakota/Center',
'America/North_Dakota/New_Salem',
'America/Denver',
'America/Boise',
'America/Shiprock',
'America/Phoenix',
'America/Los_Angeles',
'America/Anchorage',
'America/Juneau',
'America/Yakutat',
'America/Nome',
'America/Adak',
'Pacific/Honolulu'],
'Uruguay': ['America/Montevideo'],
'Uzbekistan': ['Asia/Samarkand', 'Asia/Tashkent'],
'Vanuatu': ['Pacific/Efate'],
'Vatican City': ['Europe/Vatican'],
'Venezuela': ['America/Caracas'],
'Vietnam': ['Asia/Saigon'],
'Yemen': ['Asia/Aden'],
'Zambia': ['Africa/Lusaka'],
'Zimbabwe': ['Africa/Harare'],
},
industry_list: ['', 'Aerospace and Defence', 'Agriculture', 'Apparel', 'Automobile',
'Banking', 'Biotechnology', 'Chemical', 'Communications', 'Consulting', 'Customer Service',
'Education', 'Electronics', 'Energy', 'Engineering', 'Entertainment', 'Environmental',
'Finance', 'Food and Beverage', 'Government', 'Healthcare', 'Hospitality',
'Information Technology', 'Insurance', 'Machinery', 'Manufacturing', 'Media',
'Not For Profit', 'Recreation', 'Retail', 'Shipping', 'Technology',
'Telecommunications', 'Transportation', 'Trading', 'Utilities', 'Other'],
});

View File

@ -53,9 +53,9 @@ erpnext.utils.lead_query = function() {
// searches for customer
erpnext.utils.customer_query = function() {
if(sys_defaults.cust_master_name == "Customer Name") {
var fields = ["name", "customer_group", "country", "territory"];
var fields = ["name", "customer_group", "territory"];
} else {
var fields = ["name", "customer_name", "customer_group", "country", "territory"];
var fields = ["name", "customer_name", "customer_group", "territory"];
}
return "select " + fields.join(", ") + " from `tabCustomer` where docstatus < 2 and \

View File

@ -123,7 +123,7 @@ class DocType(TransactionBase):
abbr = self.get_company_abbr()
if not sql("select name from tabAccount where name=%s", (self.doc.name + " - " + abbr)):
parent_account = self.get_receivables_group()
arg = {'account_name':self.doc.name,'parent_account': parent_account, 'group_or_ledger':'Ledger', 'company':self.doc.company,'account_type':'','tax_rate':'0','master_type':'Customer','master_name':self.doc.name,'address':self.doc.address}
arg = {'account_name':self.doc.name,'parent_account': parent_account, 'group_or_ledger':'Ledger', 'company':self.doc.company,'account_type':'','tax_rate':'0','master_type':'Customer','master_name':self.doc.name}
# create
ac = get_obj('GL Control').add_ac(cstr(arg))
@ -172,11 +172,6 @@ class DocType(TransactionBase):
pass
def on_update(self):
# create customer addr
#self.create_customer_address()
# create customer contact
#self.create_customer_contact()
# update lead status
self.update_lead_status()
# create account head
self.create_account_head()

View File

@ -299,7 +299,7 @@ cur_frm.fields_dict['quotation_details'].grid.get_field('item_code').get_query=
and si_item.item_code = item.name \
and si.docstatus = 1 \
and si.customer = \"%(cust)s\" \
order by si.voucher_date desc \
order by si.posting_date desc \
limit 1 \
) as sales_rate, \
item.item_name, item.description \

View File

@ -162,7 +162,6 @@ class DocType:
ac = Document('Account')
for d in self.fld_dict.keys():
ac.fields[d] = (d == 'parent_account' and lst[self.fld_dict[d]]) and lst[self.fld_dict[d]] +' - '+ self.doc.abbr or lst[self.fld_dict[d]]
ac.old_parent = ''
ac_obj = get_obj(doc=ac)
ac_obj.doc.freeze_account='No'
ac_obj.doc.master_type = ''
@ -199,7 +198,7 @@ class DocType:
# ---------------------------------------------------
def create_default_cost_center(self):
glc = get_obj('GL Control')
cc_list = [{'cost_center_name':'Root','company_name':self.doc.name,'company_abbr':self.doc.abbr,'group_or_ledger':'Group','parent_cost_center':'','old_parent':''}, {'cost_center_name':'Default CC Ledger','company_name':self.doc.name,'company_abbr':self.doc.abbr,'group_or_ledger':'Ledger','parent_cost_center':'Root - ' + self.doc.abbr,'old_parent':''}]
cc_list = [{'cost_center_name':'Root','company_name':self.doc.name,'company_abbr':self.doc.abbr,'group_or_ledger':'Group','parent_cost_center':''}, {'cost_center_name':'Default CC Ledger','company_name':self.doc.name,'company_abbr':self.doc.abbr,'group_or_ledger':'Ledger','parent_cost_center':'Root - ' + self.doc.abbr}]
for c in cc_list:
glc.add_cc(str(c))

View File

@ -2,35 +2,24 @@
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-03-27 14:36:19",
"creation": "2013-01-17 17:02:24",
"modified_by": "Administrator",
"modified": "2012-03-27 14:36:19"
"modified": "2013-01-17 17:04:08"
},
{
"section_style": "Simple",
"in_create": 0,
"module": "Setup",
"server_code_error": " ",
"document_type": "Master",
"read_only": 0,
"autoname": "field:country_name",
"name": "__common__",
"colour": "White:FFF",
"in_create": 0,
"doctype": "DocType",
"show_in_menu": 0,
"version": 11
"module": "Setup",
"document_type": "Master",
"name": "__common__"
},
{
"parent": "Country",
"oldfieldtype": "Data",
"oldfieldname": "country_name",
"reqd": 1,
"name": "__common__",
"parent": "Country",
"doctype": "DocField",
"label": "Country Name",
"parenttype": "DocType",
"fieldname": "country_name",
"fieldtype": "Data",
"permlevel": 0,
"parentfield": "fields"
},
@ -49,12 +38,33 @@
"name": "Country",
"doctype": "DocType"
},
{
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Country Name",
"oldfieldname": "country_name",
"fieldname": "country_name",
"fieldtype": "Data",
"reqd": 1
},
{
"doctype": "DocField",
"label": "Date Format",
"fieldname": "date_format",
"fieldtype": "Data"
},
{
"doctype": "DocField",
"label": "Time Zones",
"fieldname": "time_zones",
"fieldtype": "Text"
},
{
"amend": 0,
"cancel": 0,
"role": "Sales Master Manager",
"doctype": "DocPerm",
"submit": 0
"submit": 0,
"role": "Sales Master Manager",
"cancel": 0
},
{
"role": "Purchase Master Manager",
@ -67,8 +77,5 @@
{
"role": "HR Manager",
"doctype": "DocPerm"
},
{
"doctype": "DocField"
}
]

View File

@ -2,36 +2,24 @@
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-07-03 13:30:55",
"creation": "2013-01-17 12:30:28",
"modified_by": "Administrator",
"modified": "2012-07-11 16:11:45"
"modified": "2013-01-17 16:24:59"
},
{
"section_style": "Simple",
"description": "**Currency** Master",
"module": "Setup",
"allow_trash": 1,
"server_code_error": " ",
"in_create": 0,
"read_only": 0,
"autoname": "field:currency_name",
"name": "__common__",
"colour": "White:FFF",
"in_create": 0,
"description": "**Currency** Master",
"doctype": "DocType",
"show_in_menu": 0,
"version": 1
"module": "Setup",
"name": "__common__"
},
{
"parent": "Currency",
"oldfieldtype": "Data",
"oldfieldname": "currency_name",
"reqd": 1,
"name": "__common__",
"parent": "Currency",
"doctype": "DocField",
"label": "Currency Name",
"parenttype": "DocType",
"fieldname": "currency_name",
"fieldtype": "Data",
"permlevel": 0,
"parentfield": "fields"
},
@ -39,9 +27,7 @@
"name": "__common__",
"parent": "Currency",
"read": 1,
"create": 1,
"doctype": "DocPerm",
"write": 1,
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "permissions"
@ -51,25 +37,44 @@
"doctype": "DocType"
},
{
"cancel": 1,
"role": "Accounts Manager",
"oldfieldtype": "Data",
"doctype": "DocField",
"label": "Currency Name",
"oldfieldname": "currency_name",
"fieldname": "currency_name",
"fieldtype": "Data",
"reqd": 1
},
{
"doctype": "DocField",
"label": "Fraction",
"fieldname": "fraction",
"fieldtype": "Data"
},
{
"doctype": "DocField",
"label": "Fraction Units",
"fieldname": "fraction_units",
"fieldtype": "Int"
},
{
"doctype": "DocField",
"label": "Symbol",
"fieldname": "symbol",
"fieldtype": "Data"
},
{
"amend": 0,
"create": 1,
"doctype": "DocPerm",
"submit": 0,
"write": 1,
"report": 1,
"role": "System Manager",
"cancel": 1
},
{
"role": "All",
"doctype": "DocPerm"
},
{
"amend": 0,
"cancel": 1,
"role": "Sales Master Manager",
"doctype": "DocPerm",
"submit": 0
},
{
"amend": 0,
"cancel": 0,
"role": "Purchase Master Manager",
"doctype": "DocPerm",
"submit": 0
},
{
"doctype": "DocField"
}
]

View File

@ -50,33 +50,37 @@ class DocType:
master_dict = {'Fiscal Year':{
'year': curr_fiscal_year,
'year_start_date': fy_start_date,
'company': args.get('company_name')}}
}}
self.create_records(master_dict)
# Company
master_dict = {'Company':{'company_name':args.get('company_name'),
'abbr':args.get('company_abbr'),
'default_currency':args.get('currency')
}}
master_dict = {'Company': {
'company_name':args.get('company_name'),
'abbr':args.get('company_abbr'),
'default_currency':args.get('currency')
}}
self.create_records(master_dict)
def_args = {'current_fiscal_year':curr_fiscal_year,
'default_currency': args.get('currency'),
'default_company':args.get('company_name'),
'default_valuation_method':'FIFO',
'default_stock_uom':'Nos',
'date_format':'dd-mm-yyyy',
'default_currency_format':'Lacs',
'so_required':'No',
'dn_required':'No',
'po_required':'No',
'pr_required':'No',
'emp_created_by':'Naming Series',
'cust_master_name':'Customer Name',
'supp_master_name':'Supplier Name',
'default_currency_format': \
(args.get('currency')=='INR') and 'Lacs' or 'Millions'
}
def_args = {
'current_fiscal_year':curr_fiscal_year,
'default_currency': args.get('currency'),
"default_fraction_currency": webnotes.conn.get_value("Currency",
args.get("currency"), "fraction"),
'default_company':args.get('company_name'),
'default_valuation_method':'FIFO',
'default_stock_uom':'Nos',
'date_format': webnotes.conn.get_value("Country",
args.get("country"), "date_format"),
'so_required':'No',
'dn_required':'No',
'po_required':'No',
'pr_required':'No',
'emp_created_by':'Naming Series',
'cust_master_name':'Customer Name',
'supp_master_name':'Supplier Name',
'default_currency_format': \
(args.get('currency')=='INR') and 'Lacs' or 'Millions'
}
# Set
self.set_defaults(def_args)
@ -185,8 +189,6 @@ class DocType:
return fy, stdt, abbr
# Create Company and Fiscal Year
# -------------------------------
def create_records(self, master_dict):
for d in master_dict.keys():
rec = Document(d)
@ -234,18 +236,12 @@ class DocType:
on duplicate key update `password`=password(%s)""",
(user_email, pwd, pwd))
self.add_roles(pr)
def add_roles(self, pr):
roles_list = ['Accounts Manager', 'Accounts User', 'Blogger', 'HR Manager', 'HR User', 'Maintenance User', 'Maintenance Manager', 'Material Manager', 'Material User', 'Material Master Manager', 'Manufacturing Manager', 'Manufacturing User', 'Projects User', 'Purchase Manager', 'Purchase User', 'Purchase Master Manager', 'Quality Manager', 'Sales Manager', 'Sales User', 'Sales Master Manager', 'Support Manager', 'Support Team', 'System Manager', 'Website Manager']
for r in roles_list:
d = addchild(pr, 'userroles', 'UserRole')
d.role = r
d.save(1)
# Add roles to Administrator profile
pr = Document('Profile','Administrator')
for r in roles_list:
d = addchild(pr,'userroles', 'UserRole')
d.role = r
d.save(1)
self.add_all_roles_to(pr.name)
def add_all_roles_to(name):
profile = webnotes.doc("Profile", name)
for role in webnotes.conn.sql("""select name from tabRole"""):
if role[0] not in ["Administrator", "Guest", "All", "Customer", "Supplier", "Partner"]:
d = profile.addchild("userroles", "UserRole")
d.role = role[0]
d.insert()

View File

@ -3,26 +3,18 @@ from __future__ import unicode_literals
import webnotes
def pre_import():
webnotes.conn.begin()
make_modules()
make_roles()
webnotes.conn.commit()
webnotes.reload_doc("utilities", "doctype", "gl_mapper")
webnotes.reload_doc("utilities", "doctype", "gl_mapper_detail")
def make_modules():
modules = [
" Home",
" System",
" Utilities",
" Website",
" Setup",
" Selling",
" Buying",
" Projects",
" Accounts",
" Stock",
" Support",
" HR",
" Manufacturing"]
" Home", " System", " Utilities", " Website", " Setup",
" Selling", " Buying", " Projects", " Accounts", " Stock",
" Support", " HR", " Manufacturing"]
for m in modules:
doc = webnotes.doc(fielddata = {
@ -34,45 +26,78 @@ def make_modules():
def make_roles():
roles = [
"Accounts Manager",
"Accounts User",
"Analytics",
"Auditor",
"Blogger",
"Customer",
"Employee",
"Expense Approver",
"HR Manager",
"HR User",
"Leave Approver",
"Maintenance Manager",
"Maintenance User",
"Manufacturing Manager",
"Manufacturing User",
"Material Manager",
"Material Master Manager",
"Material User",
"Partner",
"Projects User",
"Purchase Manager",
"Purchase Master Manager",
"Purchase User",
"Quality Manager",
"Sales Manager",
"Sales Master Manager",
"Sales User",
"Supplier",
"Support Manager",
"Support Team",
]
"Accounts Manager", "Accounts User", "Analytics", "Auditor",
"Blogger", "Customer", "Employee", "Expense Approver",
"HR Manager", "HR User", "Leave Approver", "Maintenance Manager",
"Maintenance User", "Manufacturing Manager", "Manufacturing User",
"Material Manager", "Material Master Manager", "Material User",
"Partner", "Projects User", "Purchase Manager", "Purchase Master Manager",
"Purchase User", "Quality Manager", "Sales Manager",
"Sales Master Manager", "Sales User", "Supplier", "Support Manager",
"Support Team"]
for r in roles:
doc = webnotes.doc(fielddata = {
"doctype":"Role",
"role_name": r
})
doc.insert()
def post_import():
webnotes.conn.begin()
# feature setup
import_defaults()
import_country_and_currency()
# home page
webnotes.conn.set_value('Control Panel', None, 'home_page', 'desktop')
# features
feature_setup()
# all roles to Administrator
from setup.doctype.setup_control.setup_control import add_all_roles_to
add_all_roles_to("Administrator")
webnotes.conn.commit()
def feature_setup():
"""save global defaults and features setup"""
doc = webnotes.doc("Features Setup", "Features Setup")
# store value as 1 for all these fields
flds = ['fs_item_serial_nos', 'fs_item_batch_nos', 'fs_brands', 'fs_item_barcode',
'fs_item_advanced', 'fs_packing_details', 'fs_item_group_in_details',
'fs_exports', 'fs_imports', 'fs_discounts', 'fs_purchase_discounts',
'fs_after_sales_installations', 'fs_projects', 'fs_sales_extras',
'fs_recurring_invoice', 'fs_pos', 'fs_manufacturing', 'fs_quality',
'fs_page_break', 'fs_more_info'
]
doc.fields.update(dict(zip(flds, [1]*len(flds))))
doc.save()
def import_country_and_currency():
from webnotes.country_info import get_all
data = get_all()
for name in data:
country = webnotes._dict(data[name])
webnotes.doc({
"doctype": "Country",
"country_name": name,
"date_format": country.date_format or "dd-mm-yyyy",
"time_zones": "\n".join(country.timezones or [])
}).insert()
if country.currency:
webnotes.doc({
"doctype": "Currency",
"currency_name": country.currency,
"fraction": country.currency_fraction,
"symbol": country.currency_symbol,
"fraction_units": country.currency_fraction_units
}).insert()
def import_defaults():
records = [
# item group
{'doctype': 'Item Group', 'item_group_name': 'All Item Groups', 'is_group': 'Yes', 'name': 'All Item Groups', 'parent_item_group': ''},
@ -135,6 +160,7 @@ def post_import():
{'doctype': 'Sales Person', 'name': 'All Sales Persons', 'sales_person_name': 'All Sales Persons', 'is_group': "Yes", "parent_sales_person": ""},
# UOM
{'uom_name': 'Unit', 'doctype': 'UOM', 'name': 'Unit'},
{'uom_name': 'Box', 'doctype': 'UOM', 'name': 'Box'},
{'uom_name': 'Ft', 'doctype': 'UOM', 'name': 'Ft'},
{'uom_name': 'Kg', 'doctype': 'UOM', 'name': 'Kg'},
@ -144,492 +170,8 @@ def post_import():
{'uom_name': 'Nos', 'doctype': 'UOM', 'name': 'Nos'},
{'uom_name': 'Pair', 'doctype': 'UOM', 'name': 'Pair'},
{'uom_name': 'Set', 'doctype': 'UOM', 'name': 'Set'},
{'uom_name': 'T', 'doctype': 'UOM', 'name': 'T'},
# Currency
{'currency_name': 'AED', 'doctype': 'Currency', 'name': 'AED'},
{'currency_name': 'AFN', 'doctype': 'Currency', 'name': 'AFN'},
{'currency_name': 'ALL', 'doctype': 'Currency', 'name': 'ALL'},
{'currency_name': 'AMD', 'doctype': 'Currency', 'name': 'AMD'},
{'currency_name': 'ANG', 'doctype': 'Currency', 'name': 'ANG'},
{'currency_name': 'AOA', 'doctype': 'Currency', 'name': 'AOA'},
{'currency_name': 'ARS', 'doctype': 'Currency', 'name': 'ARS'},
{'currency_name': 'AUD', 'doctype': 'Currency', 'name': 'AUD'},
{'currency_name': 'AZN', 'doctype': 'Currency', 'name': 'AZN'},
{'currency_name': 'BAM', 'doctype': 'Currency', 'name': 'BAM'},
{'currency_name': 'BBD', 'doctype': 'Currency', 'name': 'BBD'},
{'currency_name': 'BDT', 'doctype': 'Currency', 'name': 'BDT'},
{'currency_name': 'BGN', 'doctype': 'Currency', 'name': 'BGN'},
{'currency_name': 'BHD', 'doctype': 'Currency', 'name': 'BHD'},
{'currency_name': 'BIF', 'doctype': 'Currency', 'name': 'BIF'},
{'currency_name': 'BMD', 'doctype': 'Currency', 'name': 'BMD'},
{'currency_name': 'BND', 'doctype': 'Currency', 'name': 'BND'},
{'currency_name': 'BOB', 'doctype': 'Currency', 'name': 'BOB'},
{'currency_name': 'BRL', 'doctype': 'Currency', 'name': 'BRL'},
{'currency_name': 'BSD', 'doctype': 'Currency', 'name': 'BSD'},
{'currency_name': 'BTN', 'doctype': 'Currency', 'name': 'BTN'},
{'currency_name': 'BWP', 'doctype': 'Currency', 'name': 'BWP'},
{'currency_name': 'BYR', 'doctype': 'Currency', 'name': 'BYR'},
{'currency_name': 'BZD', 'doctype': 'Currency', 'name': 'BZD'},
{'currency_name': 'CAD', 'doctype': 'Currency', 'name': 'CAD'},
{'currency_name': 'CDF', 'doctype': 'Currency', 'name': 'CDF'},
{'currency_name': 'CFA', 'doctype': 'Currency', 'name': 'CFA'},
{'currency_name': 'CFP', 'doctype': 'Currency', 'name': 'CFP'},
{'currency_name': 'CHF', 'doctype': 'Currency', 'name': 'CHF'},
{'currency_name': 'CLP', 'doctype': 'Currency', 'name': 'CLP'},
{'currency_name': 'CNY', 'doctype': 'Currency', 'name': 'CNY'},
{'currency_name': 'COP', 'doctype': 'Currency', 'name': 'COP'},
{'currency_name': 'CRC', 'doctype': 'Currency', 'name': 'CRC'},
{'currency_name': 'CUC', 'doctype': 'Currency', 'name': 'CUC'},
{'currency_name': 'CZK', 'doctype': 'Currency', 'name': 'CZK'},
{'currency_name': 'DJF', 'doctype': 'Currency', 'name': 'DJF'},
{'currency_name': 'DKK', 'doctype': 'Currency', 'name': 'DKK'},
{'currency_name': 'DOP', 'doctype': 'Currency', 'name': 'DOP'},
{'currency_name': 'DZD', 'doctype': 'Currency', 'name': 'DZD'},
{'currency_name': 'EEK', 'doctype': 'Currency', 'name': 'EEK'},
{'currency_name': 'EGP', 'doctype': 'Currency', 'name': 'EGP'},
{'currency_name': 'ERN', 'doctype': 'Currency', 'name': 'ERN'},
{'currency_name': 'ETB', 'doctype': 'Currency', 'name': 'ETB'},
{'currency_name': 'EUR', 'doctype': 'Currency', 'name': 'EUR'},
{'currency_name': 'FJD', 'doctype': 'Currency', 'name': 'FJD'},
{'currency_name': 'FKP', 'doctype': 'Currency', 'name': 'FKP'},
{'currency_name': 'FMG', 'doctype': 'Currency', 'name': 'FMG'},
{'currency_name': 'GBP', 'doctype': 'Currency', 'name': 'GBP'},
{'currency_name': 'GEL', 'doctype': 'Currency', 'name': 'GEL'},
{'currency_name': 'GHS', 'doctype': 'Currency', 'name': 'GHS'},
{'currency_name': 'GIP', 'doctype': 'Currency', 'name': 'GIP'},
{'currency_name': 'GMD', 'doctype': 'Currency', 'name': 'GMD'},
{'currency_name': 'GNF', 'doctype': 'Currency', 'name': 'GNF'},
{'currency_name': 'GQE', 'doctype': 'Currency', 'name': 'GQE'},
{'currency_name': 'GTQ', 'doctype': 'Currency', 'name': 'GTQ'},
{'currency_name': 'GYD', 'doctype': 'Currency', 'name': 'GYD'},
{'currency_name': 'HKD', 'doctype': 'Currency', 'name': 'HKD'},
{'currency_name': 'HNL', 'doctype': 'Currency', 'name': 'HNL'},
{'currency_name': 'HRK', 'doctype': 'Currency', 'name': 'HRK'},
{'currency_name': 'HTG', 'doctype': 'Currency', 'name': 'HTG'},
{'currency_name': 'HUF', 'doctype': 'Currency', 'name': 'HUF'},
{'currency_name': 'IDR', 'doctype': 'Currency', 'name': 'IDR'},
{'currency_name': 'ILS', 'doctype': 'Currency', 'name': 'ILS'},
{'currency_name': 'INR', 'doctype': 'Currency', 'name': 'INR'},
{'currency_name': 'IQD', 'doctype': 'Currency', 'name': 'IQD'},
{'currency_name': 'IRR', 'doctype': 'Currency', 'name': 'IRR'},
{'currency_name': 'ISK', 'doctype': 'Currency', 'name': 'ISK'},
{'currency_name': 'JMD', 'doctype': 'Currency', 'name': 'JMD'},
{'currency_name': 'JOD', 'doctype': 'Currency', 'name': 'JOD'},
{'currency_name': 'JPY', 'doctype': 'Currency', 'name': 'JPY'},
{'currency_name': 'KES', 'doctype': 'Currency', 'name': 'KES'},
{'currency_name': 'KGS', 'doctype': 'Currency', 'name': 'KGS'},
{'currency_name': 'KHR', 'doctype': 'Currency', 'name': 'KHR'},
{'currency_name': 'KMF', 'doctype': 'Currency', 'name': 'KMF'},
{'currency_name': 'KPW', 'doctype': 'Currency', 'name': 'KPW'},
{'currency_name': 'KRW', 'doctype': 'Currency', 'name': 'KRW'},
{'currency_name': 'KWD', 'doctype': 'Currency', 'name': 'KWD'},
{'currency_name': 'KYD', 'doctype': 'Currency', 'name': 'KYD'},
{'currency_name': 'KZT', 'doctype': 'Currency', 'name': 'KZT'},
{'currency_name': 'LAK', 'doctype': 'Currency', 'name': 'LAK'},
{'currency_name': 'LBP', 'doctype': 'Currency', 'name': 'LBP'},
{'currency_name': 'LKR', 'doctype': 'Currency', 'name': 'LKR'},
{'currency_name': 'LRD', 'doctype': 'Currency', 'name': 'LRD'},
{'currency_name': 'LSL', 'doctype': 'Currency', 'name': 'LSL'},
{'currency_name': 'LTL', 'doctype': 'Currency', 'name': 'LTL'},
{'currency_name': 'LVL', 'doctype': 'Currency', 'name': 'LVL'},
{'currency_name': 'LYD', 'doctype': 'Currency', 'name': 'LYD'},
{'currency_name': 'MAD', 'doctype': 'Currency', 'name': 'MAD'},
{'currency_name': 'MDL', 'doctype': 'Currency', 'name': 'MDL'},
{'currency_name': 'MGA', 'doctype': 'Currency', 'name': 'MGA'},
{'currency_name': 'MKD', 'doctype': 'Currency', 'name': 'MKD'},
{'currency_name': 'MMK', 'doctype': 'Currency', 'name': 'MMK'},
{'currency_name': 'MNT', 'doctype': 'Currency', 'name': 'MNT'},
{'currency_name': 'MOP', 'doctype': 'Currency', 'name': 'MOP'},
{'currency_name': 'MRO', 'doctype': 'Currency', 'name': 'MRO'},
{'currency_name': 'MUR', 'doctype': 'Currency', 'name': 'MUR'},
{'currency_name': 'MVR', 'doctype': 'Currency', 'name': 'MVR'},
{'currency_name': 'MWK', 'doctype': 'Currency', 'name': 'MWK'},
{'currency_name': 'MXN', 'doctype': 'Currency', 'name': 'MXN'},
{'currency_name': 'MYR', 'doctype': 'Currency', 'name': 'MYR'},
{'currency_name': 'MZM', 'doctype': 'Currency', 'name': 'MZM'},
{'currency_name': 'NAD', 'doctype': 'Currency', 'name': 'NAD'},
{'currency_name': 'NGN', 'doctype': 'Currency', 'name': 'NGN'},
{'currency_name': 'NIO', 'doctype': 'Currency', 'name': 'NIO'},
{'currency_name': 'NOK', 'doctype': 'Currency', 'name': 'NOK'},
{'currency_name': 'NPR', 'doctype': 'Currency', 'name': 'NPR'},
{'currency_name': 'NRs', 'doctype': 'Currency', 'name': 'NRs'},
{'currency_name': 'NZD', 'doctype': 'Currency', 'name': 'NZD'},
{'currency_name': 'OMR', 'doctype': 'Currency', 'name': 'OMR'},
{'currency_name': 'PAB', 'doctype': 'Currency', 'name': 'PAB'},
{'currency_name': 'PEN', 'doctype': 'Currency', 'name': 'PEN'},
{'currency_name': 'PGK', 'doctype': 'Currency', 'name': 'PGK'},
{'currency_name': 'PHP', 'doctype': 'Currency', 'name': 'PHP'},
{'currency_name': 'PKR', 'doctype': 'Currency', 'name': 'PKR'},
{'currency_name': 'PLN', 'doctype': 'Currency', 'name': 'PLN'},
{'currency_name': 'PYG', 'doctype': 'Currency', 'name': 'PYG'},
{'currency_name': 'QAR', 'doctype': 'Currency', 'name': 'QAR'},
{'currency_name': 'RMB', 'doctype': 'Currency', 'name': 'RMB'},
{'currency_name': 'RON', 'doctype': 'Currency', 'name': 'RON'},
{'currency_name': 'RSD', 'doctype': 'Currency', 'name': 'RSD'},
{'currency_name': 'RUB', 'doctype': 'Currency', 'name': 'RUB'},
{'currency_name': 'RWF', 'doctype': 'Currency', 'name': 'RWF'},
{'currency_name': 'SAR', 'doctype': 'Currency', 'name': 'SAR'},
{'currency_name': 'SCR', 'doctype': 'Currency', 'name': 'SCR'},
{'currency_name': 'SDG', 'doctype': 'Currency', 'name': 'SDG'},
{'currency_name': 'SDR', 'doctype': 'Currency', 'name': 'SDR'},
{'currency_name': 'SEK', 'doctype': 'Currency', 'name': 'SEK'},
{'currency_name': 'SGD', 'doctype': 'Currency', 'name': 'SGD'},
{'currency_name': 'SHP', 'doctype': 'Currency', 'name': 'SHP'},
{'currency_name': 'SOS', 'doctype': 'Currency', 'name': 'SOS'},
{'currency_name': 'SRD', 'doctype': 'Currency', 'name': 'SRD'},
{'currency_name': 'STD', 'doctype': 'Currency', 'name': 'STD'},
{'currency_name': 'SYP', 'doctype': 'Currency', 'name': 'SYP'},
{'currency_name': 'SZL', 'doctype': 'Currency', 'name': 'SZL'},
{'currency_name': 'THB', 'doctype': 'Currency', 'name': 'THB'},
{'currency_name': 'TJS', 'doctype': 'Currency', 'name': 'TJS'},
{'currency_name': 'TMT', 'doctype': 'Currency', 'name': 'TMT'},
{'currency_name': 'TND', 'doctype': 'Currency', 'name': 'TND'},
{'currency_name': 'TRY', 'doctype': 'Currency', 'name': 'TRY'},
{'currency_name': 'TTD', 'doctype': 'Currency', 'name': 'TTD'},
{'currency_name': 'TWD', 'doctype': 'Currency', 'name': 'TWD'},
{'currency_name': 'TZS', 'doctype': 'Currency', 'name': 'TZS'},
{'currency_name': 'UAE', 'doctype': 'Currency', 'name': 'UAE'},
{'currency_name': 'UAH', 'doctype': 'Currency', 'name': 'UAH'},
{'currency_name': 'UGX', 'doctype': 'Currency', 'name': 'UGX'},
{'currency_name': 'USD', 'doctype': 'Currency', 'name': 'USD'},
{'currency_name': 'UY', 'doctype': 'Currency', 'name': 'UY'},
{'currency_name': 'UZS', 'doctype': 'Currency', 'name': 'UZS'},
{'currency_name': 'VEB', 'doctype': 'Currency', 'name': 'VEB'},
{'currency_name': 'VND', 'doctype': 'Currency', 'name': 'VND'},
{'currency_name': 'VUV', 'doctype': 'Currency', 'name': 'VUV'},
{'currency_name': 'WST', 'doctype': 'Currency', 'name': 'WST'},
{'currency_name': 'XAF', 'doctype': 'Currency', 'name': 'XAF'},
{'currency_name': 'XCD', 'doctype': 'Currency', 'name': 'XCD'},
{'currency_name': 'XDR', 'doctype': 'Currency', 'name': 'XDR'},
{'currency_name': 'XOF', 'doctype': 'Currency', 'name': 'XOF'},
{'currency_name': 'XPF', 'doctype': 'Currency', 'name': 'XPF'},
{'currency_name': 'YEN', 'doctype': 'Currency', 'name': 'YEN'},
{'currency_name': 'YER', 'doctype': 'Currency', 'name': 'YER'},
{'currency_name': 'YTL', 'doctype': 'Currency', 'name': 'YTL'},
{'currency_name': 'ZAR', 'doctype': 'Currency', 'name': 'ZAR'},
{'currency_name': 'ZMK', 'doctype': 'Currency', 'name': 'ZMK'},
{'currency_name': 'ZWR', 'doctype': 'Currency', 'name': 'ZWR'},
# Country
{'country_name': 'Afghanistan', 'doctype': 'Country', 'name': 'Afghanistan'},
{'country_name': 'Albania', 'doctype': 'Country', 'name': 'Albania'},
{'country_name': 'Algeria', 'doctype': 'Country', 'name': 'Algeria'},
{'country_name': 'Andorra', 'doctype': 'Country', 'name': 'Andorra'},
{'country_name': 'Angola', 'doctype': 'Country', 'name': 'Angola'},
{'country_name': 'Antarctica', 'doctype': 'Country', 'name': 'Antarctica'},
{'country_name': 'Antigua and Barbuda', 'doctype': 'Country', 'name': 'Antigua and Barbuda'},
{'country_name': 'Argentina', 'doctype': 'Country', 'name': 'Argentina'},
{'country_name': 'Armenia', 'doctype': 'Country', 'name': 'Armenia'},
{'country_name': 'Australia', 'doctype': 'Country', 'name': 'Australia'},
{'country_name': 'Austria', 'doctype': 'Country', 'name': 'Austria'},
{'country_name': 'Azerbaijan', 'doctype': 'Country', 'name': 'Azerbaijan'},
{'country_name': 'Bahamas', 'doctype': 'Country', 'name': 'Bahamas'},
{'country_name': 'Bahrain', 'doctype': 'Country', 'name': 'Bahrain'},
{'country_name': 'Bangladesh', 'doctype': 'Country', 'name': 'Bangladesh'},
{'country_name': 'Barbados', 'doctype': 'Country', 'name': 'Barbados'},
{'country_name': 'Belarus', 'doctype': 'Country', 'name': 'Belarus'},
{'country_name': 'Belgium', 'doctype': 'Country', 'name': 'Belgium'},
{'country_name': 'Belize', 'doctype': 'Country', 'name': 'Belize'},
{'country_name': 'Benin', 'doctype': 'Country', 'name': 'Benin'},
{'country_name': 'Bermuda', 'doctype': 'Country', 'name': 'Bermuda'},
{'country_name': 'Bhutan', 'doctype': 'Country', 'name': 'Bhutan'},
{'country_name': 'Bolivia', 'doctype': 'Country', 'name': 'Bolivia'},
{'country_name': 'Bosnia and Herzegovina', 'doctype': 'Country', 'name': 'Bosnia and Herzegovina'},
{'country_name': 'Botswana', 'doctype': 'Country', 'name': 'Botswana'},
{'country_name': 'Brazil', 'doctype': 'Country', 'name': 'Brazil'},
{'country_name': 'Brunei', 'doctype': 'Country', 'name': 'Brunei'},
{'country_name': 'Bulgaria', 'doctype': 'Country', 'name': 'Bulgaria'},
{'country_name': 'Burkina Faso', 'doctype': 'Country', 'name': 'Burkina Faso'},
{'country_name': 'Burma', 'doctype': 'Country', 'name': 'Burma'},
{'country_name': 'Burundi', 'doctype': 'Country', 'name': 'Burundi'},
{'country_name': 'Cambodia', 'doctype': 'Country', 'name': 'Cambodia'},
{'country_name': 'Cameroon', 'doctype': 'Country', 'name': 'Cameroon'},
{'country_name': 'Canada', 'doctype': 'Country', 'name': 'Canada'},
{'country_name': 'Cape Verde', 'doctype': 'Country', 'name': 'Cape Verde'},
{'country_name': 'Central African Republic', 'doctype': 'Country', 'name': 'Central African Republic'},
{'country_name': 'Chad', 'doctype': 'Country', 'name': 'Chad'},
{'country_name': 'Chile', 'doctype': 'Country', 'name': 'Chile'},
{'country_name': 'China', 'doctype': 'Country', 'name': 'China'},
{'country_name': 'Colombia', 'doctype': 'Country', 'name': 'Colombia'},
{'country_name': 'Comoros', 'doctype': 'Country', 'name': 'Comoros'},
{'country_name': 'Congo, Democratic Republic', 'doctype': 'Country', 'name': 'Congo, Democratic Republic'},
{'country_name': 'Congo, Republic of the', 'doctype': 'Country', 'name': 'Congo, Republic of the'},
{'country_name': 'Costa Rica', 'doctype': 'Country', 'name': 'Costa Rica'},
{'country_name': 'Cote dIvoire', 'doctype': 'Country', 'name': 'Cote dIvoire'},
{'country_name': 'Croatia', 'doctype': 'Country', 'name': 'Croatia'},
{'country_name': 'Cuba', 'doctype': 'Country', 'name': 'Cuba'},
{'country_name': 'Cyprus', 'doctype': 'Country', 'name': 'Cyprus'},
{'country_name': 'Czech Republic', 'doctype': 'Country', 'name': 'Czech Republic'},
{'country_name': 'Denmark', 'doctype': 'Country', 'name': 'Denmark'},
{'country_name': 'Djibouti', 'doctype': 'Country', 'name': 'Djibouti'},
{'country_name': 'Dominica', 'doctype': 'Country', 'name': 'Dominica'},
{'country_name': 'Dominican Republic', 'doctype': 'Country', 'name': 'Dominican Republic'},
{'country_name': 'East Timor', 'doctype': 'Country', 'name': 'East Timor'},
{'country_name': 'Ecuador', 'doctype': 'Country', 'name': 'Ecuador'},
{'country_name': 'Egypt', 'doctype': 'Country', 'name': 'Egypt'},
{'country_name': 'El Salvador', 'doctype': 'Country', 'name': 'El Salvador'},
{'country_name': 'Equatorial Guinea', 'doctype': 'Country', 'name': 'Equatorial Guinea'},
{'country_name': 'Eritrea', 'doctype': 'Country', 'name': 'Eritrea'},
{'country_name': 'Estonia', 'doctype': 'Country', 'name': 'Estonia'},
{'country_name': 'Ethiopia', 'doctype': 'Country', 'name': 'Ethiopia'},
{'country_name': 'Fiji', 'doctype': 'Country', 'name': 'Fiji'},
{'country_name': 'Finland', 'doctype': 'Country', 'name': 'Finland'},
{'country_name': 'France', 'doctype': 'Country', 'name': 'France'},
{'country_name': 'Gabon', 'doctype': 'Country', 'name': 'Gabon'},
{'country_name': 'Gambia', 'doctype': 'Country', 'name': 'Gambia'},
{'country_name': 'Georgia', 'doctype': 'Country', 'name': 'Georgia'},
{'country_name': 'Germany', 'doctype': 'Country', 'name': 'Germany'},
{'country_name': 'Ghana', 'doctype': 'Country', 'name': 'Ghana'},
{'country_name': 'Greece', 'doctype': 'Country', 'name': 'Greece'},
{'country_name': 'Greenland', 'doctype': 'Country', 'name': 'Greenland'},
{'country_name': 'Grenada', 'doctype': 'Country', 'name': 'Grenada'},
{'country_name': 'Guatemala', 'doctype': 'Country', 'name': 'Guatemala'},
{'country_name': 'Guinea', 'doctype': 'Country', 'name': 'Guinea'},
{'country_name': 'Guinea-Bissa', 'doctype': 'Country', 'name': 'Guinea-Bissa'},
{'country_name': 'Guyana', 'doctype': 'Country', 'name': 'Guyana'},
{'country_name': 'Haiti', 'doctype': 'Country', 'name': 'Haiti'},
{'country_name': 'Honduras', 'doctype': 'Country', 'name': 'Honduras'},
{'country_name': 'Hong Kong', 'doctype': 'Country', 'name': 'Hong Kong'},
{'country_name': 'Hungary', 'doctype': 'Country', 'name': 'Hungary'},
{'country_name': 'Iceland', 'doctype': 'Country', 'name': 'Iceland'},
{'country_name': 'India', 'doctype': 'Country', 'name': 'India'},
{'country_name': 'Indonesia', 'doctype': 'Country', 'name': 'Indonesia'},
{'country_name': 'Iran', 'doctype': 'Country', 'name': 'Iran'},
{'country_name': 'Iraq', 'doctype': 'Country', 'name': 'Iraq'},
{'country_name': 'Ireland', 'doctype': 'Country', 'name': 'Ireland'},
{'country_name': 'Israel', 'doctype': 'Country', 'name': 'Israel'},
{'country_name': 'Italy', 'doctype': 'Country', 'name': 'Italy'},
{'country_name': 'Jamaica', 'doctype': 'Country', 'name': 'Jamaica'},
{'country_name': 'Japan', 'doctype': 'Country', 'name': 'Japan'},
{'country_name': 'Jordan', 'doctype': 'Country', 'name': 'Jordan'},
{'country_name': 'Kazakhstan', 'doctype': 'Country', 'name': 'Kazakhstan'},
{'country_name': 'Kenya', 'doctype': 'Country', 'name': 'Kenya'},
{'country_name': 'Kiribati', 'doctype': 'Country', 'name': 'Kiribati'},
{'country_name': 'Korea, North', 'doctype': 'Country', 'name': 'Korea, North'},
{'country_name': 'Korea, South', 'doctype': 'Country', 'name': 'Korea, South'},
{'country_name': 'Kuwait', 'doctype': 'Country', 'name': 'Kuwait'},
{'country_name': 'Kyrgyzstan', 'doctype': 'Country', 'name': 'Kyrgyzstan'},
{'country_name': 'Laos', 'doctype': 'Country', 'name': 'Laos'},
{'country_name': 'Latvia', 'doctype': 'Country', 'name': 'Latvia'},
{'country_name': 'Lebanon', 'doctype': 'Country', 'name': 'Lebanon'},
{'country_name': 'Lesotho', 'doctype': 'Country', 'name': 'Lesotho'},
{'country_name': 'Liberia', 'doctype': 'Country', 'name': 'Liberia'},
{'country_name': 'Libya', 'doctype': 'Country', 'name': 'Libya'},
{'country_name': 'Liechtenstein', 'doctype': 'Country', 'name': 'Liechtenstein'},
{'country_name': 'Lithuania', 'doctype': 'Country', 'name': 'Lithuania'},
{'country_name': 'Luxembourg', 'doctype': 'Country', 'name': 'Luxembourg'},
{'country_name': 'Macedonia', 'doctype': 'Country', 'name': 'Macedonia'},
{'country_name': 'Madagascar', 'doctype': 'Country', 'name': 'Madagascar'},
{'country_name': 'Malawi', 'doctype': 'Country', 'name': 'Malawi'},
{'country_name': 'Malaysia', 'doctype': 'Country', 'name': 'Malaysia'},
{'country_name': 'Maldives', 'doctype': 'Country', 'name': 'Maldives'},
{'country_name': 'Mali', 'doctype': 'Country', 'name': 'Mali'},
{'country_name': 'Malta', 'doctype': 'Country', 'name': 'Malta'},
{'country_name': 'Marshall Islands', 'doctype': 'Country', 'name': 'Marshall Islands'},
{'country_name': 'Mauritania', 'doctype': 'Country', 'name': 'Mauritania'},
{'country_name': 'Mauritius', 'doctype': 'Country', 'name': 'Mauritius'},
{'country_name': 'Mexico', 'doctype': 'Country', 'name': 'Mexico'},
{'country_name': 'Micronesia', 'doctype': 'Country', 'name': 'Micronesia'},
{'country_name': 'Moldova', 'doctype': 'Country', 'name': 'Moldova'},
{'country_name': 'Monaco', 'doctype': 'Country', 'name': 'Monaco'},
{'country_name': 'Mongolia', 'doctype': 'Country', 'name': 'Mongolia'},
{'country_name': 'Morocco', 'doctype': 'Country', 'name': 'Morocco'},
{'country_name': 'Mozambique', 'doctype': 'Country', 'name': 'Mozambique'},
{'country_name': 'Namibia', 'doctype': 'Country', 'name': 'Namibia'},
{'country_name': 'Naur', 'doctype': 'Country', 'name': 'Naur'},
{'country_name': 'Nepal', 'doctype': 'Country', 'name': 'Nepal'},
{'country_name': 'Netherlands', 'doctype': 'Country', 'name': 'Netherlands'},
{'country_name': 'New Zealand', 'doctype': 'Country', 'name': 'New Zealand'},
{'country_name': 'Nicaragua', 'doctype': 'Country', 'name': 'Nicaragua'},
{'country_name': 'Niger', 'doctype': 'Country', 'name': 'Niger'},
{'country_name': 'Nigeria', 'doctype': 'Country', 'name': 'Nigeria'},
{'country_name': 'North Korea', 'doctype': 'Country', 'name': 'North Korea'},
{'country_name': 'Norway', 'doctype': 'Country', 'name': 'Norway'},
{'country_name': 'Oman', 'doctype': 'Country', 'name': 'Oman'},
{'country_name': 'Pakistan', 'doctype': 'Country', 'name': 'Pakistan'},
{'country_name': 'Panama', 'doctype': 'Country', 'name': 'Panama'},
{'country_name': 'Papua New Guinea', 'doctype': 'Country', 'name': 'Papua New Guinea'},
{'country_name': 'Paraguay', 'doctype': 'Country', 'name': 'Paraguay'},
{'country_name': 'Per', 'doctype': 'Country', 'name': 'Per'},
{'country_name': 'Philippines', 'doctype': 'Country', 'name': 'Philippines'},
{'country_name': 'Poland', 'doctype': 'Country', 'name': 'Poland'},
{'country_name': 'Portugal', 'doctype': 'Country', 'name': 'Portugal'},
{'country_name': 'Qatar', 'doctype': 'Country', 'name': 'Qatar'},
{'country_name': 'Romania', 'doctype': 'Country', 'name': 'Romania'},
{'country_name': 'Russia', 'doctype': 'Country', 'name': 'Russia'},
{'country_name': 'Rwanda', 'doctype': 'Country', 'name': 'Rwanda'},
{'country_name': 'Samoa', 'doctype': 'Country', 'name': 'Samoa'},
{'country_name': 'San Marino', 'doctype': 'Country', 'name': 'San Marino'},
{'country_name': ' Sao Tome', 'doctype': 'Country', 'name': 'Sao Tome'},
{'country_name': 'Saudi Arabia', 'doctype': 'Country', 'name': 'Saudi Arabia'},
{'country_name': 'Senegal', 'doctype': 'Country', 'name': 'Senegal'},
{'country_name': 'Serbia and Montenegro', 'doctype': 'Country', 'name': 'Serbia and Montenegro'},
{'country_name': 'Seychelles', 'doctype': 'Country', 'name': 'Seychelles'},
{'country_name': 'Sierra Leone', 'doctype': 'Country', 'name': 'Sierra Leone'},
{'country_name': 'Singapore', 'doctype': 'Country', 'name': 'Singapore'},
{'country_name': 'Slovakia', 'doctype': 'Country', 'name': 'Slovakia'},
{'country_name': 'Slovenia', 'doctype': 'Country', 'name': 'Slovenia'},
{'country_name': 'Solomon Islands', 'doctype': 'Country', 'name': 'Solomon Islands'},
{'country_name': 'Somalia', 'doctype': 'Country', 'name': 'Somalia'},
{'country_name': 'South Africa', 'doctype': 'Country', 'name': 'South Africa'},
{'country_name': 'South Korea', 'doctype': 'Country', 'name': 'South Korea'},
{'country_name': 'Spain', 'doctype': 'Country', 'name': 'Spain'},
{'country_name': 'Sri Lanka', 'doctype': 'Country', 'name': 'Sri Lanka'},
{'country_name': 'Sudan', 'doctype': 'Country', 'name': 'Sudan'},
{'country_name': 'Suriname', 'doctype': 'Country', 'name': 'Suriname'},
{'country_name': 'Swaziland', 'doctype': 'Country', 'name': 'Swaziland'},
{'country_name': 'Sweden', 'doctype': 'Country', 'name': 'Sweden'},
{'country_name': 'Switzerland', 'doctype': 'Country', 'name': 'Switzerland'},
{'country_name': 'Syria', 'doctype': 'Country', 'name': 'Syria'},
{'country_name': 'Taiwan', 'doctype': 'Country', 'name': 'Taiwan'},
{'country_name': 'Tajikistan', 'doctype': 'Country', 'name': 'Tajikistan'},
{'country_name': 'Tanzania', 'doctype': 'Country', 'name': 'Tanzania'},
{'country_name': 'Thailand', 'doctype': 'Country', 'name': 'Thailand'},
{'country_name': 'Togo', 'doctype': 'Country', 'name': 'Togo'},
{'country_name': 'Tonga', 'doctype': 'Country', 'name': 'Tonga'},
{'country_name': 'Trinidad and Tobago', 'doctype': 'Country', 'name': 'Trinidad and Tobago'},
{'country_name': 'Tunisia', 'doctype': 'Country', 'name': 'Tunisia'},
{'country_name': 'Turkey', 'doctype': 'Country', 'name': 'Turkey'},
{'country_name': 'Turkmenistan', 'doctype': 'Country', 'name': 'Turkmenistan'},
{'country_name': 'Uganda', 'doctype': 'Country', 'name': 'Uganda'},
{'country_name': 'Ukraine', 'doctype': 'Country', 'name': 'Ukraine'},
{'country_name': 'United Arab Emirates', 'doctype': 'Country', 'name': 'United Arab Emirates'},
{'country_name': 'United Kingdom', 'doctype': 'Country', 'name': 'United Kingdom'},
{'country_name': 'United States', 'doctype': 'Country', 'name': 'United States'},
{'country_name': 'Uruguay', 'doctype': 'Country', 'name': 'Uruguay'},
{'country_name': 'Uzbekistan', 'doctype': 'Country', 'name': 'Uzbekistan'},
{'country_name': 'Vanuat', 'doctype': 'Country', 'name': 'Vanuat'},
{'country_name': 'Venezuela', 'doctype': 'Country', 'name': 'Venezuela'},
{'country_name': 'Vietnam', 'doctype': 'Country', 'name': 'Vietnam'},
{'country_name': 'Yemen', 'doctype': 'Country', 'name': 'Yemen'},
{'country_name': 'Zambia', 'doctype': 'Country', 'name': 'Zambia'},
{'country_name': 'Zimbabwe', 'doctype': 'Country', 'name': 'Zimbabwe'},
# State
{'state_name': 'Alabama', 'country': 'United States', 'doctype': 'State', 'name': 'Alabama'},
{'state_name': 'Alaska', 'country': 'United States', 'doctype': 'State', 'name': 'Alaska'},
{'state_name': 'Andaman and Nicobar Islands', 'country': 'India', 'doctype': 'State', 'name': 'Andaman and Nicobar Islands'},
{'state_name': 'Andhra Pradesh', 'country': 'India', 'doctype': 'State', 'name': 'Andhra Pradesh'},
{'state_name': 'Arizona', 'country': 'United States', 'doctype': 'State', 'name': 'Arizona'},
{'state_name': 'Arkansas', 'country': 'United States', 'doctype': 'State', 'name': 'Arkansas'},
{'state_name': 'Arunachal Pradesh', 'country': 'India', 'doctype': 'State', 'name': 'Arunachal Pradesh'},
{'state_name': 'Assam', 'country': 'India', 'doctype': 'State', 'name': 'Assam'},
{'state_name': 'Beijing ', 'country': 'China', 'doctype': 'State', 'name': 'Beijing'},
{'state_name': 'Bihar', 'country': 'India', 'doctype': 'State', 'name': 'Bihar'},
{'state_name': 'California', 'country': 'United States', 'doctype': 'State', 'name': 'California'},
{'state_name': 'Chandigarh', 'country': 'India', 'doctype': 'State', 'name': 'Chandigarh'},
{'state_name': 'Changchun ', 'country': 'China', 'doctype': 'State', 'name': 'Changchun'},
{'state_name': 'Chengde', 'country': 'China', 'doctype': 'State', 'name': 'Chengde'},
{'state_name': 'Chengdu', 'country': 'China', 'doctype': 'State', 'name': 'Chengdu'},
{'state_name': 'Chhattisgarh', 'country': 'India', 'doctype': 'State', 'name': 'Chhattisgarh'},
{'state_name': 'Chongqing ', 'country': 'China', 'doctype': 'State', 'name': 'Chongqing'},
{'state_name': 'Colorado', 'country': 'United States', 'doctype': 'State', 'name': 'Colorado'},
{'state_name': 'Connecticut', 'country': 'United States', 'doctype': 'State', 'name': 'Connecticut'},
{'state_name': 'Dadra and Nagar Haveli', 'country': 'India', 'doctype': 'State', 'name': 'Dadra and Nagar Haveli'},
{'state_name': 'Dalian', 'country': 'China', 'doctype': 'State', 'name': 'Dalian'},
{'state_name': 'Daman and Di', 'country': 'India', 'doctype': 'State', 'name': 'Daman and Di'},
{'state_name': 'Delaware', 'country': 'United States', 'doctype': 'State', 'name': 'Delaware'},
{'state_name': 'Delhi', 'country': 'India', 'doctype': 'State', 'name': 'Delhi'},
{'state_name': 'Dongguan ', 'country': 'China', 'doctype': 'State', 'name': 'Dongguan'},
{'state_name': 'Dunhuang ', 'country': 'China', 'doctype': 'State', 'name': 'Dunhuang'},
{'state_name': 'Florida', 'country': 'United States', 'doctype': 'State', 'name': 'Florida'},
{'state_name': 'Georgia', 'country': 'United States', 'doctype': 'State', 'name': 'Georgia'},
{'state_name': 'Goa', 'country': 'India', 'doctype': 'State', 'name': 'Goa'},
{'state_name': 'Guangzho', 'country': 'China', 'doctype': 'State', 'name': 'Guangzho'},
{'state_name': 'Guilin ', 'country': 'China', 'doctype': 'State', 'name': 'Guilin'},
{'state_name': 'Gujarat', 'country': 'India', 'doctype': 'State', 'name': 'Gujarat'},
{'state_name': 'Hangzhou', 'country': 'China', 'doctype': 'State', 'name': 'Hangzhou'},
{'state_name': 'Harbin', 'country': 'China', 'doctype': 'State', 'name': 'Harbin'},
{'state_name': 'Haryana', 'country': 'India', 'doctype': 'State', 'name': 'Haryana'},
{'state_name': 'Hawaii', 'country': 'United States', 'doctype': 'State', 'name': 'Hawaii'},
{'state_name': 'Hefei ', 'country': 'China', 'doctype': 'State', 'name': 'Hefei'},
{'state_name': 'Himachal Pradesh', 'country': 'India', 'doctype': 'State', 'name': 'Himachal Pradesh'},
{'state_name': 'Idaho', 'country': 'United States', 'doctype': 'State', 'name': 'Idaho'},
{'state_name': 'Illinois', 'country': 'United States', 'doctype': 'State', 'name': 'Illinois'},
{'state_name': 'Indiana', 'country': 'United States', 'doctype': 'State', 'name': 'Indiana'},
{'state_name': 'Iowa', 'country': 'United States', 'doctype': 'State', 'name': 'Iowa'},
{'state_name': 'Jammu and Kashmir', 'country': 'India', 'doctype': 'State', 'name': 'Jammu and Kashmir'},
{'state_name': 'Jharkhand', 'country': 'India', 'doctype': 'State', 'name': 'Jharkhand'},
{'state_name': 'Jinan ', 'country': 'China', 'doctype': 'State', 'name': 'Jinan'},
{'state_name': 'Kansas', 'country': 'United States', 'doctype': 'State', 'name': 'Kansas'},
{'state_name': 'Karnataka', 'country': 'India', 'doctype': 'State', 'name': 'Karnataka'},
{'state_name': 'Kashi', 'country': 'China', 'doctype': 'State', 'name': 'Kashi'},
{'state_name': 'Kentucky', 'country': 'United States', 'doctype': 'State', 'name': 'Kentucky'},
{'state_name': 'Kerala', 'country': 'India', 'doctype': 'State', 'name': 'Kerala'},
{'state_name': 'Kowloon ', 'country': 'China', 'doctype': 'State', 'name': 'Kowloon'},
{'state_name': 'Kunming ', 'country': 'China', 'doctype': 'State', 'name': 'Kunming'},
{'state_name': 'Lakshadweep', 'country': 'India', 'doctype': 'State', 'name': 'Lakshadweep'},
{'state_name': 'Lanzho', 'country': 'China', 'doctype': 'State', 'name': 'Lanzho'},
{'state_name': 'Lijiang City ', 'country': 'China', 'doctype': 'State', 'name': 'Lijiang City'},
{'state_name': 'Louisiana', 'country': 'United States', 'doctype': 'State', 'name': 'Louisiana'},
{'state_name': 'Madhya Pradesh', 'country': 'India', 'doctype': 'State', 'name': 'Madhya Pradesh'},
{'state_name': 'Maharashtra', 'country': 'India', 'doctype': 'State', 'name': 'Maharashtra'},
{'state_name': 'Maine', 'country': 'United States', 'doctype': 'State', 'name': 'Maine'},
{'state_name': 'Manipur', 'country': 'India', 'doctype': 'State', 'name': 'Manipur'},
{'state_name': 'Maryland', 'country': 'United States', 'doctype': 'State', 'name': 'Maryland'},
{'state_name': 'Massachusetts', 'country': 'United States', 'doctype': 'State', 'name': 'Massachusetts'},
{'state_name': 'Meghalaya', 'country': 'India', 'doctype': 'State', 'name': 'Meghalaya'},
{'state_name': 'Michigan', 'country': 'United States', 'doctype': 'State', 'name': 'Michigan'},
{'state_name': 'Minnesota', 'country': 'United States', 'doctype': 'State', 'name': 'Minnesota'},
{'state_name': 'Mississippi', 'country': 'United States', 'doctype': 'State', 'name': 'Mississippi'},
{'state_name': 'Missouri', 'country': 'United States', 'doctype': 'State', 'name': 'Missouri'},
{'state_name': 'Mizoram', 'country': 'India', 'doctype': 'State', 'name': 'Mizoram'},
{'state_name': 'Montana', 'country': 'United States', 'doctype': 'State', 'name': 'Montana'},
{'state_name': 'Nagaland', 'country': 'India', 'doctype': 'State', 'name': 'Nagaland'},
{'state_name': 'Nanchang ', 'country': 'China', 'doctype': 'State', 'name': 'Nanchang'},
{'state_name': 'Nanjing', 'country': 'China', 'doctype': 'State', 'name': 'Nanjing'},
{'state_name': 'Nebraska', 'country': 'United States', 'doctype': 'State', 'name': 'Nebraska'},
{'state_name': 'Nevada', 'country': 'United States', 'doctype': 'State', 'name': 'Nevada'},
{'state_name': 'New Hampshire', 'country': 'United States', 'doctype': 'State', 'name': 'New Hampshire'},
{'state_name': 'New Jersey', 'country': 'United States', 'doctype': 'State', 'name': 'New Jersey'},
{'state_name': 'New Mexico', 'country': 'United States', 'doctype': 'State', 'name': 'New Mexico'},
{'state_name': 'New York', 'country': 'United States', 'doctype': 'State', 'name': 'New York'},
{'state_name': 'Ningbo ', 'country': 'China', 'doctype': 'State', 'name': 'Ningbo'},
{'state_name': 'North Carolina', 'country': 'United States', 'doctype': 'State', 'name': 'North Carolina'},
{'state_name': 'North Dakota', 'country': 'United States', 'doctype': 'State', 'name': 'North Dakota'},
{'state_name': 'Ohio', 'country': 'United States', 'doctype': 'State', 'name': 'Ohio'},
{'state_name': 'Oklahoma', 'country': 'United States', 'doctype': 'State', 'name': 'Oklahoma'},
{'state_name': 'Oregon', 'country': 'United States', 'doctype': 'State', 'name': 'Oregon'},
{'state_name': 'Orissa', 'country': 'India', 'doctype': 'State', 'name': 'Orissa'},
{'state_name': 'Pennsylvania', 'country': 'United States', 'doctype': 'State', 'name': 'Pennsylvania'},
{'state_name': 'Puducherry', 'country': 'India', 'doctype': 'State', 'name': 'Puducherry'},
{'state_name': 'Punjab', 'country': 'India', 'doctype': 'State', 'name': 'Punjab'},
{'state_name': 'Qingdao ', 'country': 'China', 'doctype': 'State', 'name': 'Qingdao'},
{'state_name': 'Quf', 'country': 'China', 'doctype': 'State', 'name': 'Quf'},
{'state_name': 'Rajasthan', 'country': 'India', 'doctype': 'State', 'name': 'Rajasthan'},
{'state_name': 'Rhode Island', 'country': 'United States', 'doctype': 'State', 'name': 'Rhode Island'},
{'state_name': 'Sanya ', 'country': 'China', 'doctype': 'State', 'name': 'Sanya'},
{'state_name': 'Shanghai ', 'country': 'China', 'doctype': 'State', 'name': 'Shanghai'},
{'state_name': 'Shenyang', 'country': 'China', 'doctype': 'State', 'name': 'Shenyang'},
{'state_name': 'Shenzhen', 'country': 'China', 'doctype': 'State', 'name': 'Shenzhen'},
{'state_name': 'Sikkim', 'country': 'India', 'doctype': 'State', 'name': 'Sikkim'},
{'state_name': 'South Carolina', 'country': 'United States', 'doctype': 'State', 'name': 'South Carolina'},
{'state_name': 'South Dakota', 'country': 'United States', 'doctype': 'State', 'name': 'South Dakota'},
{'state_name': 'Suzho', 'country': 'China', 'doctype': 'State', 'name': 'Suzho'},
{'state_name': 'Tamil Nad', 'country': 'India', 'doctype': 'State', 'name': 'Tamil Nad'},
{'state_name': 'Tennessee', 'country': 'United States', 'doctype': 'State', 'name': 'Tennessee'},
{'state_name': 'Texas', 'country': 'United States', 'doctype': 'State', 'name': 'Texas'},
{'state_name': 'Tianjin', 'country': 'China', 'doctype': 'State', 'name': 'Tianjin'},
{'state_name': 'Tripura', 'country': 'India', 'doctype': 'State', 'name': 'Tripura'},
{'state_name': 'Turpan', 'country': 'China', 'doctype': 'State', 'name': 'Turpan'},
{'state_name': 'Urumqi', 'country': 'China', 'doctype': 'State', 'name': 'Urumqi'},
{'state_name': 'Utah', 'country': 'United States', 'doctype': 'State', 'name': 'Utah'},
{'state_name': 'Uttar Pradesh', 'country': 'India', 'doctype': 'State', 'name': 'Uttar Pradesh'},
{'state_name': 'Uttarakhand', 'country': 'India', 'doctype': 'State', 'name': 'Uttarakhand'},
{'state_name': 'Vermont', 'country': 'United States', 'doctype': 'State', 'name': 'Vermont'},
{'state_name': 'Virginia', 'country': 'United States', 'doctype': 'State', 'name': 'Virginia'},
{'state_name': 'Washington', 'country': 'United States', 'doctype': 'State', 'name': 'Washington'},
{'state_name': 'West Bengal', 'country': 'India', 'doctype': 'State', 'name': 'West Bengal'},
{'state_name': 'West Virginia', 'country': 'United States', 'doctype': 'State', 'name': 'West Virginia'},
{'state_name': 'Wisconsin', 'country': 'United States', 'doctype': 'State', 'name': 'Wisconsin'},
{'state_name': 'Wuhan', 'country': 'China', 'doctype': 'State', 'name': 'Wuhan'},
{'state_name': 'Wuxi', 'country': 'China', 'doctype': 'State', 'name': 'Wuxi'},
{'state_name': 'Wyoming', 'country': 'United States', 'doctype': 'State', 'name': 'Wyoming'},
{'state_name': 'Xiamen', 'country': 'China', 'doctype': 'State', 'name': 'Xiamen'},
{'state_name': 'Xian', 'country': 'China', 'doctype': 'State', 'name': 'Xian'},
{'state_name': 'Zhongshan ', 'country': 'China', 'doctype': 'State', 'name': 'Zhongshan'},
{'uom_name': 'Hour', 'doctype': 'UOM', 'name': 'Hour'},
{'uom_name': 'Minute', 'doctype': 'UOM', 'name': 'Minute'},
]
for r in records:

View File

@ -211,7 +211,6 @@ cur_frm.cscript.make_jv = function(doc, dr_or_cr, children) {
jv.fiscal_year = sys_defaults.fiscal_year;
jv.is_opening = 'No';
jv.posting_date = doc.return_date;
jv.voucher_date = dateutil.obj_to_str(new Date());
// Add children
if(children) {