remove sql =
diff --git a/accounts/doctype/account/account.py b/accounts/doctype/account/account.py
index a6038dd..7d8bed9 100644
--- a/accounts/doctype/account/account.py
+++ b/accounts/doctype/account/account.py
@@ -7,7 +7,6 @@
from webnotes.utils import flt, fmt_money
from webnotes import msgprint, _
-sql = webnotes.conn.sql
get_value = webnotes.conn.get_value
class DocType:
diff --git a/accounts/doctype/bank_reconciliation/bank_reconciliation.py b/accounts/doctype/bank_reconciliation/bank_reconciliation.py
index 479b579..ce15e57 100644
--- a/accounts/doctype/bank_reconciliation/bank_reconciliation.py
+++ b/accounts/doctype/bank_reconciliation/bank_reconciliation.py
@@ -10,7 +10,6 @@
from webnotes.model.bean import getlist, copy_doclist
from webnotes import msgprint
-sql = webnotes.conn.sql
diff --git a/accounts/doctype/gl_entry/gl_entry.py b/accounts/doctype/gl_entry/gl_entry.py
index 9c1cf3f..aa0f11b 100644
--- a/accounts/doctype/gl_entry/gl_entry.py
+++ b/accounts/doctype/gl_entry/gl_entry.py
@@ -8,7 +8,6 @@
from webnotes.model.code import get_obj
from webnotes import msgprint, _
-sql = webnotes.conn.sql
class DocType:
def __init__(self,d,dl):
diff --git a/accounts/doctype/mis_control/mis_control.py b/accounts/doctype/mis_control/mis_control.py
index 84350dc..bb58270 100644
--- a/accounts/doctype/mis_control/mis_control.py
+++ b/accounts/doctype/mis_control/mis_control.py
@@ -11,7 +11,6 @@
import webnotes.defaults
-sql = webnotes.conn.sql
from accounts.utils import get_balance_on, get_fiscal_year
diff --git a/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/accounts/doctype/period_closing_voucher/period_closing_voucher.py
index c214a21..9df653a 100644
--- a/accounts/doctype/period_closing_voucher/period_closing_voucher.py
+++ b/accounts/doctype/period_closing_voucher/period_closing_voucher.py
@@ -11,7 +11,6 @@
from webnotes.model.code import get_obj
from webnotes import msgprint
-sql = webnotes.conn.sql
diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.py b/accounts/doctype/purchase_invoice/purchase_invoice.py
index 0538323..0c5a277 100644
--- a/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -12,7 +12,6 @@
import webnotes.defaults
-sql = webnotes.conn.sql
from controllers.buying_controller import BuyingController
class DocType(BuyingController):
diff --git a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.py b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.py
index a4534ae..0a32fb9 100644
--- a/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.py
+++ b/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxes_and_charges_master.py
@@ -8,7 +8,6 @@
from webnotes.model.bean import copy_doclist
from webnotes.model.code import get_obj
-sql = webnotes.conn.sql
diff --git a/buying/doctype/purchase_common/purchase_common.py b/buying/doctype/purchase_common/purchase_common.py
index 9b6dc6c..dfe2af5 100644
--- a/buying/doctype/purchase_common/purchase_common.py
+++ b/buying/doctype/purchase_common/purchase_common.py
@@ -10,7 +10,6 @@
from buying.utils import get_last_purchase_details
-sql = webnotes.conn.sql
from controllers.buying_controller import BuyingController
class DocType(BuyingController):
diff --git a/buying/doctype/purchase_order/purchase_order.py b/buying/doctype/purchase_order/purchase_order.py
index 3675177..951ff8b 100644
--- a/buying/doctype/purchase_order/purchase_order.py
+++ b/buying/doctype/purchase_order/purchase_order.py
@@ -9,7 +9,6 @@
from webnotes.model.code import get_obj
from webnotes import msgprint
-sql = webnotes.conn.sql
from controllers.buying_controller import BuyingController
class DocType(BuyingController):
diff --git a/buying/doctype/supplier/supplier.py b/buying/doctype/supplier/supplier.py
index 15e1d62..2c1d173 100644
--- a/buying/doctype/supplier/supplier.py
+++ b/buying/doctype/supplier/supplier.py
@@ -9,7 +9,6 @@
from webnotes import msgprint, _
from webnotes.model.doc import make_autoname
-sql = webnotes.conn.sql
from utilities.transaction_base import TransactionBase
diff --git a/home/doctype/feed/feed.py b/home/doctype/feed/feed.py
index 25abf57..ebee5c4 100644
--- a/home/doctype/feed/feed.py
+++ b/home/doctype/feed/feed.py
@@ -7,7 +7,6 @@
from webnotes.model import db_exists
from webnotes.model.bean import copy_doclist
-sql = webnotes.conn.sql
diff --git a/hr/doctype/attendance/attendance.py b/hr/doctype/attendance/attendance.py
index 7b82bc5..124d362 100644
--- a/hr/doctype/attendance/attendance.py
+++ b/hr/doctype/attendance/attendance.py
@@ -7,7 +7,6 @@
from webnotes.utils import getdate, nowdate
from webnotes import msgprint, _
-sql = webnotes.conn.sql
class DocType:
def __init__(self, doc, doclist=[]):
diff --git a/hr/doctype/employee/employee.py b/hr/doctype/employee/employee.py
index e28e02d..e8396eb 100644
--- a/hr/doctype/employee/employee.py
+++ b/hr/doctype/employee/employee.py
@@ -8,7 +8,6 @@
from webnotes.model.doc import make_autoname
from webnotes import msgprint, _
-sql = webnotes.conn.sql
class DocType:
def __init__(self,doc,doclist=[]):
diff --git a/hr/doctype/holiday_list/holiday_list.py b/hr/doctype/holiday_list/holiday_list.py
index 81d18f3..100c140 100644
--- a/hr/doctype/holiday_list/holiday_list.py
+++ b/hr/doctype/holiday_list/holiday_list.py
@@ -10,7 +10,6 @@
from webnotes.model.bean import copy_doclist
from webnotes import msgprint
-sql = webnotes.conn.sql
import datetime
diff --git a/hr/doctype/leave_allocation/leave_allocation.py b/hr/doctype/leave_allocation/leave_allocation.py
index 1c856fa..8e22690 100755
--- a/hr/doctype/leave_allocation/leave_allocation.py
+++ b/hr/doctype/leave_allocation/leave_allocation.py
@@ -5,7 +5,6 @@
import webnotes
from webnotes.utils import cint, flt
from webnotes import msgprint
-sql = webnotes.conn.sql
class DocType:
def __init__(self, doc, doclist):
diff --git a/hr/doctype/leave_control_panel/leave_control_panel.py b/hr/doctype/leave_control_panel/leave_control_panel.py
index 30b52ba..6404321 100644
--- a/hr/doctype/leave_control_panel/leave_control_panel.py
+++ b/hr/doctype/leave_control_panel/leave_control_panel.py
@@ -9,7 +9,6 @@
from webnotes.model.code import get_obj
from webnotes import msgprint
-sql = webnotes.conn.sql
diff --git a/hr/doctype/salary_manager/salary_manager.py b/hr/doctype/salary_manager/salary_manager.py
index 0eadca1..ecc829f 100644
--- a/hr/doctype/salary_manager/salary_manager.py
+++ b/hr/doctype/salary_manager/salary_manager.py
@@ -11,7 +11,6 @@
from webnotes.model.code import get_obj
from webnotes import msgprint
-sql = webnotes.conn.sql
diff --git a/hr/doctype/salary_slip/salary_slip.py b/hr/doctype/salary_slip/salary_slip.py
index 36d7ceb..7104273 100644
--- a/hr/doctype/salary_slip/salary_slip.py
+++ b/hr/doctype/salary_slip/salary_slip.py
@@ -11,7 +11,6 @@
from webnotes import msgprint, _
from setup.utils import get_company_currency
-sql = webnotes.conn.sql
from utilities.transaction_base import TransactionBase
diff --git a/hr/doctype/salary_structure/salary_structure.py b/hr/doctype/salary_structure/salary_structure.py
index 50b0160..c3cd93d 100644
--- a/hr/doctype/salary_structure/salary_structure.py
+++ b/hr/doctype/salary_structure/salary_structure.py
@@ -8,7 +8,6 @@
from webnotes.model.doc import addchild, make_autoname
from webnotes import msgprint, _
-sql = webnotes.conn.sql
class DocType:
def __init__(self,doc,doclist=[]):
diff --git a/manufacturing/doctype/bom/bom.py b/manufacturing/doctype/bom/bom.py
index 9a56612..84a3d6c 100644
--- a/manufacturing/doctype/bom/bom.py
+++ b/manufacturing/doctype/bom/bom.py
@@ -9,7 +9,6 @@
from webnotes.model.code import get_obj
from webnotes import msgprint, _
-sql = webnotes.conn.sql
class DocType:
diff --git a/manufacturing/doctype/production_order/production_order.py b/manufacturing/doctype/production_order/production_order.py
index 6a133e7..28adc65 100644
--- a/manufacturing/doctype/production_order/production_order.py
+++ b/manufacturing/doctype/production_order/production_order.py
@@ -8,7 +8,6 @@
from webnotes.model.code import get_obj
from webnotes import msgprint, _
-sql = webnotes.conn.sql
class OverProductionError(webnotes.ValidationError): pass
diff --git a/manufacturing/doctype/production_planning_tool/production_planning_tool.py b/manufacturing/doctype/production_planning_tool/production_planning_tool.py
index 766f2ac..c150be3 100644
--- a/manufacturing/doctype/production_planning_tool/production_planning_tool.py
+++ b/manufacturing/doctype/production_planning_tool/production_planning_tool.py
@@ -9,7 +9,6 @@
from webnotes.model.code import get_obj
from webnotes import msgprint, _
-sql = webnotes.conn.sql
class DocType:
def __init__(self, doc, doclist=[]):
diff --git a/manufacturing/doctype/workstation/workstation.py b/manufacturing/doctype/workstation/workstation.py
index 35e2c1f..56833a9 100644
--- a/manufacturing/doctype/workstation/workstation.py
+++ b/manufacturing/doctype/workstation/workstation.py
@@ -8,7 +8,6 @@
from webnotes.model import db_exists
from webnotes.model.bean import copy_doclist
-sql = webnotes.conn.sql
diff --git a/projects/doctype/task/task.py b/projects/doctype/task/task.py
index 6cd1ba8..856be5c 100644
--- a/projects/doctype/task/task.py
+++ b/projects/doctype/task/task.py
@@ -9,7 +9,6 @@
from webnotes.model.bean import copy_doclist
from webnotes import msgprint
-sql = webnotes.conn.sql
class DocType:
def __init__(self,doc,doclist=[]):
diff --git a/selling/doctype/customer/customer.py b/selling/doctype/customer/customer.py
index d3a263f..0c2bf61 100644
--- a/selling/doctype/customer/customer.py
+++ b/selling/doctype/customer/customer.py
@@ -9,7 +9,6 @@
from webnotes import msgprint, _
import webnotes.defaults
-sql = webnotes.conn.sql
from utilities.transaction_base import TransactionBase
diff --git a/selling/doctype/lead/lead.py b/selling/doctype/lead/lead.py
index da11410..c0ef242 100644
--- a/selling/doctype/lead/lead.py
+++ b/selling/doctype/lead/lead.py
@@ -7,7 +7,6 @@
from webnotes.utils import cstr, validate_email_add, cint, extract_email_id
from webnotes import session, msgprint
-sql = webnotes.conn.sql
from controllers.selling_controller import SellingController
diff --git a/selling/doctype/opportunity/opportunity.py b/selling/doctype/opportunity/opportunity.py
index b265356..df6861a 100644
--- a/selling/doctype/opportunity/opportunity.py
+++ b/selling/doctype/opportunity/opportunity.py
@@ -8,7 +8,6 @@
from webnotes.model.bean import getlist
from webnotes import msgprint
-sql = webnotes.conn.sql
from utilities.transaction_base import TransactionBase
diff --git a/selling/doctype/quotation/quotation.py b/selling/doctype/quotation/quotation.py
index 44a67fa..8ac0d19 100644
--- a/selling/doctype/quotation/quotation.py
+++ b/selling/doctype/quotation/quotation.py
@@ -9,7 +9,6 @@
from webnotes.model.code import get_obj
from webnotes import _, msgprint
-sql = webnotes.conn.sql
from controllers.selling_controller import SellingController
diff --git a/selling/doctype/sales_order/sales_order.py b/selling/doctype/sales_order/sales_order.py
index 3731484..5043a77 100644
--- a/selling/doctype/sales_order/sales_order.py
+++ b/selling/doctype/sales_order/sales_order.py
@@ -11,7 +11,6 @@
from webnotes import msgprint
from webnotes.model.mapper import get_mapped_doclist
-sql = webnotes.conn.sql
from controllers.selling_controller import SellingController
diff --git a/selling/doctype/sms_center/sms_center.py b/selling/doctype/sms_center/sms_center.py
index c3b5ac0..8db20b0 100644
--- a/selling/doctype/sms_center/sms_center.py
+++ b/selling/doctype/sms_center/sms_center.py
@@ -10,7 +10,6 @@
from webnotes.model.code import get_obj
from webnotes import msgprint
-sql = webnotes.conn.sql
# ----------
diff --git a/setup/doctype/authorization_control/authorization_control.py b/setup/doctype/authorization_control/authorization_control.py
index ddf0791..26f7705 100644
--- a/setup/doctype/authorization_control/authorization_control.py
+++ b/setup/doctype/authorization_control/authorization_control.py
@@ -9,7 +9,6 @@
from webnotes import session, msgprint
from setup.utils import get_company_currency
-sql = webnotes.conn.sql
from utilities.transaction_base import TransactionBase
diff --git a/setup/doctype/authorization_rule/authorization_rule.py b/setup/doctype/authorization_rule/authorization_rule.py
index 3d2de47..5192ebf 100644
--- a/setup/doctype/authorization_rule/authorization_rule.py
+++ b/setup/doctype/authorization_rule/authorization_rule.py
@@ -9,7 +9,6 @@
from webnotes.model.bean import copy_doclist
from webnotes import msgprint
-sql = webnotes.conn.sql
diff --git a/setup/doctype/company/company.py b/setup/doctype/company/company.py
index eeff2d1..bb0ee1b 100644
--- a/setup/doctype/company/company.py
+++ b/setup/doctype/company/company.py
@@ -10,7 +10,6 @@
from webnotes.model.code import get_obj
import webnotes.defaults
-sql = webnotes.conn.sql
class DocType:
def __init__(self,d,dl):
diff --git a/setup/doctype/customer_group/customer_group.py b/setup/doctype/customer_group/customer_group.py
index 0940e1f..8b68cc5 100644
--- a/setup/doctype/customer_group/customer_group.py
+++ b/setup/doctype/customer_group/customer_group.py
@@ -5,7 +5,6 @@
import webnotes
from webnotes import msgprint
-sql = webnotes.conn.sql
from webnotes.utils.nestedset import DocTypeNestedSet
class DocType(DocTypeNestedSet):
diff --git a/setup/doctype/email_settings/email_settings.py b/setup/doctype/email_settings/email_settings.py
index 219501e..aa511ee 100644
--- a/setup/doctype/email_settings/email_settings.py
+++ b/setup/doctype/email_settings/email_settings.py
@@ -3,7 +3,6 @@
from __future__ import unicode_literals
import webnotes
-sql = webnotes.conn.sql
from webnotes.utils import cint
diff --git a/setup/doctype/naming_series/naming_series.py b/setup/doctype/naming_series/naming_series.py
index 9cc4de2..6312801 100644
--- a/setup/doctype/naming_series/naming_series.py
+++ b/setup/doctype/naming_series/naming_series.py
@@ -8,7 +8,6 @@
from webnotes import msgprint
import webnotes.model.doctype
-sql = webnotes.conn.sql
class DocType:
def __init__(self, d, dl):
diff --git a/setup/doctype/notification_control/notification_control.py b/setup/doctype/notification_control/notification_control.py
index 6133d9b..2349362 100644
--- a/setup/doctype/notification_control/notification_control.py
+++ b/setup/doctype/notification_control/notification_control.py
@@ -6,7 +6,6 @@
from webnotes import msgprint
-sql = webnotes.conn.sql
class DocType:
def __init__(self,d,dl):
diff --git a/setup/doctype/print_heading/print_heading.py b/setup/doctype/print_heading/print_heading.py
index ba7114a..134aaaf 100644
--- a/setup/doctype/print_heading/print_heading.py
+++ b/setup/doctype/print_heading/print_heading.py
@@ -7,7 +7,6 @@
from webnotes.model import db_exists
from webnotes.model.bean import copy_doclist
-sql = webnotes.conn.sql
diff --git a/setup/doctype/sales_partner/sales_partner.py b/setup/doctype/sales_partner/sales_partner.py
index 0d7e12d..8915ff1 100644
--- a/setup/doctype/sales_partner/sales_partner.py
+++ b/setup/doctype/sales_partner/sales_partner.py
@@ -5,7 +5,6 @@
import webnotes
from webnotes.utils import cint, cstr, filter_strip_join
-sql = webnotes.conn.sql
class DocType:
def __init__(self, doc, doclist=None):
diff --git a/stock/doctype/bin/bin.py b/stock/doctype/bin/bin.py
index 146191f..954ef78 100644
--- a/stock/doctype/bin/bin.py
+++ b/stock/doctype/bin/bin.py
@@ -5,7 +5,6 @@
import webnotes
from webnotes.utils import add_days, cint,flt, nowdate, get_url_to_form, formatdate
from webnotes import msgprint, _
-sql = webnotes.conn.sql
import webnotes.defaults
diff --git a/stock/doctype/delivery_note/delivery_note.py b/stock/doctype/delivery_note/delivery_note.py
index 042b197..ce06ce3 100644
--- a/stock/doctype/delivery_note/delivery_note.py
+++ b/stock/doctype/delivery_note/delivery_note.py
@@ -13,7 +13,6 @@
-sql = webnotes.conn.sql
from controllers.selling_controller import SellingController
diff --git a/stock/doctype/landed_cost_wizard/landed_cost_wizard.py b/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
index 0cdad4d..5275632 100644
--- a/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
+++ b/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
@@ -9,7 +9,6 @@
from webnotes.model.code import get_obj
from webnotes import msgprint
-sql = webnotes.conn.sql
class DocType:
diff --git a/stock/doctype/purchase_receipt/purchase_receipt.py b/stock/doctype/purchase_receipt/purchase_receipt.py
index f7cfcff..084f30c 100644
--- a/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -10,7 +10,6 @@
from webnotes import msgprint
import webnotes.defaults
-sql = webnotes.conn.sql
from controllers.buying_controller import BuyingController
class DocType(BuyingController):
diff --git a/stock/doctype/stock_entry/stock_entry.py b/stock/doctype/stock_entry/stock_entry.py
index 6a61461..b5e1edf 100644
--- a/stock/doctype/stock_entry/stock_entry.py
+++ b/stock/doctype/stock_entry/stock_entry.py
@@ -15,7 +15,6 @@
from controllers.queries import get_match_cond
import json
-sql = webnotes.conn.sql
class NotUpdateStockError(webnotes.ValidationError): pass
class StockOverReturnError(webnotes.ValidationError): pass
diff --git a/stock/doctype/stock_ledger/stock_ledger.py b/stock/doctype/stock_ledger/stock_ledger.py
index 10fb761..1624b00 100644
--- a/stock/doctype/stock_ledger/stock_ledger.py
+++ b/stock/doctype/stock_ledger/stock_ledger.py
@@ -11,7 +11,6 @@
from webnotes import session, msgprint
from stock.utils import get_valid_serial_nos
-sql = webnotes.conn.sql
class DocType:
def __init__(self, doc, doclist=[]):
diff --git a/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py b/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py
index 321e3c9..2ec9deb 100644
--- a/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py
+++ b/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py
@@ -10,7 +10,6 @@
from webnotes.model.code import get_obj
from webnotes import msgprint, _
-sql = webnotes.conn.sql
class DocType:
def __init__(self, d, dl=[]):
diff --git a/stock/doctype/warehouse/warehouse.py b/stock/doctype/warehouse/warehouse.py
index 0de27fe..b23f043 100644
--- a/stock/doctype/warehouse/warehouse.py
+++ b/stock/doctype/warehouse/warehouse.py
@@ -8,7 +8,6 @@
from webnotes.model.code import get_obj
from webnotes import msgprint
-sql = webnotes.conn.sql
class DocType:
def __init__(self, doc, doclist=[]):
diff --git a/support/doctype/customer_issue/customer_issue.py b/support/doctype/customer_issue/customer_issue.py
index 910e9b8..3773cdf 100644
--- a/support/doctype/customer_issue/customer_issue.py
+++ b/support/doctype/customer_issue/customer_issue.py
@@ -7,7 +7,6 @@
from webnotes import session, msgprint
from webnotes.utils import today
-sql = webnotes.conn.sql
from utilities.transaction_base import TransactionBase
diff --git a/support/doctype/maintenance_schedule/maintenance_schedule.py b/support/doctype/maintenance_schedule/maintenance_schedule.py
index 59d3f8e..4bb1217 100644
--- a/support/doctype/maintenance_schedule/maintenance_schedule.py
+++ b/support/doctype/maintenance_schedule/maintenance_schedule.py
@@ -9,7 +9,6 @@
from webnotes.model.bean import getlist
from webnotes import msgprint
-sql = webnotes.conn.sql
from utilities.transaction_base import TransactionBase, delete_events
diff --git a/support/doctype/maintenance_visit/maintenance_visit.py b/support/doctype/maintenance_visit/maintenance_visit.py
index bf8767b..dbb2880 100644
--- a/support/doctype/maintenance_visit/maintenance_visit.py
+++ b/support/doctype/maintenance_visit/maintenance_visit.py
@@ -8,7 +8,6 @@
from webnotes.model.bean import getlist
from webnotes import msgprint
-sql = webnotes.conn.sql
from utilities.transaction_base import TransactionBase
diff --git a/utilities/doctype/sms_control/sms_control.py b/utilities/doctype/sms_control/sms_control.py
index 9c2319f..d72db52 100644
--- a/utilities/doctype/sms_control/sms_control.py
+++ b/utilities/doctype/sms_control/sms_control.py
@@ -10,8 +10,6 @@
from webnotes import msgprint
from webnotes.model.bean import getlist, copy_doclist
-sql = webnotes.conn.sql
-
class DocType:
def __init__(self, doc, doclist=[]):
self.doc = doc
@@ -119,4 +117,4 @@
sl.message = arg['message']
sl.no_of_requested_sms = len(arg['receiver_list'])
sl.no_of_sent_sms = sent_sms
- sl.save(new=1)
\ No newline at end of file
+ sl.save(new=1)