removed unnecessary imports
diff --git a/accounts/doctype/account/account.py b/accounts/doctype/account/account.py
index 350ebbe..70c55e7 100644
--- a/accounts/doctype/account/account.py
+++ b/accounts/doctype/account/account.py
@@ -14,19 +14,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import flt, fmt_money
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
+from webnotes import msgprint
sql = webnotes.conn.sql
-get_value = webnotes.conn.get_value
class DocType:
def __init__(self,d,dl):
diff --git a/accounts/doctype/bank_reconciliation/bank_reconciliation.py b/accounts/doctype/bank_reconciliation/bank_reconciliation.py
index 2314e14..35db6fb 100644
--- a/accounts/doctype/bank_reconciliation/bank_reconciliation.py
+++ b/accounts/doctype/bank_reconciliation/bank_reconciliation.py
@@ -14,24 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, flt, getdate, now, nowdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import addchild
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/accounts/doctype/budget_control/budget_control.py b/accounts/doctype/budget_control/budget_control.py
index 2f0a3f5..75c938c 100644
--- a/accounts/doctype/budget_control/budget_control.py
+++ b/accounts/doctype/budget_control/budget_control.py
@@ -14,24 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, flt, getdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/accounts/doctype/c_form/c_form.py b/accounts/doctype/c_form/c_form.py
index d2c9093..a1cc9e8 100644
--- a/accounts/doctype/c_form/c_form.py
+++ b/accounts/doctype/c_form/c_form.py
@@ -14,17 +14,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, cint, cstr, date_diff, default_fields, flt, getdate, now, nowdate
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.utils import flt, getdate
+from webnotes.model.doc import make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj
-from webnotes import msgprint, errprint
+from webnotes import msgprint
sql = webnotes.conn.sql
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/accounts/doctype/form_16a/form_16a.py b/accounts/doctype/form_16a/form_16a.py
index d661f38..4afd361 100644
--- a/accounts/doctype/form_16a/form_16a.py
+++ b/accounts/doctype/form_16a/form_16a.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, flt, now
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import addchild, make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import form, msgprint
-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
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
class DocType(TransactionBase):
diff --git a/accounts/doctype/gl_control/gl_control.py b/accounts/doctype/gl_control/gl_control.py
index 358e5f0..9dec4d5 100644
--- a/accounts/doctype/gl_control/gl_control.py
+++ b/accounts/doctype/gl_control/gl_control.py
@@ -14,22 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, flt, get_defaults, now, sendmail
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import Document, addchild
from webnotes.model.wrapper import getlist, copy_doclist
from webnotes.model.code import get_obj
-from webnotes import session, form, msgprint, errprint
+from webnotes import msgprint
from webnotes.utils.email_lib import sendmail
-in_transaction = webnotes.conn.in_transaction
-convert_to_lists = webnotes.conn.convert_to_lists
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
class DocType:
diff --git a/accounts/doctype/gl_entry/gl_entry.py b/accounts/doctype/gl_entry/gl_entry.py
index e0de53d..4e20f1b 100644
--- a/accounts/doctype/gl_entry/gl_entry.py
+++ b/accounts/doctype/gl_entry/gl_entry.py
@@ -14,24 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import flt, fmt_money, get_first_day, get_last_day, getdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/accounts/doctype/journal_voucher/journal_voucher.py b/accounts/doctype/journal_voucher/journal_voucher.py
index c9d76cd..450b8b8 100644
--- a/accounts/doctype/journal_voucher/journal_voucher.py
+++ b/accounts/doctype/journal_voucher/journal_voucher.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import cint, cstr, flt, fmt_money, formatdate, getTraceback, get_defaults, getdate, has_common, month_name, now, nowdate, sendmail, set_default, str_esc_quote, user_format, validate_email_add
+from webnotes.utils import cint, cstr, flt, fmt_money, formatdate, getdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import addchild, make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import form, msgprint
-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
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
class DocType:
diff --git a/accounts/doctype/journal_voucher/test_journal_voucher.py b/accounts/doctype/journal_voucher/test_journal_voucher.py
index 3f32dfa..e043e9f 100644
--- a/accounts/doctype/journal_voucher/test_journal_voucher.py
+++ b/accounts/doctype/journal_voucher/test_journal_voucher.py
@@ -14,7 +14,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import unittest
diff --git a/accounts/doctype/mis_control/mis_control.py b/accounts/doctype/mis_control/mis_control.py
index e25c585..a860c82 100644
--- a/accounts/doctype/mis_control/mis_control.py
+++ b/accounts/doctype/mis_control/mis_control.py
@@ -14,22 +14,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cint, cstr, flt, get_defaults, get_first_day, get_last_day, has_common
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
+from webnotes import session, msgprint
-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
from accounts.utils import get_balance_on, get_fiscal_year
diff --git a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py
index 7ffc8e4..005b981 100644
--- a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py
+++ b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import flt
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import addchild
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/accounts/doctype/period_closing_voucher/period_closing_voucher.py
index e751a75..80e993a 100644
--- a/accounts/doctype/period_closing_voucher/period_closing_voucher.py
+++ b/accounts/doctype/period_closing_voucher/period_closing_voucher.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, flt, getdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.doc import Document
+from webnotes.model.wrapper import copy_doclist
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/accounts/doctype/pos_setting/pos_setting.py b/accounts/doctype/pos_setting/pos_setting.py
index 4a2cc1f..7f820fe 100755
--- a/accounts/doctype/pos_setting/pos_setting.py
+++ b/accounts/doctype/pos_setting/pos_setting.py
@@ -14,24 +14,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/accounts/doctype/purchase_invoice/purchase_invoice.py b/accounts/doctype/purchase_invoice/purchase_invoice.py
index fc1d332..cf34cf6 100644
--- a/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/accounts/doctype/purchase_invoice/purchase_invoice.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import add_days, cint, cstr, flt, formatdate, get_defaults
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import Document, make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import form, msgprint
-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
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
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 b40873a..faf06fd 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
@@ -14,24 +14,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
+from webnotes.model.code import get_obj
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/accounts/doctype/sales_invoice/sales_invoice.py b/accounts/doctype/sales_invoice/sales_invoice.py
index 2aa30fd..eb7268b 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/accounts/doctype/sales_invoice/sales_invoice.py
@@ -14,27 +14,23 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr,date_diff, default_fields, flt, fmt_money, formatdate,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.utils import add_days, cint, cstr, date_diff, flt, getTraceback, getdate, now, nowdate, sendmail, validate_email_add
from webnotes.utils import comma_and
from webnotes import _
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import session, form, msgprint
-in_transaction = webnotes.conn.in_transaction
-convert_to_lists = webnotes.conn.convert_to_lists
session = webnotes.session
month_map = {'Monthly': 1, 'Quarterly': 3, 'Half-yearly': 6, 'Yearly': 12}
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
diff --git a/accounts/doctype/tds_category/tds_category.py b/accounts/doctype/tds_category/tds_category.py
index c64d4bb..3b23c38 100644
--- a/accounts/doctype/tds_category/tds_category.py
+++ b/accounts/doctype/tds_category/tds_category.py
@@ -14,24 +14,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/accounts/doctype/tds_control/tds_control.py b/accounts/doctype/tds_control/tds_control.py
index d9c654b..1aaa2e5 100644
--- a/accounts/doctype/tds_control/tds_control.py
+++ b/accounts/doctype/tds_control/tds_control.py
@@ -14,24 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, flt, getdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/accounts/doctype/tds_payment/tds_payment.py b/accounts/doctype/tds_payment/tds_payment.py
index b367b0d..a3b0080 100644
--- a/accounts/doctype/tds_payment/tds_payment.py
+++ b/accounts/doctype/tds_payment/tds_payment.py
@@ -14,24 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, flt, now
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import addchild, make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/accounts/doctype/trend_analyzer_control/trend_analyzer_control.py b/accounts/doctype/trend_analyzer_control/trend_analyzer_control.py
index e10d2cb..f43542f 100755
--- a/accounts/doctype/trend_analyzer_control/trend_analyzer_control.py
+++ b/accounts/doctype/trend_analyzer_control/trend_analyzer_control.py
@@ -14,24 +14,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import add_days, add_months, cint, cstr, month_name
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
-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
-# -----------------------------------------------------------------------------------------
class DocType:
def __init__(self, d, dl):
diff --git a/accounts/page/voucher_import_tool/voucher_import_tool.py b/accounts/page/voucher_import_tool/voucher_import_tool.py
index 3a50f9d..5f66c7a 100644
--- a/accounts/page/voucher_import_tool/voucher_import_tool.py
+++ b/accounts/page/voucher_import_tool/voucher_import_tool.py
@@ -1,6 +1,6 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import formatdate, flt
+from webnotes.utils import flt
@webnotes.whitelist()
def get_template():
@@ -64,7 +64,6 @@
def import_vouchers(common_values, data, start_idx, import_type):
from webnotes.model.doc import Document
from webnotes.model.wrapper import ModelWrapper
- from webnotes.model.code import get_obj
from accounts.utils import get_fiscal_year
from webnotes.utils.dateutils import parse_date
diff --git a/accounts/search_criteria/purchase_register/purchase_register.py b/accounts/search_criteria/purchase_register/purchase_register.py
index 9c33e2a..93fc323 100644
--- a/accounts/search_criteria/purchase_register/purchase_register.py
+++ b/accounts/search_criteria/purchase_register/purchase_register.py
@@ -16,7 +16,7 @@
# add expense head columns
from __future__ import unicode_literals
-from webnotes.utils import flt, cint, cstr
+from webnotes.utils import flt
expense_acc = [c[0] for c in sql("""select distinct expense_head
from `tabPurchase Invoice Item`
diff --git a/accounts/search_criteria/sales_register/sales_register.py b/accounts/search_criteria/sales_register/sales_register.py
index ef9374a..f9cbc5d 100644
--- a/accounts/search_criteria/sales_register/sales_register.py
+++ b/accounts/search_criteria/sales_register/sales_register.py
@@ -16,7 +16,7 @@
# add additional columns
from __future__ import unicode_literals
-from webnotes.utils import flt, cint, cstr
+from webnotes.utils import flt
cl = [c[0] for c in sql("""select distinct account_head
from `tabSales Taxes and Charges`
diff --git a/accounts/search_criteria/yearly_transaction_summary/yearly_transaction_summary.py b/accounts/search_criteria/yearly_transaction_summary/yearly_transaction_summary.py
index 1e163b3..166d313 100644
--- a/accounts/search_criteria/yearly_transaction_summary/yearly_transaction_summary.py
+++ b/accounts/search_criteria/yearly_transaction_summary/yearly_transaction_summary.py
@@ -30,8 +30,7 @@
if from_date != "" and to_date != "":
get_obj('MIS Control').dates(from_fiscal_year,from_date,to_date) # validate dates (i.e. dates should be between particular fiscal year)
-# Add columns based on from and to fiscal year
-# --------------------------------------------------------------------------------------------------
+# Add columns based on from and to fiscal year---------
columns = []
columns.append(['ID','Data','150px',''])
columns.append(['Description','Data','150px',''])
diff --git a/buying/doctype/purchase_common/purchase_common.py b/buying/doctype/purchase_common/purchase_common.py
index 0b57b62..b2634b0 100644
--- a/buying/doctype/purchase_common/purchase_common.py
+++ b/buying/doctype/purchase_common/purchase_common.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import add_days, cint, cstr, flt, getdate, now
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import Document, addchild
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import form, msgprint
-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
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
class DocType(TransactionBase):
diff --git a/buying/doctype/purchase_order/purchase_order.py b/buying/doctype/purchase_order/purchase_order.py
index b09c4b5..c49c054 100644
--- a/buying/doctype/purchase_order/purchase_order.py
+++ b/buying/doctype/purchase_order/purchase_order.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, date_diff, flt, get_defaults, now
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import addchild, make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
diff --git a/buying/doctype/purchase_request/purchase_request.py b/buying/doctype/purchase_request/purchase_request.py
index 4a9b96d..f30b722 100644
--- a/buying/doctype/purchase_request/purchase_request.py
+++ b/buying/doctype/purchase_request/purchase_request.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, date_diff, flt, get_defaults, now
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/buying/doctype/quality_inspection/quality_inspection.py b/buying/doctype/quality_inspection/quality_inspection.py
index 8fb373a..981bf43 100644
--- a/buying/doctype/quality_inspection/quality_inspection.py
+++ b/buying/doctype/quality_inspection/quality_inspection.py
@@ -14,24 +14,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.doc import addchild, make_autoname
+from webnotes.model.wrapper import copy_doclist
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/buying/doctype/supplier/supplier.py b/buying/doctype/supplier/supplier.py
index fec18af..0251899 100644
--- a/buying/doctype/supplier/supplier.py
+++ b/buying/doctype/supplier/supplier.py
@@ -14,16 +14,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import cint, cstr, get_defaults
+from webnotes.utils import cstr, get_defaults
from webnotes.model.code import get_obj
-from webnotes import form, msgprint
+from webnotes import msgprint
sql = webnotes.conn.sql
-convert_to_lists = webnotes.conn.convert_to_lists
from utilities.transaction_base import TransactionBase
diff --git a/controllers/transaction_controller.py b/controllers/transaction_controller.py
index 39a7376..5d77472 100644
--- a/controllers/transaction_controller.py
+++ b/controllers/transaction_controller.py
@@ -17,10 +17,8 @@
from __future__ import unicode_literals
import webnotes
import webnotes.model
-from webnotes import _, msgprint, DictObj
-from webnotes.utils import cint, formatdate, cstr, flt
-from webnotes.model.code import get_obj
-from webnotes.model.doc import make_autoname, Document
+from webnotes import _, DictObj
+from webnotes.utils import cint
import json
import stock.utils
diff --git a/home/doctype/company_control/company_control.py b/home/doctype/company_control/company_control.py
index 8baf910..c18610b 100644
--- a/home/doctype/company_control/company_control.py
+++ b/home/doctype/company_control/company_control.py
@@ -14,24 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cint, cstr
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.doc import Document
+from webnotes.model.wrapper import copy_doclist
+from webnotes import session
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/home/doctype/feed/feed.py b/home/doctype/feed/feed.py
index c6cf506..6e4199b 100644
--- a/home/doctype/feed/feed.py
+++ b/home/doctype/feed/feed.py
@@ -14,24 +14,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/home/doctype/home_control/home_control.py b/home/doctype/home_control/home_control.py
index 02be00d..c200109 100644
--- a/home/doctype/home_control/home_control.py
+++ b/home/doctype/home_control/home_control.py
@@ -14,28 +14,24 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.doc import Document, addchild, getchildren, make_autoname
-from webnotes import session, msgprint, errprint
+from webnotes.utils import add_days, cint, cstr, getdate, now, nowdate
+from webnotes.model.doc import Document
+from webnotes import session, msgprint
sql = webnotes.conn.sql
-convert_to_lists = webnotes.conn.convert_to_lists
try: import json
except: import simplejson as json
-# -----------------------------------------------------------------------------------------
class DocType:
def __init__(self,d,dl):
self.doc, self.doclist = d,dl
-
-# --------------------------------------------------------------------------------------------------------
+---------------
# ------------------------------------- Home page module details -----------------------------------------
def delete_cache(self):
diff --git a/hr/doctype/appraisal/appraisal.py b/hr/doctype/appraisal/appraisal.py
index b2d0f96..b4b0e4e 100644
--- a/hr/doctype/appraisal/appraisal.py
+++ b/hr/doctype/appraisal/appraisal.py
@@ -14,11 +14,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, cstr, flt, getdate, now, nowdate
+from webnotes.utils import cstr, flt, getdate
from webnotes.model.wrapper import getlist
from webnotes.model.code import get_obj
from webnotes import msgprint
diff --git a/hr/doctype/attendance/attendance.py b/hr/doctype/attendance/attendance.py
index d0f6989..3f45825 100644
--- a/hr/doctype/attendance/attendance.py
+++ b/hr/doctype/attendance/attendance.py
@@ -14,24 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import add_days, getdate, now
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.doc import make_autoname
+from webnotes.model.wrapper import copy_doclist
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/hr/doctype/attendance_control_panel/attendance_control_panel.py b/hr/doctype/attendance_control_panel/attendance_control_panel.py
index 0a28494..bc21f13 100644
--- a/hr/doctype/attendance_control_panel/attendance_control_panel.py
+++ b/hr/doctype/attendance_control_panel/attendance_control_panel.py
@@ -14,24 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cint, cstr, date_diff, formatdate, get_defaults, getdate, now
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
+from webnotes import form, msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/hr/doctype/employee/employee.py b/hr/doctype/employee/employee.py
index e65258f..c0f7be3 100644
--- a/hr/doctype/employee/employee.py
+++ b/hr/doctype/employee/employee.py
@@ -17,7 +17,7 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import getdate, now, nowdate, validate_email_add
+from webnotes.utils import getdate, validate_email_add
from webnotes.model.doc import make_autoname
from webnotes import msgprint
diff --git a/hr/doctype/expense_claim/expense_claim.py b/hr/doctype/expense_claim/expense_claim.py
index 64b0da3..66434bb 100644
--- a/hr/doctype/expense_claim/expense_claim.py
+++ b/hr/doctype/expense_claim/expense_claim.py
@@ -14,24 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import add_days, cstr
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import form, msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/hr/doctype/holiday_list/holiday_list.py b/hr/doctype/holiday_list/holiday_list.py
index ff342d0..63b1af4 100644
--- a/hr/doctype/holiday_list/holiday_list.py
+++ b/hr/doctype/holiday_list/holiday_list.py
@@ -14,26 +14,19 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import add_days, add_years, cint, getdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.doc import addchild, make_autoname
+from webnotes.model.wrapper import copy_doclist
+from webnotes import msgprint
-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
import datetime
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/hr/doctype/leave_allocation/leave_allocation.py b/hr/doctype/leave_allocation/leave_allocation.py
index 1772f2c..9e830b9 100755
--- a/hr/doctype/leave_allocation/leave_allocation.py
+++ b/hr/doctype/leave_allocation/leave_allocation.py
@@ -14,12 +14,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
from webnotes.utils import cint, flt
from webnotes import msgprint
-set = webnotes.conn.set
sql = webnotes.conn.sql
class DocType:
diff --git a/hr/doctype/leave_application/leave_application.py b/hr/doctype/leave_application/leave_application.py
index 2f7e4a8..dcc5b50 100755
--- a/hr/doctype/leave_application/leave_application.py
+++ b/hr/doctype/leave_application/leave_application.py
@@ -14,25 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cint, cstr, date_diff, flt, formatdate, getdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
+from webnotes import form, msgprint
-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
import datetime
-# -----------------------------------------------------------------------------------------
class DocType:
def __init__(self, doc, doclist):
self.doc = doc
diff --git a/hr/doctype/leave_control_panel/leave_control_panel.py b/hr/doctype/leave_control_panel/leave_control_panel.py
index 2e1f13c..cb10e71 100644
--- a/hr/doctype/leave_control_panel/leave_control_panel.py
+++ b/hr/doctype/leave_control_panel/leave_control_panel.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cint, cstr, flt, now, nowdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.doc import Document
+from webnotes.model.wrapper import copy_doclist
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/hr/doctype/salary_manager/salary_manager.py b/hr/doctype/salary_manager/salary_manager.py
index 7dea5d0..d8f1288 100644
--- a/hr/doctype/salary_manager/salary_manager.py
+++ b/hr/doctype/salary_manager/salary_manager.py
@@ -14,23 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cint, flt
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import Document
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import msgprint
sql = webnotes.conn.sql
-get_value = webnotes.conn.get_value
-in_transaction = webnotes.conn.in_transaction
-convert_to_lists = webnotes.conn.convert_to_lists
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/hr/doctype/salary_slip/salary_slip.py b/hr/doctype/salary_slip/salary_slip.py
index 3a0396f..7886281 100644
--- a/hr/doctype/salary_slip/salary_slip.py
+++ b/hr/doctype/salary_slip/salary_slip.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, set_default, str_esc_quote, user_format, validate_email_add
+from webnotes.utils import add_days, cint, cstr, flt, getdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
class DocType(TransactionBase):
diff --git a/hr/doctype/salary_structure/salary_structure.py b/hr/doctype/salary_structure/salary_structure.py
index d0b4e5b..d07be6e 100644
--- a/hr/doctype/salary_structure/salary_structure.py
+++ b/hr/doctype/salary_structure/salary_structure.py
@@ -14,24 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, flt
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.doc import addchild, make_autoname
+from webnotes.model.wrapper import copy_doclist
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/patches/before_jan_2012/index_patch.py b/patches/before_jan_2012/index_patch.py
index 2203bac..7971fbf 100644
--- a/patches/before_jan_2012/index_patch.py
+++ b/patches/before_jan_2012/index_patch.py
@@ -21,7 +21,7 @@
import webnotes
sql = webnotes.conn.sql
-from webnotes.utils import cint, cstr
+from webnotes.utils import cstr
def create_proper_index():
from webnotes.modules.export_file import export_to_files
diff --git a/patches/jan_mar_2012/rename_dt.py b/patches/jan_mar_2012/rename_dt.py
index 31a434c..c163b49 100644
--- a/patches/jan_mar_2012/rename_dt.py
+++ b/patches/jan_mar_2012/rename_dt.py
@@ -2,7 +2,6 @@
import webnotes
import conf
import webnotes.model
-from webnotes.model.code import get_obj
from wnf import replace_code
from termcolor import colored
from webnotes.modules import reload_doc
diff --git a/patches/jan_mar_2012/website/feed.py b/patches/jan_mar_2012/website/feed.py
index b815698..eae8871 100644
--- a/patches/jan_mar_2012/website/feed.py
+++ b/patches/jan_mar_2012/website/feed.py
@@ -16,7 +16,6 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.model.doc import Document
from webnotes.modules import reload_doc
def execute():
diff --git a/production/doctype/bom/bom.py b/production/doctype/bom/bom.py
index 913e7b6..a413f6a 100644
--- a/production/doctype/bom/bom.py
+++ b/production/doctype/bom/bom.py
@@ -16,17 +16,14 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import cint, cstr, flt, get_defaults, getdate, now, nowdate
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.utils import cint, cstr, flt, now, nowdate
+from webnotes.model.doc import Document, addchild
from webnotes.model.wrapper import getlist
from webnotes.model.code import get_obj
-from webnotes import msgprint, errprint
+from webnotes import msgprint
-set = webnotes.conn.set
sql = webnotes.conn.sql
-get_value = webnotes.conn.get_value
-# -----------------------------------------------------------------------------------------
class DocType:
def __init__(self, doc, doclist=[]):
diff --git a/production/doctype/bom_control/bom_control.py b/production/doctype/bom_control/bom_control.py
index c093ec5..27812a8 100644
--- a/production/doctype/bom_control/bom_control.py
+++ b/production/doctype/bom_control/bom_control.py
@@ -14,24 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
from webnotes.utils import cint, flt
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
+from webnotes.model.code import get_obj
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/production/doctype/production_control/production_control.py b/production/doctype/production_control/production_control.py
index 4cb6030..b389e69 100644
--- a/production/doctype/production_control/production_control.py
+++ b/production/doctype/production_control/production_control.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, flt, get_defaults, now, nowdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.doc import Document
+from webnotes.model.wrapper import copy_doclist
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/production/doctype/production_order/production_order.py b/production/doctype/production_order/production_order.py
index fd9a614..5314971 100644
--- a/production/doctype/production_order/production_order.py
+++ b/production/doctype/production_order/production_order.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, flt, now, nowdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.doc import make_autoname
+from webnotes.model.wrapper import copy_doclist
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/production/doctype/production_planning_tool/production_planning_tool.py b/production/doctype/production_planning_tool/production_planning_tool.py
index e4c97c4..863e254 100644
--- a/production/doctype/production_planning_tool/production_planning_tool.py
+++ b/production/doctype/production_planning_tool/production_planning_tool.py
@@ -16,11 +16,11 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import cint, cstr, flt, getdate, now, nowdate
+from webnotes.utils import cstr, flt
from webnotes.model.doc import addchild
from webnotes.model.wrapper import getlist
from webnotes.model.code import get_obj
-from webnotes import msgprint, errprint
+from webnotes import msgprint
sql = webnotes.conn.sql
diff --git a/production/doctype/workstation/workstation.py b/production/doctype/workstation/workstation.py
index 414efd9..fdd4022 100644
--- a/production/doctype/workstation/workstation.py
+++ b/production/doctype/workstation/workstation.py
@@ -14,24 +14,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import flt
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/projects/doctype/project/project.py b/projects/doctype/project/project.py
index 5c0417b..3e334e8 100644
--- a/projects/doctype/project/project.py
+++ b/projects/doctype/project/project.py
@@ -14,24 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import flt, getdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.doc import Document
+from webnotes.model.wrapper import copy_doclist
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/projects/doctype/project_control/project_control.py b/projects/doctype/project_control/project_control.py
index 33a535b..5601837 100644
--- a/projects/doctype/project_control/project_control.py
+++ b/projects/doctype/project_control/project_control.py
@@ -14,24 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, set_default, str_esc_quote, user_format, validate_email_add, add_days
+from webnotes.utils import add_days, cint, cstr, date_diff, flt, now, nowdate, add_days
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
+from webnotes import msgprint
from webnotes.utils.email_lib import sendmail
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/projects/doctype/task/task.py b/projects/doctype/task/task.py
index 89e12cd..c390806 100644
--- a/projects/doctype/task/task.py
+++ b/projects/doctype/task/task.py
@@ -14,21 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, set_default, str_esc_quote, user_format, validate_email_add
-from webnotes.utils.email_lib import sendmail
+from webnotes.utils import getdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
+from webnotes import msgprint
sql = webnotes.conn.sql
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/projects/doctype/timesheet/timesheet.py b/projects/doctype/timesheet/timesheet.py
index ebabf09..775937e 100644
--- a/projects/doctype/timesheet/timesheet.py
+++ b/projects/doctype/timesheet/timesheet.py
@@ -14,24 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cint, cstr, getdate, now, nowdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/sandbox/test_leave.py b/sandbox/test_leave.py
index 2094bfd..25601b7 100644
--- a/sandbox/test_leave.py
+++ b/sandbox/test_leave.py
@@ -22,10 +22,7 @@
webnotes.user = webnotes.profile.Profile()
-from webnotes.model.doc import Document
from webnotes.model.code import get_obj
-from webnotes.utils import cstr, flt
-from webnotes.model.wrapper import getlist
sql = webnotes.conn.sql
from sandbox.testdata import leaves
diff --git a/sandbox/test_stock_entry.py b/sandbox/test_stock_entry.py
index ec47b98..fe28880 100644
--- a/sandbox/test_stock_entry.py
+++ b/sandbox/test_stock_entry.py
@@ -22,10 +22,7 @@
webnotes.user = webnotes.profile.Profile()
-from webnotes.model.doc import Document
from webnotes.model.code import get_obj
-from webnotes.utils import cstr, flt
-from webnotes.model.wrapper import getlist
sql = webnotes.conn.sql
from sandbox.testdata.masters import *
diff --git a/sandbox/test_stock_reco.py b/sandbox/test_stock_reco.py
index b77401c..ada85b4 100644
--- a/sandbox/test_stock_reco.py
+++ b/sandbox/test_stock_reco.py
@@ -22,10 +22,7 @@
webnotes.user = webnotes.profile.Profile()
-from webnotes.model.doc import Document
from webnotes.model.code import get_obj
-from webnotes.utils import cstr, flt
-from webnotes.model.wrapper import getlist
sql = webnotes.conn.sql
from sandbox.testdata.masters import *
diff --git a/selling/doctype/customer/customer.py b/selling/doctype/customer/customer.py
index 975dd89..ee5ef54 100644
--- a/selling/doctype/customer/customer.py
+++ b/selling/doctype/customer/customer.py
@@ -14,17 +14,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
from webnotes.utils import cstr, get_defaults
from webnotes.model.doc import Document, make_autoname
from webnotes.model.code import get_obj
-from webnotes import msgprint, errprint
+from webnotes import msgprint
sql = webnotes.conn.sql
-get_value = webnotes.conn.get_value
from utilities.transaction_base import TransactionBase
diff --git a/selling/doctype/installation_note/installation_note.py b/selling/doctype/installation_note/installation_note.py
index 5de9557..43f5286 100644
--- a/selling/doctype/installation_note/installation_note.py
+++ b/selling/doctype/installation_note/installation_note.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, getdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
diff --git a/selling/doctype/lead/lead.py b/selling/doctype/lead/lead.py
index be11da4..d844b8d 100644
--- a/selling/doctype/lead/lead.py
+++ b/selling/doctype/lead/lead.py
@@ -14,11 +14,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import cint, cstr, flt, validate_email_add
+from webnotes.utils import cstr, validate_email_add
from webnotes.model.doc import Document, addchild
from webnotes import session, msgprint
diff --git a/selling/doctype/opportunity/opportunity.py b/selling/doctype/opportunity/opportunity.py
index 4f10c80..82a6e8e 100644
--- a/selling/doctype/opportunity/opportunity.py
+++ b/selling/doctype/opportunity/opportunity.py
@@ -14,16 +14,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_years, cint, cstr, date_diff, flt, getdate
+from webnotes.utils import add_days, cstr, getdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, make_autoname
+from webnotes.model.doc import Document, addchild
from webnotes.model.wrapper import getlist
-from webnotes.model.code import get_obj
-from webnotes import form, msgprint
+from webnotes import msgprint
sql = webnotes.conn.sql
diff --git a/selling/doctype/plot_control/plot_control.py b/selling/doctype/plot_control/plot_control.py
index 3bb751f..55d3730 100644
--- a/selling/doctype/plot_control/plot_control.py
+++ b/selling/doctype/plot_control/plot_control.py
@@ -14,24 +14,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cint, cstr, get_defaults, now
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/selling/doctype/quotation/quotation.py b/selling/doctype/quotation/quotation.py
index cef0abe..3a547a0 100644
--- a/selling/doctype/quotation/quotation.py
+++ b/selling/doctype/quotation/quotation.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, getTraceback, get_defaults, get_first_day, get_last_day, load_json
+from webnotes.utils import cstr, load_json
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren
+from webnotes.model.doc import Document, addchild
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
diff --git a/selling/doctype/sales_common/sales_common.py b/selling/doctype/sales_common/sales_common.py
index 8ea4fe4..7f6ffe6 100644
--- a/selling/doctype/sales_common/sales_common.py
+++ b/selling/doctype/sales_common/sales_common.py
@@ -14,22 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import add_days, cint, cstr, default_fields, flt, getdate, now, nowdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import addchild
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import form, msgprint
-get_value = webnotes.conn.get_value
-in_transaction = webnotes.conn.in_transaction
-convert_to_lists = webnotes.conn.convert_to_lists
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
diff --git a/selling/doctype/sales_order/sales_order.py b/selling/doctype/sales_order/sales_order.py
index a511d4b..410a6e1 100644
--- a/selling/doctype/sales_order/sales_order.py
+++ b/selling/doctype/sales_order/sales_order.py
@@ -14,24 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, date_diff, flt, getdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
diff --git a/selling/doctype/sms_center/sms_center.py b/selling/doctype/sms_center/sms_center.py
index afc3a20..416b1ec 100644
--- a/selling/doctype/sms_center/sms_center.py
+++ b/selling/doctype/sms_center/sms_center.py
@@ -14,24 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
# ----------
class DocType:
diff --git a/setup/doctype/authorization_control/authorization_control.py b/setup/doctype/authorization_control/authorization_control.py
index a9aab67..360a4d0 100644
--- a/setup/doctype/authorization_control/authorization_control.py
+++ b/setup/doctype/authorization_control/authorization_control.py
@@ -14,24 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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, make_esc
+from webnotes.utils import cstr, flt, has_common, make_esc
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes import session, msgprint
-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
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
class DocType(TransactionBase):
diff --git a/setup/doctype/authorization_rule/authorization_rule.py b/setup/doctype/authorization_rule/authorization_rule.py
index dc18143..a3646c0 100644
--- a/setup/doctype/authorization_rule/authorization_rule.py
+++ b/setup/doctype/authorization_rule/authorization_rule.py
@@ -14,24 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cint, cstr, flt, has_common
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/setup/doctype/company/company.py b/setup/doctype/company/company.py
index ebf3eae..83c9f83 100644
--- a/setup/doctype/company/company.py
+++ b/setup/doctype/company/company.py
@@ -14,22 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, get_defaults, set_default
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.doc import Document
+from webnotes.model.wrapper import copy_doclist
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
class DocType:
def __init__(self,d,dl):
diff --git a/setup/doctype/contact_control/contact_control.py b/setup/doctype/contact_control/contact_control.py
index b89eced..ed90b99 100644
--- a/setup/doctype/contact_control/contact_control.py
+++ b/setup/doctype/contact_control/contact_control.py
@@ -2,20 +2,15 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import set_default
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.doc import Document
+from webnotes.model.wrapper import copy_doclist
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/setup/doctype/customer_group/customer_group.py b/setup/doctype/customer_group/customer_group.py
index 2bcb511..0f68521 100644
--- a/setup/doctype/customer_group/customer_group.py
+++ b/setup/doctype/customer_group/customer_group.py
@@ -14,24 +14,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
from webnotes.utils.nestedset import DocTypeNestedSet
class DocType(DocTypeNestedSet):
def __init__(self, doc, doclist=[]):
diff --git a/setup/doctype/email_settings/email_settings.py b/setup/doctype/email_settings/email_settings.py
index e17f55c..b9880d2 100644
--- a/setup/doctype/email_settings/email_settings.py
+++ b/setup/doctype/email_settings/email_settings.py
@@ -18,7 +18,7 @@
import webnotes
sql = webnotes.conn.sql
-from webnotes.utils import cint, cstr
+from webnotes.utils import cint
class DocType:
def __init__(self,doc,doclist):
diff --git a/setup/doctype/item_group/item_group.py b/setup/doctype/item_group/item_group.py
index 17e10bb..2cec30d 100644
--- a/setup/doctype/item_group/item_group.py
+++ b/setup/doctype/item_group/item_group.py
@@ -17,8 +17,6 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.model.wrapper import getlist
-from webnotes.utils import flt
from webnotes.utils.nestedset import DocTypeNestedSet
diff --git a/setup/doctype/naming_series/naming_series.py b/setup/doctype/naming_series/naming_series.py
index c40e932..a259c84 100644
--- a/setup/doctype/naming_series/naming_series.py
+++ b/setup/doctype/naming_series/naming_series.py
@@ -17,8 +17,8 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import cint, cstr
-from webnotes import msgprint, errprint
+from webnotes.utils import cstr
+from webnotes import msgprint
import webnotes.model.doctype
sql = webnotes.conn.sql
diff --git a/setup/doctype/notification_control/notification_control.py b/setup/doctype/notification_control/notification_control.py
index b40ba6e..d6792f9 100644
--- a/setup/doctype/notification_control/notification_control.py
+++ b/setup/doctype/notification_control/notification_control.py
@@ -14,13 +14,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import validate_email_add, cint, cstr
-from webnotes.model.doc import Document
-from webnotes.model.code import get_obj
from webnotes import msgprint
sql = webnotes.conn.sql
diff --git a/setup/doctype/permission_control/permission_control.py b/setup/doctype/permission_control/permission_control.py
index d7a80a8..8162c39 100644
--- a/setup/doctype/permission_control/permission_control.py
+++ b/setup/doctype/permission_control/permission_control.py
@@ -14,22 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cint, cstr, get_defaults, now
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.doc import Document
+from webnotes.model.wrapper import copy_doclist
+from webnotes import msgprint
-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
class DocType:
def __init__(self, doc, doclist):
diff --git a/setup/doctype/print_heading/print_heading.py b/setup/doctype/print_heading/print_heading.py
index 171a152..87d21d7 100644
--- a/setup/doctype/print_heading/print_heading.py
+++ b/setup/doctype/print_heading/print_heading.py
@@ -14,24 +14,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/setup/doctype/sales_browser_control/sales_browser_control.py b/setup/doctype/sales_browser_control/sales_browser_control.py
index 5eec24e..331fe78 100644
--- a/setup/doctype/sales_browser_control/sales_browser_control.py
+++ b/setup/doctype/sales_browser_control/sales_browser_control.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.doc import Document
+from webnotes.model.wrapper import copy_doclist
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/setup/doctype/sales_partner/sales_partner.py b/setup/doctype/sales_partner/sales_partner.py
index 5bccd31..f332196 100644
--- a/setup/doctype/sales_partner/sales_partner.py
+++ b/setup/doctype/sales_partner/sales_partner.py
@@ -14,24 +14,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/setup/doctype/sales_person/sales_person.py b/setup/doctype/sales_person/sales_person.py
index bf16a0f..41d5042 100644
--- a/setup/doctype/sales_person/sales_person.py
+++ b/setup/doctype/sales_person/sales_person.py
@@ -14,7 +14,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
diff --git a/setup/doctype/setup_control/setup_control.py b/setup/doctype/setup_control/setup_control.py
index a71fde9..3d7e11c 100644
--- a/setup/doctype/setup_control/setup_control.py
+++ b/setup/doctype/setup_control/setup_control.py
@@ -17,7 +17,7 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import cint, cstr, flt, getdate, now, nowdate
+from webnotes.utils import cint, cstr, getdate, now, nowdate
from webnotes.model.doc import Document, addchild
from webnotes.model.code import get_obj
from webnotes import session, form, msgprint
diff --git a/setup/doctype/territory/territory.py b/setup/doctype/territory/territory.py
index 284bd26..59c0b3a 100644
--- a/setup/doctype/territory/territory.py
+++ b/setup/doctype/territory/territory.py
@@ -14,7 +14,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
diff --git a/setup/doctype/workflow_engine/workflow_engine.py b/setup/doctype/workflow_engine/workflow_engine.py
index 82c2c70..f9e2cef 100644
--- a/setup/doctype/workflow_engine/workflow_engine.py
+++ b/setup/doctype/workflow_engine/workflow_engine.py
@@ -14,24 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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, getchildren, make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import form, msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/setup/doctype/workflow_rule/workflow_rule.py b/setup/doctype/workflow_rule/workflow_rule.py
index 571adc4..24b2add 100644
--- a/setup/doctype/workflow_rule/workflow_rule.py
+++ b/setup/doctype/workflow_rule/workflow_rule.py
@@ -14,24 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes import form, msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/startup/event_handlers.py b/startup/event_handlers.py
index 07205b8..9cd1af9 100644
--- a/startup/event_handlers.py
+++ b/startup/event_handlers.py
@@ -16,7 +16,6 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import cint
import home
diff --git a/stock/doctype/bin/bin.py b/stock/doctype/bin/bin.py
index 039dd75..5e3e74a 100644
--- a/stock/doctype/bin/bin.py
+++ b/stock/doctype/bin/bin.py
@@ -14,16 +14,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, set_default, str_esc_quote, user_format, validate_email_add
+from webnotes.utils import add_days, cint, cstr, flt, get_defaults, now, nowdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import msgprint, errprint
+from webnotes.model.doc import Document, addchild
+from webnotes.model.wrapper import copy_doclist
+from webnotes.model.code import get_obj
+from webnotes import msgprint
sql = webnotes.conn.sql
diff --git a/stock/doctype/delivery_note/delivery_note.py b/stock/doctype/delivery_note/delivery_note.py
index e5aa909..5b756cf 100644
--- a/stock/doctype/delivery_note/delivery_note.py
+++ b/stock/doctype/delivery_note/delivery_note.py
@@ -14,24 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, flt, getdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
diff --git a/stock/doctype/item/item.py b/stock/doctype/item/item.py
index c906e47..92dc82b 100644
--- a/stock/doctype/item/item.py
+++ b/stock/doctype/item/item.py
@@ -14,24 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, flt
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import addchild
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/stock/doctype/item/test_item.py b/stock/doctype/item/test_item.py
index 66adb83..f7876a6 100644
--- a/stock/doctype/item/test_item.py
+++ b/stock/doctype/item/test_item.py
@@ -21,7 +21,6 @@
from webnotes.model.wrapper import ModelWrapper
from webnotes.model.doc import Document
-from webnotes.model.code import get_obj
from webnotes.utils import flt
sql = webnotes.conn.sql
diff --git a/stock/doctype/landed_cost_wizard/landed_cost_wizard.py b/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
index eb8fd8f..4e8015d 100644
--- a/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
+++ b/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
@@ -17,14 +17,13 @@
from __future__ import unicode_literals
import webnotes
from webnotes.utils import cint, cstr, flt
-from webnotes.model.doc import addchild, getchildren
+from webnotes.model.doc import addchild
from webnotes.model.wrapper import getlist
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/stock/doctype/purchase_receipt/purchase_receipt.py b/stock/doctype/purchase_receipt/purchase_receipt.py
index 51b7272..84cf47b 100644
--- a/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, flt, get_defaults, getdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import addchild, make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
diff --git a/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.py b/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.py
index c55bf03..92fa63e 100644
--- a/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.py
+++ b/stock/doctype/sales_and_purchase_return_tool/sales_and_purchase_return_tool.py
@@ -14,24 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import flt
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.doc import addchild
+from webnotes.model.wrapper import copy_doclist
-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
-# -----------------------------------------------------------------------------------------
class DocType :
def __init__(self, doc, doclist=[]):
diff --git a/stock/doctype/serial_no/serial_no.py b/stock/doctype/serial_no/serial_no.py
index 63b23ca..b6f60f5 100644
--- a/stock/doctype/serial_no/serial_no.py
+++ b/stock/doctype/serial_no/serial_no.py
@@ -14,17 +14,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import cint, flt, cstr, getdate, nowdate
+from webnotes.utils import cint, getdate, nowdate
import datetime
sql = webnotes.conn.sql
msgprint = webnotes.msgprint
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
diff --git a/stock/doctype/stock_entry/stock_entry.py b/stock/doctype/stock_entry/stock_entry.py
index 701f27d..29f58bc 100644
--- a/stock/doctype/stock_entry/stock_entry.py
+++ b/stock/doctype/stock_entry/stock_entry.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, flt, getdate, now
from webnotes.model import db_exists, delete_doc
-from webnotes.model.doc import Document, addchild, getchildren
+from webnotes.model.doc import Document, addchild
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
class DocType(TransactionBase):
diff --git a/stock/doctype/stock_ledger/stock_ledger.py b/stock/doctype/stock_ledger/stock_ledger.py
index 5deecdd..3235c32 100644
--- a/stock/doctype/stock_ledger/stock_ledger.py
+++ b/stock/doctype/stock_ledger/stock_ledger.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import add_days, cstr, flt, now, nowdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import Document
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import session, msgprint
-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
-# -----------------------------------------------------------------------------------------
def get_sr_no_list(sr_nos, qty = 0, item_code = ''):
serial_nos = cstr(sr_nos).strip().replace(',', '\n').split('\n')
diff --git a/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
index 645b7c9..3214435 100644
--- a/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
+++ b/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
@@ -14,17 +14,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
from webnotes.utils import cstr, cint, flt, cstr, getdate
sql = webnotes.conn.sql
-get_value = webnotes.conn.get_value
msgprint = webnotes.msgprint
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/stock/doctype/stock_reconciliation/stock_reconciliation.py b/stock/doctype/stock_reconciliation/stock_reconciliation.py
index 9a806f6..7df4b16 100644
--- a/stock/doctype/stock_reconciliation/stock_reconciliation.py
+++ b/stock/doctype/stock_reconciliation/stock_reconciliation.py
@@ -17,11 +17,10 @@
from __future__ import unicode_literals
import webnotes
from webnotes.utils import cstr, flt, get_defaults, nowdate, formatdate
-from webnotes import msgprint, errprint
+from webnotes import msgprint
from webnotes.model.code import get_obj
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 0d73634..a02afe9 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
@@ -14,24 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr, flt, now
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/stock/doctype/valuation_control/valuation_control.py b/stock/doctype/valuation_control/valuation_control.py
index 1318db6..3953f53 100644
--- a/stock/doctype/valuation_control/valuation_control.py
+++ b/stock/doctype/valuation_control/valuation_control.py
@@ -14,7 +14,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes, unittest
diff --git a/stock/doctype/warehouse/warehouse.py b/stock/doctype/warehouse/warehouse.py
index 5f1a63d..38ba387 100644
--- a/stock/doctype/warehouse/warehouse.py
+++ b/stock/doctype/warehouse/warehouse.py
@@ -14,15 +14,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, flt, get_defaults, getdate, has_common, month_name, now, nowdate, set_default, validate_email_add
-from webnotes.model.doc import Document, addchild, getchildren
-from webnotes.model.wrapper import getlist
+from webnotes.utils import cstr, flt, validate_email_add
+from webnotes.model.doc import Document
from webnotes.model.code import get_obj
-from webnotes import msgprint, errprint
+from webnotes import msgprint
sql = webnotes.conn.sql
diff --git a/support/doctype/customer_issue/customer_issue.py b/support/doctype/customer_issue/customer_issue.py
index bdd7ed6..3d5dba65 100644
--- a/support/doctype/customer_issue/customer_issue.py
+++ b/support/doctype/customer_issue/customer_issue.py
@@ -14,25 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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, getchildren
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
+from webnotes import session, msgprint
-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
-# -----------------------------------------------------------------------------------------
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 b17fe11..9196162 100644
--- a/support/doctype/maintenance_schedule/maintenance_schedule.py
+++ b/support/doctype/maintenance_schedule/maintenance_schedule.py
@@ -14,24 +14,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import add_days, cstr, date_diff, getdate
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
+from webnotes.model.doc import Document, addchild
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
diff --git a/support/doctype/maintenance_visit/maintenance_visit.py b/support/doctype/maintenance_visit/maintenance_visit.py
index bcf53f7..bff7f96 100644
--- a/support/doctype/maintenance_visit/maintenance_visit.py
+++ b/support/doctype/maintenance_visit/maintenance_visit.py
@@ -14,24 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.code import get_obj
+from webnotes import msgprint
-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
-# -----------------------------------------------------------------------------------------
from utilities.transaction_base import TransactionBase
diff --git a/support/doctype/support_ticket/support_ticket.py b/support/doctype/support_ticket/support_ticket.py
index e9b13bc..89a58a6 100644
--- a/support/doctype/support_ticket/support_ticket.py
+++ b/support/doctype/support_ticket/support_ticket.py
@@ -16,7 +16,6 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.model.doc import make_autoname
from utilities.transaction_base import TransactionBase
from home import update_feed
diff --git a/utilities/doctype/address/address.py b/utilities/doctype/address/address.py
index f9e53e7..08bf5cd 100644
--- a/utilities/doctype/address/address.py
+++ b/utilities/doctype/address/address.py
@@ -14,14 +14,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.model.doc import Document
-from webnotes import session, form, msgprint, errprint
+from webnotes import msgprint
-# -----------------------------------------------------------------------------------------
class DocType:
def __init__(self, doc, doclist=[]):
self.doc = doc
diff --git a/utilities/doctype/contact/contact.py b/utilities/doctype/contact/contact.py
index d980733..0db4670 100644
--- a/utilities/doctype/contact/contact.py
+++ b/utilities/doctype/contact/contact.py
@@ -14,12 +14,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.model.doc import Document
-from webnotes import session, form, msgprint, errprint
from utilities.transaction_base import TransactionBase
diff --git a/utilities/doctype/profile_control/profile_control.py b/utilities/doctype/profile_control/profile_control.py
index e906f70..5f6b4d5 100644
--- a/utilities/doctype/profile_control/profile_control.py
+++ b/utilities/doctype/profile_control/profile_control.py
@@ -14,24 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import cstr
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.doc import Document
+from webnotes.model.wrapper import copy_doclist
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/utilities/doctype/rename_tool/rename_tool.py b/utilities/doctype/rename_tool/rename_tool.py
index b0d7671..79832fb 100644
--- a/utilities/doctype/rename_tool/rename_tool.py
+++ b/utilities/doctype/rename_tool/rename_tool.py
@@ -24,7 +24,6 @@
Generate update quereies for rename
"""
import webnotes.model
- from webnotes.model.code import get_obj
# rename the document
webnotes.model.rename(self.doc.select_doctype, self.doc.document_to_rename, self.doc.new_name)
diff --git a/utilities/doctype/sms_control/sms_control.py b/utilities/doctype/sms_control/sms_control.py
index 2be7546..9b80d1e 100644
--- a/utilities/doctype/sms_control/sms_control.py
+++ b/utilities/doctype/sms_control/sms_control.py
@@ -14,20 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import cint, flt, load_json, nowdate, cstr
+from webnotes.utils import load_json, nowdate, cstr
from webnotes.model.code import get_obj
from webnotes.model.doc import Document
-from webnotes import session, msgprint
+from webnotes import msgprint
from webnotes.model.wrapper import getlist, copy_doclist
sql = webnotes.conn.sql
-get_value = webnotes.conn.get_value
-# -----------------------------------------------------------------------------------------
class DocType:
def __init__(self, doc, doclist=[]):
self.doc = doc
diff --git a/utilities/doctype/trash_control/trash_control.py b/utilities/doctype/trash_control/trash_control.py
index 8d0e02c..50edbf5 100644
--- a/utilities/doctype/trash_control/trash_control.py
+++ b/utilities/doctype/trash_control/trash_control.py
@@ -14,24 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Please edit this list and import only required elements
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, 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.utils import now
from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, getchildren, make_autoname
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, msgprint, errprint
+from webnotes.model.wrapper import copy_doclist
+from webnotes.model.code import get_obj
-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
-# -----------------------------------------------------------------------------------------
class DocType:
diff --git a/utilities/page/questions/questions.py b/utilities/page/questions/questions.py
index 459a32f..b38bc1e 100644
--- a/utilities/page/questions/questions.py
+++ b/utilities/page/questions/questions.py
@@ -17,7 +17,7 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import load_json, cint, cstr
+from webnotes.utils import load_json
import json
@webnotes.whitelist()
diff --git a/utilities/transaction_base.py b/utilities/transaction_base.py
index 37b818e..3f47237 100644
--- a/utilities/transaction_base.py
+++ b/utilities/transaction_base.py
@@ -16,11 +16,9 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.utils import load_json, cint, cstr, flt, get_defaults
-from webnotes.model.doc import Document, addchild, getchildren
-from webnotes.model.wrapper import getlist, copy_doclist
-from webnotes.model.code import get_obj
-from webnotes import msgprint
+from webnotes.utils import load_json, cstr, flt, get_defaults
+from webnotes.model.doc import addchild
+from webnotes.model.wrapper import copy_doclist
class TransactionBase:
diff --git a/website/product.py b/website/product.py
index 1c0d6d9..fd471cb 100644
--- a/website/product.py
+++ b/website/product.py
@@ -12,7 +12,7 @@
}
"""
import webnotes
- from webnotes.utils import cstr, cint
+ from webnotes.utils import cstr
if not args: args = webnotes.form_dict
diff --git a/website/utils.py b/website/utils.py
index 5393a3d..dae998d 100644
--- a/website/utils.py
+++ b/website/utils.py
@@ -16,7 +16,6 @@
from __future__ import unicode_literals
import webnotes
-from webnotes.model.doc import Document
def scrub_page_name(page_name):
if page_name.endswith('.html'):