[cleanup] deprecated search criteria, amendment_date, cancel_reason

This commit is contained in:
Anand Doshi
2013-06-11 16:23:18 +05:30
parent 618edee8b7
commit 27e6f13b5d
46 changed files with 21 additions and 595 deletions

View File

@@ -1,4 +0,0 @@
from __future__ import unicode_literals
def execute():
import webnotes
webnotes.conn.sql("delete from `tabSearch Criteria` where name = 'cash_flow_statement'")

View File

@@ -15,8 +15,6 @@ def execute():
webnotes.conn.sql("drop table if exists `tab%s`" % dt)
webnotes.conn.begin()
delete_doc("Search Criteria", "tds_return")
# Add tds entry in tax table for purchase invoice
pi_list = webnotes.conn.sql("""select name from `tabPurchase Invoice`
where ifnull(tax_code, '')!='' and ifnull(ded_amount, 0)!=0""")

View File

@@ -1,5 +0,0 @@
def execute():
import webnotes
from webnotes.modules import reload_doc
reload_doc("accounts", "search_criteria", "debtors_ledger")
reload_doc("accounts", "search_criteria", "creditors_ledger")

View File

@@ -8,8 +8,6 @@ def execute():
webnotes.rename_doc("DocType", "Purchase Request Item", "Material Request Item", force=True)
if not "tabMaterial Request" in tables:
webnotes.rename_doc("DocType", "Purchase Request", "Material Request", force=True)
webnotes.reload_doc("buying", "search_criteria", "pending_po_items_to_bill")
webnotes.reload_doc("buying", "search_criteria", "pending_po_items_to_receive")
webnotes.reload_doc("stock", "doctype", "material_request")
webnotes.reload_doc("stock", "doctype", "material_request_item")

View File

@@ -1,3 +0,0 @@
def execute():
import webnotes
webnotes.delete_doc("Search Criteria", "sales_order_pending_items")

View File

@@ -1,9 +0,0 @@
import webnotes
def execute():
for sc in ["itemwise_price_list", "itemwise_receipt_details",
"shortage_to_purchase_request", "stock_aging_report",
"stock_ledger", "stock_level", "stock_report",
"custom_test2", "custom_test3", "custom_test4",
"test_so2", "test_so3"]:
webnotes.delete_doc("Search Criteria", sc)

View File

@@ -1,4 +0,0 @@
import webnotes
def execute():
for sc in ["warranty-amc_expiry_details", "warranty-amc_summary"]:
webnotes.delete_doc("Search Criteria", sc)

View File

@@ -1,5 +0,0 @@
from __future__ import unicode_literals
def execute():
import webnotes
from webnotes.modules import reload_doc
reload_doc('accounts', 'search_criteria', 'trial_balance')

View File

