From 5ce1c668b52ff2acfe20be351fb64f31a58abbc4 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 25 Jan 2013 12:06:57 +0530 Subject: [PATCH] removed default_currency_fraction and default_currency_format from global defaults --- .../global_defaults/global_defaults.py | 2 -- .../global_defaults/global_defaults.txt | 35 +++++++------------ setup/doctype/setup_control/setup_control.py | 6 +--- utilities/cleanup_data.py | 2 -- 4 files changed, 13 insertions(+), 32 deletions(-) diff --git a/setup/doctype/global_defaults/global_defaults.py b/setup/doctype/global_defaults/global_defaults.py index 94dbf0ba78..42abf99300 100644 --- a/setup/doctype/global_defaults/global_defaults.py +++ b/setup/doctype/global_defaults/global_defaults.py @@ -32,12 +32,10 @@ keydict = { 'supp_master_name': 'supp_master_name', 'territory': 'default_territory', 'stock_uom': 'default_stock_uom', - 'fraction_currency': 'default_currency_fraction', 'valuation_method': 'default_valuation_method', 'date_format': 'date_format', 'number_format': 'number_format', 'float_precision': 'float_precision', - 'currency_format':'default_currency_format', 'account_url':'account_url', 'allow_negative_stock' : 'allow_negative_stock', 'maintain_same_rate' : 'maintain_same_rate', diff --git a/setup/doctype/global_defaults/global_defaults.txt b/setup/doctype/global_defaults/global_defaults.txt index 59942bea5e..b8f4db0a90 100644 --- a/setup/doctype/global_defaults/global_defaults.txt +++ b/setup/doctype/global_defaults/global_defaults.txt @@ -1,8 +1,8 @@ [ { - "creation": "2013-01-10 16:34:23", + "creation": "2013-01-24 14:20:19", "docstatus": 0, - "modified": "2013-01-24 13:55:09", + "modified": "2013-01-25 11:51:16", "modified_by": "Administrator", "owner": "Administrator" }, @@ -27,6 +27,8 @@ "permlevel": 0 }, { + "amend": 0, + "cancel": 0, "create": 1, "doctype": "DocPerm", "name": "__common__", @@ -86,21 +88,6 @@ "label": "Date Format", "options": "yyyy-mm-dd\ndd-mm-yyyy\ndd/mm/yyyy\nmm/dd/yyyy\nmm-dd-yyyy" }, - { - "doctype": "DocField", - "fieldname": "number_format", - "fieldtype": "Select", - "label": "Number Format", - "options": "\n#,###.##\n#.###,##\n# ###.##\n#,##,###.##\n######" - }, - { - "description": "Precision for Float fields (quantities, discounts, percentages etc) only for display. Floats will still be calculated up to 6 decimals.", - "doctype": "DocField", - "fieldname": "float_precision", - "fieldtype": "Select", - "label": "Float Precision", - "options": "\n2\n3\n4\n5\n6" - }, { "doctype": "DocField", "fieldname": "column_break1", @@ -118,16 +105,18 @@ }, { "doctype": "DocField", - "fieldname": "default_currency_format", + "fieldname": "number_format", "fieldtype": "Select", - "label": "Default Currency Format", - "options": "Lacs\nMillions" + "label": "Number Format", + "options": "\n#,###.##\n#.###,##\n# ###.##\n#,##,###.##\n######" }, { + "description": "Precision for Float fields (quantities, discounts, percentages etc) only for display. Floats will still be calculated up to 6 decimals.", "doctype": "DocField", - "fieldname": "default_currency_fraction", - "fieldtype": "Data", - "label": "Default Currency Fraction" + "fieldname": "float_precision", + "fieldtype": "Select", + "label": "Float Precision", + "options": "\n2\n3\n4\n5\n6" }, { "doctype": "DocField", diff --git a/setup/doctype/setup_control/setup_control.py b/setup/doctype/setup_control/setup_control.py index d8227ade31..00cf1dee4a 100644 --- a/setup/doctype/setup_control/setup_control.py +++ b/setup/doctype/setup_control/setup_control.py @@ -69,8 +69,6 @@ class DocType: 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', @@ -82,9 +80,7 @@ class DocType: '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' + 'supp_master_name':'Supplier Name' } # Set diff --git a/utilities/cleanup_data.py b/utilities/cleanup_data.py index 92c41a340e..8c3b00acb9 100644 --- a/utilities/cleanup_data.py +++ b/utilities/cleanup_data.py @@ -134,8 +134,6 @@ def reset_global_defaults(): flds = { 'default_company': '', 'default_currency': '', - 'default_currency_format': 'Lacs', - 'default_currency_fraction': '', 'current_fiscal_year': '', 'date_format': 'dd-mm-yyyy', 'sms_sender_name': '',