diff --git a/accounts/doctype/account/account.py b/accounts/doctype/account/account.py index 350ebbec2f3..70c55e72155 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 . -# 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 2314e14816a..35db6fbd0e5 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 . -# 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 2f0a3f54928..75c938c9586 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 . -# 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 d2c909333d6..a1cc9e8373e 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 . -# 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 d661f38458a..4afd3619b59 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 . -# 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 358e5f01a80..9dec4d5b0de 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 . -# 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 e0de53d947f..4e20f1b7321 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 . -# 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 c9d76cdb500..450b8b8892e 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 . -# 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 3f32dfafeb7..e043e9f1c4d 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 . -# 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 e25c585642b..a860c821c7c 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 . -# 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 7ffc8e4e385..005b981335f 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 . -# 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 e751a757d3e..80e993aff9a 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 . -# 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 4a2cc1fc6db..7f820fee05a 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 . -# 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 fc1d332ebe4..cf34cf63ac4 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 . -# 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 b40873a4950..faf06fdfc37 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 . -# 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 2aa30fd77af..eb7268be66c 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 . -# 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 c64d4bb3850..3b23c38ac7a 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 . -# 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 d9c654b4d55..1aaa2e5a787 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 . -# 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 b367b0d1ad5..a3b008079e7 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 . -# 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 e10d2cb9612..f43542f1091 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 . -# 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 3a50f9d70c3..5f66c7acbd8 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 map_fields(field_list, source, target): 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 9c33e2aaa91..93fc32393e3 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 ef9374a4a24..f9cbc5d02a4 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 1e163b322eb..166d3133ad8 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 @@ else: 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 0b57b62fe18..b2634b06fb7 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 . -# 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 b09c4b5af93..c49c0549489 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 . -# 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 4a9b96d6267..f30b7221424 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 . -# 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 8fb373a6215..981bf43e412 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 . -# 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 fec18afe14f..0251899f79b 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 . -# 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 39a737697cf..5d77472df7c 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 8baf910147f..c18610b7e44 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 . -# 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 c6cf50656fc..6e4199b9015 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 . -# 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 02be00ddcd1..c20010953d1 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 . -# 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 b2d0f9623f4..b4b0e4e8c5b 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 . -# 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 d0f698968cd..3f45825ea5f 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 . -# 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 0a2849485a2..bc21f13ffec 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 . -# 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 e65258fe577..c0f7be36597 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 64b0da373a1..66434bb8126 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 . -# 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 ff342d0c4b3..63b1af425c1 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 . -# 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 1772f2c7bb5..9e830b9f99c 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 . -# 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 2f7e4a8dc00..dcc5b50535f 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 . -# 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 2e1f13c8094..cb10e71cfa8 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 . -# 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 7dea5d02b51..d8f1288ae3c 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 . -# 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 3a0396fca5c..7886281ea4a 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 . -# 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 d0b4e5b1692..d07be6eb07a 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 . -# 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 2203bac45a0..7971fbf2b40 100644 --- a/patches/before_jan_2012/index_patch.py +++ b/patches/before_jan_2012/index_patch.py @@ -21,7 +21,7 @@ from __future__ import unicode_literals 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 31a434cab64..c163b496313 100644 --- a/patches/jan_mar_2012/rename_dt.py +++ b/patches/jan_mar_2012/rename_dt.py @@ -2,7 +2,6 @@ from __future__ import unicode_literals 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 b81569810fa..eae887128ef 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 913e7b66382..a413f6a6b82 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 c093ec51e0f..27812a8c2dc 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 . -# 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 4cb60309c91..b389e694137 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 . -# 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 fd9a6142524..53149715558 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 . -# 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 e4c97c44c47..863e254754f 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 414efd9321f..fdd40222e33 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 . -# 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 5c0417be2c8..3e334e84a32 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 . -# 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 33a535b60aa..56018376140 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 . -# 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 89e12cda788..c390806f5a8 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 . -# 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 ebabf094fc1..775937ec17e 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 . -# 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 2094bfdbd3c..25601b7471c 100644 --- a/sandbox/test_leave.py +++ b/sandbox/test_leave.py @@ -22,10 +22,7 @@ import webnotes.profile 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 ec47b987d34..fe28880b93a 100644 --- a/sandbox/test_stock_entry.py +++ b/sandbox/test_stock_entry.py @@ -22,10 +22,7 @@ import webnotes.profile 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 b77401cbfe1..ada85b48db9 100644 --- a/sandbox/test_stock_reco.py +++ b/sandbox/test_stock_reco.py @@ -22,10 +22,7 @@ import webnotes.profile 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 975dd89c797..ee5ef5492a1 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 . -# 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 5de9557bbf2..43f5286cf66 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 . -# 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 be11da42ad3..d844b8d8fdf 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 . -# 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 4f10c804318..82a6e8e4c77 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 . -# 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 3bb751fd052..55d3730e10d 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 . -# 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 cef0abee233..3a547a00088 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 . -# 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 8ea4fe40fcf..7f6ffe62e1a 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 . -# 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 a511d4b3c1d..410a6e1dfc3 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 . -# 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 afc3a204f7c..416b1ec4fa3 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 . -# 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 a9aab67a778..360a4d02e6d 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 . -# 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 dc18143546f..a3646c06ae3 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 . -# 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 ebf3eaee72d..83c9f83404c 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 . -# 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 b89eceda5d6..ed90b9985bf 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 2bcb5114d64..0f68521198b 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 . -# 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 e17f55cb1c3..b9880d2fbf2 100644 --- a/setup/doctype/email_settings/email_settings.py +++ b/setup/doctype/email_settings/email_settings.py @@ -18,7 +18,7 @@ from __future__ import unicode_literals 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 17e10bb8aeb..2cec30dd1ac 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 c40e932f315..a259c841d16 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 b40ba6e2b09..d6792f9e30c 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 . -# 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 d7a80a828b0..8162c39c566 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 . -# 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 171a152a107..87d21d7ffd3 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 . -# 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 5eec24e604a..331fe780a8b 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 . -# 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 5bccd313929..f332196c1cf 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 . -# 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 bf16a0fd230..41d50429458 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 . -# 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 a71fde95c43..3d7e11c1f58 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 284bd264292..59c0b3a5d41 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 . -# 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 82c2c7094b5..f9e2cefbeff 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 . -# 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 571adc417d6..24b2add6766 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 . -# 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 07205b8814e..9cd1af94d43 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 039dd759b52..5e3e74af504 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 . -# 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 e5aa9090c30..5b756cf1023 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 . -# 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 c906e471c61..92dc82b9f88 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 . -# 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 66adb83ca0c..f7876a6cbab 100644 --- a/stock/doctype/item/test_item.py +++ b/stock/doctype/item/test_item.py @@ -21,7 +21,6 @@ import copy 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 eb8fd8fbb32..4e8015d0f19 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 51b72723fba..84cf47b1dd4 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 . -# 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 c55bf03cd6e..92fa63e1247 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 . -# 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 63b23ca9020..b6f60f57f31 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 . -# 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 701f27dca33..29f58bc0bd3 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 . -# 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 5deecdd7328..3235c32d0c6 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 . -# 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 645b7c95d1f..32144353b8b 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 . -# 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 9a806f64b79..7df4b1601fa 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 0d736348cf3..a02afe9feac 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 . -# 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 1318db66e5e..3953f53da74 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 . -# 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 5f1a63dbde3..38ba3879d32 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 . -# 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 bdd7ed605db..3d5dba655e7 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 . -# 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 b17fe1158d8..919616272ec 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 . -# 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 bcf53f75567..bff7f96cae9 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 . -# 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 e9b13bcc6ce..89a58a68605 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 f9e53e7d31a..08bf5cdbec1 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 . -# 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 d9807330e8e..0db4670b7ea 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 . -# 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 e906f70efd8..5f6b4d55300 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 . -# 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 b0d76719d29..79832fb87e2 100644 --- a/utilities/doctype/rename_tool/rename_tool.py +++ b/utilities/doctype/rename_tool/rename_tool.py @@ -24,7 +24,6 @@ class DocType: 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 2be7546695c..9b80d1eb31b 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 . -# 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 8d0e02c2570..50edbf57043 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 . -# 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 459a32fd8be..b38bc1ed42c 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 37b818e08c1..3f47237501a 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 1c0d6d9995c..fd471cb510a 100644 --- a/website/product.py +++ b/website/product.py @@ -12,7 +12,7 @@ def get_product_list(args=None): } """ 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 5393a3d157c..dae998d29f5 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'):