@@ -6,9 +6,4 @@ def execute():
delete from `tabDocPerm`
where parent in ('Report', 'Search Criteria')""")
webnotes.conn.commit()
webnotes.reload_doc('core', 'doctype', 'search_criteria')
webnotes.reload_doc('core', 'doctype', 'report')
webnotes.conn.begin()

View File

@@ -1,5 +0,0 @@
from __future__ import unicode_literals
def execute():
import webnotes
import webnotes.modules
webnotes.modules.reload_doc('selling', 'search_criteria', 'customer_address_contact')

View File

@@ -1,7 +0,0 @@
from __future__ import unicode_literals
def execute():
import webnotes
from webnotes.modules import reload_doc
reload_doc('selling', 'search_criteria', 'itemwise_sales_details')
reload_doc('selling', 'search_criteria', 'itemwise_delivery_details')

View File

@@ -1,9 +0,0 @@
from __future__ import unicode_literals
def execute():
import webnotes
from webnotes.model import delete_doc
delete_doc("Search Criteria", "sales_order_pending_items1")
webnotes.conn.sql("update `tabSearch Criteria` set module = 'Selling' where module = 'CRM'")
from webnotes.modules import reload_doc
reload_doc('selling', 'search_criteria', 'sales_order_pending_items')

View File

@@ -1,100 +0,0 @@
from __future__ import unicode_literals
def execute():
import webnotes
rendt = {
'Receivable Voucher' : 'Sales Invoice',
'RV Detail' : 'Sales Invoice Item',
'RV Tax Detail' : 'Sales Taxes and Charges',
'Payable Voucher' : 'Purchase Invoice',
'PV Detail' : 'Purchase Invoice Item',
'Purchase Tax Detail' : 'Purchase Taxes and Charges',
'Indent' : 'Material Request',
'Indent Detail' : 'Material Request Item',
'QA Inspection Report' : 'Quality Inspection',
'Ticket' : 'Task',
'Manage Account' : 'Global Defaults',
'ToDo Item' : 'ToDo',
'Term' : 'Terms and Conditions',
'Static Parameter Detail' : 'SMS Parameter',
'SS Earning Detail' : 'Salary Slip Earning',
'SS Deduction Detail' : 'Salary Slip Deduction',
'Sales Order Detail' : 'Sales Order Item',
'Sales BOM Detail' : 'Sales BOM Item',
'Return Detail' : 'Sales and Purchase Return Item',
'Ref Rate Detail' : 'Item Price',
'Receiver Detail' : 'SMS Receiver',
'Quotation Detail' : 'Quotation Item',
'QA Specification Detail' : 'Quality Inspection Reading',
'Purchase Receipt Detail' : 'Purchase Receipt Item',
'Purchase Other Charges' : 'Purchase Taxes and Charges Master',
'PR Raw Material Detail' : 'Purchase Receipt Item Supplied',
'PP SO Detail' : 'Production Plan Sales Order',
'PP Detail' : 'Production Plan Item',
'PO Raw Material Detail' : 'Purchase Order Item Supplied',
'PO Detail' : 'Purchase Order Item',
'Packing Slip Detail' : 'Packing Slip Item',
'Other Charges' : 'Sales Taxes and Charges Master',
'Order Lost Reason' : 'Quotation Lost Reason',
'Manage Account' : 'Global Defaults',
'Maintenance Visit Detail' : 'Maintenance Visit Purpose',
'Ledger Balance Export' : 'Multi Ledger Report',
'LC PR Detail' : 'Landed Cost Purchase Receipt',
'Landed Cost Detail' : 'Landed Cost Item',
'KRA Template' : 'Appraisal Template',
'KRA Sheet' : 'Appraisal Template Goal',
'Item Specification Detail' : 'Item Quality Inspection Parameter',
'Item Maintenance Detail' : 'Maintenance Schedule Item',
'IR Payment Detail' : 'Payment to Invoice Matching Tool Detail',
'Internal Reconciliation' : 'Payment to Invoice Matching Tool',
'Installed Item Details' : 'Installation Note Item',
'Holiday List Detail' : 'Holiday',
'Follow up' : 'Communication Log',
'Flat BOM Detail' : 'BOM Explosion Item',
'Expense Voucher Detail' : 'Expense Claim Detail',
'Expense Voucher' : 'Expense Claim',
'Expense Type' : 'Expense Claim Type',
'Enquiry Detail' : 'Opportunity Item',
'Enquiry' : 'Opportunity',
'Earning Detail' : 'Salary Structure Earning',
'DocLayerField' : 'Customize Form Field',
'DocLayer' : 'Customize Form',
'Delivery Note Detail' : 'Delivery Note Item',
'Deduction Detail' : 'Salary Structure Deduction',
'Comment Widget Record' : 'Comment',
'BOM Material' : 'BOM Item',
'Bill Of Materials' : 'BOM',
'Appraisal Detail' : 'Appraisal Goal',
'Advance Allocation Detail' : 'Purchase Invoice Advance',
'Advance Adjustment Detail' : 'Sales Invoice Advance',
'Ledger Detail' : 'Multi Ledger Report Detail',
'TA Control' : 'Trend Analyzer Control',
'Sales and Purchase Return Wizard' : 'Sales and Purchase Return Tool',
'Educational Qualifications Detail' : 'Employee Education',
'Delivery Note Packing Detail' : 'Delivery Note Packing Item',
'Experience In Company Detail' : 'Employee Internal Work History',
'Professional Training Details' : 'Employee Training',
'Previous Experience Detail' : 'Employee External Work History',
}
for d in rendt:
webnotes.conn.sql("""
update
`tabSearch Criteria`
set
doc_type = replace(doc_type, %s, %s),
filters = replace(filters, %s, %s),
columns = replace(columns, %s, %s),
parent_doc_type = replace(parent_doc_type, %s, %s),
add_cond = replace(add_cond, %s, %s),
add_col = replace(add_col, %s, %s),
add_tab = replace(add_tab, %s, %s),
dis_filters = replace(dis_filters, %s, %s),
group_by = replace(group_by, %s, %s),
sort_by = replace(sort_by, %s, %s),
report_script = replace(report_script, %s, %s),
server_script = replace(server_script, %s, %s),
custom_query = replace(custom_query, %s, %s)
""", (d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d],
d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d], d, rendt[d]))

View File

@@ -1,3 +0,0 @@
def execute():
from webnotes.model import delete_doc
delete_doc("Search Criteria", "itemwise_sales_register1")

View File

@@ -1,7 +0,0 @@
import webnotes
def execute():
webnotes.delete_doc("Search Criteria", "delivery_note_itemwise_pending_to_bill")
from webnotes.modules import reload_doc
reload_doc("accounts", "report", "delivered_items_to_be_billed")

View File

@@ -1,7 +0,0 @@
import webnotes
def execute():
webnotes.conn.sql("""delete from `tabSearch Criteria`
where name ='employee_leave_balance_report1'""")
webnotes.conn.sql("""delete from `tabSearch Criteria`
where name ='employee_leave_balance_report2'""")

View File

@@ -1,8 +0,0 @@
def execute():
import webnotes
webnotes.conn.sql("""delete from `tabSearch Criteria` \
where name = 'customer_address_contact'""")
webnotes.reload_doc("core", "doctype", "docfield")
webnotes.reload_doc("core", "doctype", "report")
webnotes.reload_doc('selling', 'report', 'customer_addresses_and_contacts')

View File

@@ -1,6 +0,0 @@
from __future__ import unicode_literals
from webnotes.model import delete_doc
def execute():
# remove search criteria
delete_doc("Search Criteria", "trial_balance")

View File

@@ -38,19 +38,15 @@ patch_list = [
"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",
@@ -81,7 +77,6 @@ patch_list = [
"patches.august_2012.task_allocated_to_assigned",
"patches.august_2012.change_profile_permission",
"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",
@@ -96,20 +91,15 @@ patch_list = [
"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",
@@ -123,7 +113,6 @@ patch_list = [
"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",
@@ -138,8 +127,6 @@ patch_list = [
"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",
@@ -163,7 +150,6 @@ patch_list = [
"patches.february_2013.remove_gl_mapper",
"patches.february_2013.reload_bom_replace_tool_permission",
"patches.february_2013.payment_reconciliation_reset_values",
"patches.february_2013.remove_sales_order_pending_items",
"patches.february_2013.account_negative_balance",
"patches.february_2013.remove_account_utils_folder",
"patches.february_2013.update_company_in_leave_application",
@@ -187,14 +173,11 @@ patch_list = [
"execute:webnotes.delete_doc('DocType', 'Service Quotation Detail')",
"patches.february_2013.p06_material_request_mappers",
"execute:webnotes.delete_doc('Page', 'Query Report')",
"execute:webnotes.delete_doc('Search Criteria', 'employeewise_balance_leave_report')",
"execute:webnotes.delete_doc('Search Criteria', 'employee_leave_balance_report')",
"patches.february_2013.repost_reserved_qty",
"execute:webnotes.reload_doc('core', 'doctype', 'report') # 2013-02-25",
"execute:webnotes.conn.sql(\"update `tabReport` set report_type=if(ifnull(query, '')='', 'Report Builder', 'Query Report') where is_standard='No'\")",
"execute:webnotes.conn.sql(\"update `tabReport` set report_name=name where ifnull(report_name,'')='' and is_standard='No'\")",
"patches.february_2013.p08_todo_query_report",
"execute:webnotes.delete_doc('Search Criteria', 'gross_profit') # 2013-02-26",
'execute:webnotes.reload_doc("accounts", "Print Format", "Sales Invoice Classic") # 2013-02-26',
'execute:webnotes.reload_doc("accounts", "Print Format", "Sales Invoice Modern") # 2013-02-26',
'execute:webnotes.reload_doc("accounts", "Print Format", "Sales Invoice Spartan") # 2013-02-26',
@@ -208,7 +191,6 @@ patch_list = [
"execute:webnotes.delete_doc('DocType', 'Attendance Control Panel')",
"patches.march_2013.p02_get_global_default",
"patches.march_2013.p03_rename_blog_to_blog_post",
"execute:webnotes.reload_doc('hr', 'search_criteria', 'monthly_attendance_details')",
"patches.march_2013.p04_pos_update_stock_check",
"patches.march_2013.p05_payment_reconciliation",
"patches.march_2013.p06_remove_sales_purchase_return_tool",
@@ -234,7 +216,6 @@ patch_list = [
'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Modern") # 2013-04-02',
'execute:webnotes.reload_doc("selling", "Print Format", "Quotation Spartan") # 2013-04-02',
"patches.april_2013.p04_reverse_modules_list",
"execute:webnotes.delete_doc('Search Criteria', 'time_log_summary')",
"patches.april_2013.p04_update_role_in_pages",
"patches.april_2013.p05_update_file_data",
"patches.april_2013.p06_update_file_size",

View File

@@ -7,7 +7,4 @@ def execute():
for dt in ["Period", "Account Balance", "Multi Ledger Report",
"Multi Ledger Report Detail", "Period Control", "Reposting Tool",
"Lease Agreement", "Lease Installment"]:
delete_doc("DocType", dt)
# remove search criteria
delete_doc("Search Criteria", "Trial Balance")
delete_doc("DocType", dt)