From 0fd99e75365425aecb7e6803c3830c69a2cc98af Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 30 Nov 2012 16:38:04 +0530 Subject: [PATCH] removed unnecessary imports --- accounts/doctype/account/account.py | 10 +++------- .../bank_reconciliation/bank_reconciliation.py | 13 +++---------- .../doctype/budget_control/budget_control.py | 15 ++++----------- accounts/doctype/c_form/c_form.py | 9 +++------ accounts/doctype/form_16a/form_16a.py | 14 ++++---------- accounts/doctype/gl_control/gl_control.py | 10 +++------- accounts/doctype/gl_entry/gl_entry.py | 15 ++++----------- .../doctype/journal_voucher/journal_voucher.py | 14 ++++---------- .../journal_voucher/test_journal_voucher.py | 1 - accounts/doctype/mis_control/mis_control.py | 13 +++---------- .../payment_to_invoice_matching_tool.py | 14 ++++---------- .../period_closing_voucher.py | 16 +++++----------- accounts/doctype/pos_setting/pos_setting.py | 13 ++----------- .../doctype/purchase_invoice/purchase_invoice.py | 14 ++++---------- .../purchase_taxes_and_charges_master.py | 13 ++----------- accounts/doctype/sales_invoice/sales_invoice.py | 12 ++++-------- accounts/doctype/tds_category/tds_category.py | 12 +----------- accounts/doctype/tds_control/tds_control.py | 12 ++---------- accounts/doctype/tds_payment/tds_payment.py | 13 +++---------- .../trend_analyzer_control.py | 13 ++----------- .../voucher_import_tool/voucher_import_tool.py | 3 +-- .../purchase_register/purchase_register.py | 2 +- .../sales_register/sales_register.py | 2 +- .../yearly_transaction_summary.py | 3 +-- .../doctype/purchase_common/purchase_common.py | 14 ++++---------- buying/doctype/purchase_order/purchase_order.py | 14 ++++---------- .../doctype/purchase_request/purchase_request.py | 14 ++++---------- .../quality_inspection/quality_inspection.py | 13 ++----------- buying/doctype/supplier/supplier.py | 6 ++---- controllers/transaction_controller.py | 6 ++---- home/doctype/company_control/company_control.py | 15 ++++----------- home/doctype/feed/feed.py | 12 +----------- home/doctype/home_control/home_control.py | 12 ++++-------- hr/doctype/appraisal/appraisal.py | 3 +-- hr/doctype/attendance/attendance.py | 15 ++++----------- .../attendance_control_panel.py | 14 +++----------- hr/doctype/employee/employee.py | 2 +- hr/doctype/expense_claim/expense_claim.py | 13 +++---------- hr/doctype/holiday_list/holiday_list.py | 15 ++++----------- hr/doctype/leave_allocation/leave_allocation.py | 2 -- .../leave_application/leave_application.py | 14 +++----------- .../leave_control_panel/leave_control_panel.py | 16 +++++----------- hr/doctype/salary_manager/salary_manager.py | 13 ++++--------- hr/doctype/salary_slip/salary_slip.py | 14 ++++---------- hr/doctype/salary_structure/salary_structure.py | 15 ++++----------- patches/before_jan_2012/index_patch.py | 2 +- patches/jan_mar_2012/rename_dt.py | 1 - patches/jan_mar_2012/website/feed.py | 1 - production/doctype/bom/bom.py | 9 +++------ production/doctype/bom_control/bom_control.py | 12 ++---------- .../production_control/production_control.py | 16 +++++----------- .../doctype/production_order/production_order.py | 16 +++++----------- .../production_planning_tool.py | 4 ++-- production/doctype/workstation/workstation.py | 13 ++----------- projects/doctype/project/project.py | 15 ++++----------- .../doctype/project_control/project_control.py | 14 +++----------- projects/doctype/task/task.py | 11 +++-------- projects/doctype/timesheet/timesheet.py | 12 ++---------- sandbox/test_leave.py | 3 --- sandbox/test_stock_entry.py | 3 --- sandbox/test_stock_reco.py | 3 --- selling/doctype/customer/customer.py | 4 +--- .../installation_note/installation_note.py | 14 ++++---------- selling/doctype/lead/lead.py | 3 +-- selling/doctype/opportunity/opportunity.py | 8 +++----- selling/doctype/plot_control/plot_control.py | 13 ++----------- selling/doctype/quotation/quotation.py | 14 ++++---------- selling/doctype/sales_common/sales_common.py | 13 ++++--------- selling/doctype/sales_order/sales_order.py | 13 +++---------- selling/doctype/sms_center/sms_center.py | 15 ++++----------- .../authorization_control.py | 12 ++---------- .../authorization_rule/authorization_rule.py | 14 +++----------- setup/doctype/company/company.py | 15 +++++---------- setup/doctype/contact_control/contact_control.py | 15 +++++---------- setup/doctype/customer_group/customer_group.py | 13 ++----------- setup/doctype/email_settings/email_settings.py | 2 +- setup/doctype/item_group/item_group.py | 2 -- setup/doctype/naming_series/naming_series.py | 4 ++-- .../notification_control/notification_control.py | 4 ---- .../permission_control/permission_control.py | 14 ++++---------- setup/doctype/print_heading/print_heading.py | 12 +----------- .../sales_browser_control.py | 16 +++++----------- setup/doctype/sales_partner/sales_partner.py | 12 +----------- setup/doctype/sales_person/sales_person.py | 1 - setup/doctype/setup_control/setup_control.py | 2 +- setup/doctype/territory/territory.py | 1 - setup/doctype/workflow_engine/workflow_engine.py | 12 ++---------- setup/doctype/workflow_rule/workflow_rule.py | 12 ++---------- startup/event_handlers.py | 1 - stock/doctype/bin/bin.py | 11 +++++------ stock/doctype/delivery_note/delivery_note.py | 13 +++---------- stock/doctype/item/item.py | 13 +++---------- stock/doctype/item/test_item.py | 1 - .../landed_cost_wizard/landed_cost_wizard.py | 3 +-- .../doctype/purchase_receipt/purchase_receipt.py | 14 ++++---------- .../sales_and_purchase_return_tool.py | 14 +++----------- stock/doctype/serial_no/serial_no.py | 4 +--- stock/doctype/stock_entry/stock_entry.py | 14 ++++---------- stock/doctype/stock_ledger/stock_ledger.py | 14 ++++---------- .../stock_ledger_entry/stock_ledger_entry.py | 3 --- .../stock_reconciliation/stock_reconciliation.py | 3 +-- .../stock_uom_replace_utility.py | 15 ++++----------- .../valuation_control/valuation_control.py | 1 - stock/doctype/warehouse/warehouse.py | 8 +++----- support/doctype/customer_issue/customer_issue.py | 13 ++----------- .../maintenance_schedule/maintenance_schedule.py | 14 ++++---------- .../maintenance_visit/maintenance_visit.py | 13 +++---------- support/doctype/support_ticket/support_ticket.py | 1 - utilities/doctype/address/address.py | 5 +---- utilities/doctype/contact/contact.py | 3 --- .../doctype/profile_control/profile_control.py | 14 +++----------- utilities/doctype/rename_tool/rename_tool.py | 1 - utilities/doctype/sms_control/sms_control.py | 7 ++----- utilities/doctype/trash_control/trash_control.py | 14 +++----------- utilities/page/questions/questions.py | 2 +- utilities/transaction_base.py | 8 +++----- website/product.py | 2 +- website/utils.py | 1 - 118 files changed, 280 insertions(+), 843 deletions(-) diff --git a/accounts/doctype/account/account.py b/accounts/doctype/account/account.py index 350ebbec2f..70c55e7215 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 2314e14816..35db6fbd0e 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 2f0a3f5492..75c938c958 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 d2c909333d..a1cc9e8373 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 d661f38458..4afd3619b5 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 358e5f01a8..9dec4d5b0d 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 e0de53d947..4e20f1b732 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 c9d76cdb50..450b8b8892 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 3f32dfafeb..e043e9f1c4 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 e25c585642..a860c821c7 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 7ffc8e4e38..005b981335 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 e751a757d3..80e993aff9 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 4a2cc1fc6d..7f820fee05 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 fc1d332ebe..cf34cf63ac 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 b40873a495..faf06fdfc3 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 2aa30fd77a..eb7268be66 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 c64d4bb385..3b23c38ac7 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 d9c654b4d5..1aaa2e5a78 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 b367b0d1ad..a3b008079e 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 e10d2cb961..f43542f109 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 3a50f9d70c..5f66c7acbd 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 9c33e2aaa9..93fc32393e 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 ef9374a4a2..f9cbc5d02a 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 1e163b322e..166d3133ad 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 0b57b62fe1..b2634b06fb 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 b09c4b5af9..c49c054948 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 4a9b96d626..f30b722142 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 8fb373a621..981bf43e41 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 fec18afe14..0251899f79 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 39a737697c..5d77472df7 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 8baf910147..c18610b7e4 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 c6cf50656f..6e4199b901 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 02be00ddcd..c20010953d 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 b2d0f9623f..b4b0e4e8c5 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 d0f698968c..3f45825ea5 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 0a2849485a..bc21f13ffe 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 e65258fe57..c0f7be3659 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 64b0da373a..66434bb812 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 ff342d0c4b..63b1af425c 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 1772f2c7bb..9e830b9f99 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 2f7e4a8dc0..dcc5b50535 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 2e1f13c809..cb10e71cfa 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 7dea5d02b5..d8f1288ae3 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 3a0396fca5..7886281ea4 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 d0b4e5b169..d07be6eb07 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 2203bac45a..7971fbf2b4 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 31a434cab6..c163b49631 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 b81569810f..eae887128e 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 913e7b6638..a413f6a6b8 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 c093ec51e0..27812a8c2d 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 4cb60309c9..b389e69413 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 fd9a614252..5314971555 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 e4c97c44c4..863e254754 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 414efd9321..fdd40222e3 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 5c0417be2c..3e334e84a3 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 33a535b60a..5601837614 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 89e12cda78..c390806f5a 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 ebabf094fc..775937ec17 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 2094bfdbd3..25601b7471 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 ec47b987d3..fe28880b93 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 b77401cbfe..ada85b48db 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 975dd89c79..ee5ef5492a 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 5de9557bbf..43f5286cf6 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 be11da42ad..d844b8d8fd 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 4f10c80431..82a6e8e4c7 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 3bb751fd05..55d3730e10 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 cef0abee23..3a547a0008 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 8ea4fe40fc..7f6ffe62e1 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 a511d4b3c1..410a6e1dfc 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 afc3a204f7..416b1ec4fa 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 a9aab67a77..360a4d02e6 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 dc18143546..a3646c06ae 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 ebf3eaee72..83c9f83404 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 b89eceda5d..ed90b9985b 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 2bcb5114d6..0f68521198 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 e17f55cb1c..b9880d2fbf 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 17e10bb8ae..2cec30dd1a 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 c40e932f31..a259c841d1 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 b40ba6e2b0..d6792f9e30 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 d7a80a828b..8162c39c56 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 171a152a10..87d21d7ffd 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 5eec24e604..331fe780a8 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 5bccd31392..f332196c1c 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 bf16a0fd23..41d5042945 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 a71fde95c4..3d7e11c1f5 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 284bd26429..59c0b3a5d4 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 82c2c7094b..f9e2cefbef 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 571adc417d..24b2add676 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 07205b8814..9cd1af94d4 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 039dd759b5..5e3e74af50 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 e5aa9090c3..5b756cf102 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 c906e471c6..92dc82b9f8 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 66adb83ca0..f7876a6cba 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 eb8fd8fbb3..4e8015d0f1 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 51b72723fb..84cf47b1dd 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 c55bf03cd6..92fa63e124 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 63b23ca902..b6f60f57f3 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 701f27dca3..29f58bc0bd 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 5deecdd732..3235c32d0c 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 645b7c95d1..32144353b8 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 9a806f64b7..7df4b1601f 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 0d736348cf..a02afe9fea 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 1318db66e5..3953f53da7 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 5f1a63dbde..38ba3879d3 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 bdd7ed605d..3d5dba655e 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 b17fe1158d..919616272e 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 bcf53f7556..bff7f96cae 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 e9b13bcc6c..89a58a6860 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 f9e53e7d31..08bf5cdbec 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 d9807330e8..0db4670b7e 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 e906f70efd..5f6b4d5530 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 b0d76719d2..79832fb87e 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 2be7546695..9b80d1eb31 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 8d0e02c257..50edbf5704 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 459a32fd8b..b38bc1ed42 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 37b818e08c..3f47237501 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 1c0d6d9995..fd471cb510 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 5393a3d157..dae998d29f 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'):