From c297df5b16b3de9d12df1661d9a2db13723b43db Mon Sep 17 00:00:00 2001 From: nabinhait Date: Tue, 5 Jul 2011 10:54:05 +0530 Subject: [PATCH] Removed Tips Common from each js file --- accounts/doctype/cost_center/cost_center.js | 2 +- accounts/doctype/fiscal_year/fiscal_year.js | 2 +- .../mode_of_payment/mode_of_payment.js | 2 +- accounts/doctype/tds_category/tds_category.js | 2 +- .../purchase_other_charges.js | 2 +- patches/old_patches/replacecode.py | 6 ++--- production/doctype/workstation/workstation.js | 2 +- selling/doctype/campaign/campaign.js | 2 +- .../doctype/industry_type/industry_type.js | 2 +- .../authorization_rule/authorization_rule.js | 2 +- setup/doctype/brand/brand.js | 2 +- setup/doctype/country/country.js | 2 +- .../doctype/customer_group/customer_group.js | 2 +- setup/doctype/item_group/item_group.js | 2 +- .../order_lost_reason/order_lost_reason.js | 2 +- setup/doctype/period/period.js | 2 +- setup/doctype/print_heading/print_heading.js | 2 +- .../setup_wizard_control.py | 7 ++---- .../setup_wizard_control.txt | 25 ++++++++++++++++--- setup/doctype/state/state.js | 2 +- setup/doctype/supplier_type/supplier_type.js | 2 +- setup/doctype/term/term.js | 2 +- setup/doctype/territory/territory.js | 2 +- setup/doctype/uom/uom.js | 2 +- .../doctype/warehouse_type/warehouse_type.js | 2 +- setup/doctype/workflow_rule/workflow_rule.js | 2 +- setup/page/setup/setup.txt | 4 +-- .../landed_cost_master/landed_cost_master.js | 2 +- stock/doctype/sales_bom/sales_bom.js | 2 +- 29 files changed, 54 insertions(+), 38 deletions(-) diff --git a/accounts/doctype/cost_center/cost_center.js b/accounts/doctype/cost_center/cost_center.js index e3ce63fe73..e64d0d9b3b 100644 --- a/accounts/doctype/cost_center/cost_center.js +++ b/accounts/doctype/cost_center/cost_center.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //Account filtering for cost center cur_frm.fields_dict['budget_details'].grid.get_field('account').get_query = function(doc) { diff --git a/accounts/doctype/fiscal_year/fiscal_year.js b/accounts/doctype/fiscal_year/fiscal_year.js index fe1457d4d3..a0fdbec5c9 100644 --- a/accounts/doctype/fiscal_year/fiscal_year.js +++ b/accounts/doctype/fiscal_year/fiscal_year.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/accounts/doctype/mode_of_payment/mode_of_payment.js b/accounts/doctype/mode_of_payment/mode_of_payment.js index fe1457d4d3..a0fdbec5c9 100644 --- a/accounts/doctype/mode_of_payment/mode_of_payment.js +++ b/accounts/doctype/mode_of_payment/mode_of_payment.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/accounts/doctype/tds_category/tds_category.js b/accounts/doctype/tds_category/tds_category.js index fe1457d4d3..a0fdbec5c9 100644 --- a/accounts/doctype/tds_category/tds_category.js +++ b/accounts/doctype/tds_category/tds_category.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/buying/doctype/purchase_other_charges/purchase_other_charges.js b/buying/doctype/purchase_other_charges/purchase_other_charges.js index dcf00ab4b5..9981e4af3a 100644 --- a/buying/doctype/purchase_other_charges/purchase_other_charges.js +++ b/buying/doctype/purchase_other_charges/purchase_other_charges.js @@ -1,4 +1,4 @@ -//$import(Tips Common) +// //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/patches/old_patches/replacecode.py b/patches/old_patches/replacecode.py index 512d12e0e6..3d0feebc32 100644 --- a/patches/old_patches/replacecode.py +++ b/patches/old_patches/replacecode.py @@ -13,7 +13,7 @@ def replace_code(old, new): print 'Found in %s' % t if __name__=='__main__': - old = """\.button(""" - new = "" + old = """$import(Tips Common)""" + new = " " replace_code(old, new) - \ No newline at end of file + diff --git a/production/doctype/workstation/workstation.js b/production/doctype/workstation/workstation.js index fe1457d4d3..a0fdbec5c9 100644 --- a/production/doctype/workstation/workstation.js +++ b/production/doctype/workstation/workstation.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/selling/doctype/campaign/campaign.js b/selling/doctype/campaign/campaign.js index fe1457d4d3..a0fdbec5c9 100644 --- a/selling/doctype/campaign/campaign.js +++ b/selling/doctype/campaign/campaign.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/selling/doctype/industry_type/industry_type.js b/selling/doctype/industry_type/industry_type.js index fe1457d4d3..a0fdbec5c9 100644 --- a/selling/doctype/industry_type/industry_type.js +++ b/selling/doctype/industry_type/industry_type.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/setup/doctype/authorization_rule/authorization_rule.js b/setup/doctype/authorization_rule/authorization_rule.js index 27d97bcfec..c533003c6d 100644 --- a/setup/doctype/authorization_rule/authorization_rule.js +++ b/setup/doctype/authorization_rule/authorization_rule.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/setup/doctype/brand/brand.js b/setup/doctype/brand/brand.js index fe1457d4d3..a0fdbec5c9 100644 --- a/setup/doctype/brand/brand.js +++ b/setup/doctype/brand/brand.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/setup/doctype/country/country.js b/setup/doctype/country/country.js index d648a01012..70072820a7 100644 --- a/setup/doctype/country/country.js +++ b/setup/doctype/country/country.js @@ -1,6 +1,6 @@ //Tips not required /* -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/setup/doctype/customer_group/customer_group.js b/setup/doctype/customer_group/customer_group.js index 080b309154..f8cfb055d2 100644 --- a/setup/doctype/customer_group/customer_group.js +++ b/setup/doctype/customer_group/customer_group.js @@ -1,4 +1,4 @@ -$import(Tips Common) + cur_frm.cscript.onload = function(){ cur_frm.cscript.get_tips(doc, cdt, cdn); diff --git a/setup/doctype/item_group/item_group.js b/setup/doctype/item_group/item_group.js index 089ba115d5..d4b5340efc 100644 --- a/setup/doctype/item_group/item_group.js +++ b/setup/doctype/item_group/item_group.js @@ -1,4 +1,4 @@ -$import(Tips Common) + cur_frm.cscript.onload = function(){ cur_frm.cscript.get_tips(doc, cdt, cdn); diff --git a/setup/doctype/order_lost_reason/order_lost_reason.js b/setup/doctype/order_lost_reason/order_lost_reason.js index fe1457d4d3..a0fdbec5c9 100644 --- a/setup/doctype/order_lost_reason/order_lost_reason.js +++ b/setup/doctype/order_lost_reason/order_lost_reason.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/setup/doctype/period/period.js b/setup/doctype/period/period.js index fe1457d4d3..a0fdbec5c9 100644 --- a/setup/doctype/period/period.js +++ b/setup/doctype/period/period.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/setup/doctype/print_heading/print_heading.js b/setup/doctype/print_heading/print_heading.js index fe1457d4d3..a0fdbec5c9 100644 --- a/setup/doctype/print_heading/print_heading.js +++ b/setup/doctype/print_heading/print_heading.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/setup/doctype/setup_wizard_control/setup_wizard_control.py b/setup/doctype/setup_wizard_control/setup_wizard_control.py index d1e1f9e82f..10904c3f6f 100644 --- a/setup/doctype/setup_wizard_control/setup_wizard_control.py +++ b/setup/doctype/setup_wizard_control/setup_wizard_control.py @@ -4,14 +4,11 @@ import webnotes from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, generate_hash, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add from webnotes.model import db_exists from webnotes.model.doc import Document, addchild, removechild, getchildren, make_autoname, SuperDocType -from webnotes.model.doclist import getlist, copy_doclist +from webnotes.model.doclist import getlist from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax from webnotes import session, form, is_testing, msgprint, errprint -set = webnotes.conn.set sql = webnotes.conn.sql -get_value = webnotes.conn.get_value -in_transaction = webnotes.conn.in_transaction convert_to_lists = webnotes.conn.convert_to_lists # ----------------------------------------------------------------------------------------- @@ -61,4 +58,4 @@ class DocType: def get_country(self): cty = sql("select value from `tabSingles` where field = 'country' and doctype = 'Control Panel'") - return cty and cty[0][0] or '' \ No newline at end of file + return cty and cty[0][0] or '' diff --git a/setup/doctype/setup_wizard_control/setup_wizard_control.txt b/setup/doctype/setup_wizard_control/setup_wizard_control.txt index a83d94ecdf..5f432ad85b 100644 --- a/setup/doctype/setup_wizard_control/setup_wizard_control.txt +++ b/setup/doctype/setup_wizard_control/setup_wizard_control.txt @@ -5,8 +5,8 @@ { 'creation': '2010-08-08 17:09:24', 'docstatus': 0, - 'modified': '2010-09-20 14:06:57', - 'modified_by': 'sneha@webnotestech.com', + 'modified': '2011-07-04 17:10:23', + 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -20,12 +20,31 @@ 'section_style': 'Simple', 'server_code_error': ' ', 'show_in_menu': 0, - 'version': 108 + 'version': 110 + }, + + # These values are common for all DocPerm + { + 'doctype': 'DocPerm', + 'idx': 1, + 'name': '__common__', + 'parent': 'Setup Wizard Control', + 'parentfield': 'permissions', + 'parenttype': 'DocType', + 'permlevel': 0, + 'read': 1, + 'role': 'All', + 'write': 1 }, # DocType, Setup Wizard Control { 'doctype': 'DocType', 'name': 'Setup Wizard Control' + }, + + # DocPerm + { + 'doctype': 'DocPerm' } ] \ No newline at end of file diff --git a/setup/doctype/state/state.js b/setup/doctype/state/state.js index fe1457d4d3..a0fdbec5c9 100644 --- a/setup/doctype/state/state.js +++ b/setup/doctype/state/state.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/setup/doctype/supplier_type/supplier_type.js b/setup/doctype/supplier_type/supplier_type.js index c7c01af160..61d8f8fdce 100644 --- a/setup/doctype/supplier_type/supplier_type.js +++ b/setup/doctype/supplier_type/supplier_type.js @@ -1,4 +1,4 @@ -$import(Tips Common) + // ONLOAD // =================================================================================== diff --git a/setup/doctype/term/term.js b/setup/doctype/term/term.js index fe1457d4d3..a0fdbec5c9 100644 --- a/setup/doctype/term/term.js +++ b/setup/doctype/term/term.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/setup/doctype/territory/territory.js b/setup/doctype/territory/territory.js index 7692b83327..b0bc9fdd48 100644 --- a/setup/doctype/territory/territory.js +++ b/setup/doctype/territory/territory.js @@ -1,4 +1,4 @@ -$import(Tips Common) + cur_frm.cscript.refresh = function(doc, cdt, cdn) { cur_frm.cscript.get_tips(doc, cdt, cdn); diff --git a/setup/doctype/uom/uom.js b/setup/doctype/uom/uom.js index fe1457d4d3..a0fdbec5c9 100644 --- a/setup/doctype/uom/uom.js +++ b/setup/doctype/uom/uom.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/setup/doctype/warehouse_type/warehouse_type.js b/setup/doctype/warehouse_type/warehouse_type.js index fe1457d4d3..a0fdbec5c9 100644 --- a/setup/doctype/warehouse_type/warehouse_type.js +++ b/setup/doctype/warehouse_type/warehouse_type.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/setup/doctype/workflow_rule/workflow_rule.js b/setup/doctype/workflow_rule/workflow_rule.js index bed927e3b8..c58c4f4623 100644 --- a/setup/doctype/workflow_rule/workflow_rule.js +++ b/setup/doctype/workflow_rule/workflow_rule.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/setup/page/setup/setup.txt b/setup/page/setup/setup.txt index 0b9a13399f..2ecc40b329 100644 --- a/setup/page/setup/setup.txt +++ b/setup/page/setup/setup.txt @@ -5,8 +5,8 @@ { 'creation': '2010-12-16 23:46:03', 'docstatus': 0, - 'modified': '2010-12-18 13:30:38', - 'modified_by': 'yogesh@webnotestech.com', + 'modified': '2011-07-04 16:58:27', + 'modified_by': 'Administrator', 'owner': 'Administrator' }, diff --git a/stock/doctype/landed_cost_master/landed_cost_master.js b/stock/doctype/landed_cost_master/landed_cost_master.js index fe1457d4d3..a0fdbec5c9 100644 --- a/stock/doctype/landed_cost_master/landed_cost_master.js +++ b/stock/doctype/landed_cost_master/landed_cost_master.js @@ -1,4 +1,4 @@ -$import(Tips Common) + //--------- ONLOAD ------------- cur_frm.cscript.onload = function(doc, cdt, cdn) { diff --git a/stock/doctype/sales_bom/sales_bom.js b/stock/doctype/sales_bom/sales_bom.js index 058132585c..53c955edf7 100644 --- a/stock/doctype/sales_bom/sales_bom.js +++ b/stock/doctype/sales_bom/sales_bom.js @@ -1,4 +1,4 @@ -$import(Tips Common) + cur_frm.cscript.onload = function(doc, cdt, cdn) { cur_frm.cscript.get_tips(doc, cdt, cdn);