From 164a2ad28db541e1f68b0e9f4913991b067c721a Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Mon, 20 Sep 2021 04:33:30 +0530 Subject: [PATCH 001/200] fix: Calculate depreciation_left accurately --- erpnext/assets/doctype/asset/asset.py | 20 +++++++++++++++++--- erpnext/regional/india/utils.py | 5 +++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 8ff4f9790aa..7861c7e371f 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -221,7 +221,7 @@ class Asset(AccountsController): # If depreciation is already completed (for double declining balance) if skip_row: continue - depreciation_amount = get_depreciation_amount(self, value_after_depreciation, d) + depreciation_amount = get_depreciation_amount(self, value_after_depreciation, d, date_of_sale) if not has_pro_rata or n < cint(number_of_pending_depreciations) - 1: schedule_date = add_months(d.depreciation_start_date, @@ -835,8 +835,8 @@ def get_total_days(date, frequency): return date_diff(date, period_start_date) @erpnext.allow_regional -def get_depreciation_amount(asset, depreciable_value, row): - depreciation_left = flt(row.total_number_of_depreciations) - flt(asset.number_of_depreciations_booked) +def get_depreciation_amount(asset, depreciable_value, row, date_of_sale=None): + depreciation_left = get_depreciation_left(asset, row, date_of_sale) if row.depreciation_method in ("Straight Line", "Manual"): # if the Depreciation Schedule is being prepared for the first time @@ -852,3 +852,17 @@ def get_depreciation_amount(asset, depreciable_value, row): depreciation_amount = flt(depreciable_value * (flt(row.rate_of_depreciation) / 100)) return depreciation_amount + +def get_depreciation_left(asset, row, date_of_sale): + if not date_of_sale: + return flt(row.total_number_of_depreciations) - flt(asset.number_of_depreciations_booked) + else: + if len(asset.finance_books) == 1: + return (flt(row.total_number_of_depreciations) - flt(asset.number_of_depreciations_booked)) - len(asset.schedules) + else: + depreciation_left = flt(row.total_number_of_depreciations) - flt(asset.number_of_depreciations_booked) + for schedule in asset.get('schedules'): + if schedule.finance_book == row.finance_book: + depreciation_left -= 1 + + return depreciation_left diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 903168d009f..b1cbe70d14b 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -14,6 +14,7 @@ from erpnext.controllers.taxes_and_totals import get_itemised_tax, get_itemised_ from erpnext.hr.utils import get_salary_assignment from erpnext.payroll.doctype.salary_structure.salary_structure import make_salary_slip from erpnext.regional.india import number_state_mapping, state_numbers, states +from erpnext.assets.doctype.asset.asset import get_depreciation_left GST_INVOICE_NUMBER_FORMAT = re.compile(r"^[a-zA-Z0-9\-/]+$") #alphanumeric and - / GSTIN_FORMAT = re.compile("^[0-9]{2}[A-Z]{4}[0-9A-Z]{1}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}[1-9A-Z]{1}[0-9A-Z]{1}$") @@ -842,8 +843,8 @@ def update_taxable_values(doc, method): diff = additional_taxes - total_charges doc.get('items')[item_count - 1].taxable_value += diff -def get_depreciation_amount(asset, depreciable_value, row): - depreciation_left = flt(row.total_number_of_depreciations) - flt(asset.number_of_depreciations_booked) +def get_depreciation_amount(asset, depreciable_value, row, date_of_sale=None): + depreciation_left = get_depreciation_left(asset, row, date_of_sale) if row.depreciation_method in ("Straight Line", "Manual"): # if the Depreciation Schedule is being prepared for the first time From 8396f24e70520eed6c6b73a90a7b92349cbb2139 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Mon, 20 Sep 2021 19:01:46 +0530 Subject: [PATCH 002/200] fix: Unlink PO on cancelling SO --- erpnext/controllers/accounts_controller.py | 49 ++++++++++++++++++- .../doctype/sales_order/sales_order.py | 6 +++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index b90db054b57..4da7a72b45e 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -19,7 +19,8 @@ from frappe.utils import ( get_link_to_form, getdate, nowdate, - today, + now, + today ) from six import text_type @@ -811,6 +812,52 @@ class AccountsController(TransactionBase): if frappe.db.get_single_value('Accounts Settings', 'unlink_advance_payment_on_cancelation_of_order'): unlink_ref_doc_from_payment_entries(self) + if self.doctype == "Sales Order": + self.unlink_ref_doc_from_po() + + def unlink_ref_doc_from_po(self): + print("\n"*5, "*"*50, "\n"*5) + + so_items = [] + for item in self.items: + so_items.append(item.name) + + print("SO Items: ", so_items) + + linked_po = frappe.get_all( + 'Purchase Order Item', + filters = { + 'sales_order': self.name, + 'sales_order_item': ['in', so_items], + 'docstatus': ['<', 2] + }, + pluck='parent' + ) + + print("Before unlinking: ", linked_po) + + if linked_po: + frappe.db.sql("""update `tabPurchase Order Item` + set sales_order = null, sales_order_item = null, + modified = %s, modified_by = %s + where sales_order = %s and sales_order_item in %s + and docstatus < 2""", (now(), frappe.session.user, self.name, so_items)) + + frappe.msgprint(_("Purchase Orders {0} are un-linked").format("\n".join(linked_po))) + + linked_po = frappe.get_all( + 'Purchase Order Item', + filters = { + 'sales_order': self.name, + 'sales_order_item': ['in', so_items], + 'docstatus': ['<', 2] + }, + pluck='parent' + ) + print("After unlinking: ", linked_po) + + print("\n"*5, "*"*50, "\n"*5) + def get_tax_map(self): tax_map = {} for tax in self.get('taxes'): diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 93676094218..4397d19dca1 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -209,6 +209,12 @@ class SalesOrder(SellingController): from erpnext.accounts.doctype.pricing_rule.utils import update_coupon_code_count update_coupon_code_count(self.coupon_code,'cancelled') + def cancel(self): + import pdb + + pdb.set_trace() + super(SalesOrder, self).cancel() + def update_project(self): if frappe.db.get_single_value('Selling Settings', 'sales_update_frequency') != "Each Transaction": return From e77534fe13a8384a066352f028eb26fb3520f26f Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Mon, 20 Sep 2021 19:01:46 +0530 Subject: [PATCH 003/200] fix: Unlink PO on cancelling SO --- erpnext/controllers/accounts_controller.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 8289b8a0807..075069c6e84 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -837,11 +837,16 @@ class AccountsController(TransactionBase): print("Before unlinking: ", linked_po) if linked_po: - frappe.db.sql("""update `tabPurchase Order Item` - set sales_order = null, sales_order_item = null, - modified = %s, modified_by = %s - where sales_order = %s and sales_order_item in %s - and docstatus < 2""", (now(), frappe.session.user, self.name, so_items)) + frappe.db.set_value( + 'Purchase Order Item', { + 'sales_order': self.name, + 'sales_order_item': ['in', so_items], + 'docstatus': ['<', 2] + },{ + 'sales_order': None, + 'sales_order_item': None + } + ) frappe.msgprint(_("Purchase Orders {0} are un-linked").format("\n".join(linked_po))) From 244d9dee044091ad3f27c6ddec32d2e45165363f Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 21 Sep 2021 06:06:21 +0530 Subject: [PATCH 004/200] fix: Correct expected_values --- erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 3720ac33bbd..e9eb6ca36a6 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -2214,7 +2214,7 @@ class TestSalesInvoice(unittest.TestCase): expected_values = [ ["2020-06-30", 1311.48, 1311.48], ["2021-06-30", 20000.0, 21311.48], - ["2021-09-30", 3966.76, 25278.24] + ["2021-09-30", 5041.1, 26352.58] ] for i, schedule in enumerate(asset.schedules): From 3c8879e777eccd5b4a0c61f9d932e421662848eb Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 21 Sep 2021 06:07:06 +0530 Subject: [PATCH 005/200] fix: Calculate depreciation_amount accurately --- erpnext/assets/doctype/asset/asset.py | 22 ++++------------------ erpnext/regional/india/utils.py | 7 +++---- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 7861c7e371f..01f4935feec 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -221,7 +221,7 @@ class Asset(AccountsController): # If depreciation is already completed (for double declining balance) if skip_row: continue - depreciation_amount = get_depreciation_amount(self, value_after_depreciation, d, date_of_sale) + depreciation_amount = get_depreciation_amount(self, value_after_depreciation, d) if not has_pro_rata or n < cint(number_of_pending_depreciations) - 1: schedule_date = add_months(d.depreciation_start_date, @@ -835,13 +835,13 @@ def get_total_days(date, frequency): return date_diff(date, period_start_date) @erpnext.allow_regional -def get_depreciation_amount(asset, depreciable_value, row, date_of_sale=None): - depreciation_left = get_depreciation_left(asset, row, date_of_sale) +def get_depreciation_amount(asset, depreciable_value, row): + depreciation_left = flt(row.total_number_of_depreciations) - flt(asset.number_of_depreciations_booked) if row.depreciation_method in ("Straight Line", "Manual"): # if the Depreciation Schedule is being prepared for the first time if not asset.flags.increase_in_asset_life: - depreciation_amount = (flt(row.value_after_depreciation) - + depreciation_amount = ((flt(asset.gross_purchase_amount) - flt(asset.opening_accumulated_depreciation)) - flt(row.expected_value_after_useful_life)) / depreciation_left # if the Depreciation Schedule is being modified after Asset Repair @@ -852,17 +852,3 @@ def get_depreciation_amount(asset, depreciable_value, row, date_of_sale=None): depreciation_amount = flt(depreciable_value * (flt(row.rate_of_depreciation) / 100)) return depreciation_amount - -def get_depreciation_left(asset, row, date_of_sale): - if not date_of_sale: - return flt(row.total_number_of_depreciations) - flt(asset.number_of_depreciations_booked) - else: - if len(asset.finance_books) == 1: - return (flt(row.total_number_of_depreciations) - flt(asset.number_of_depreciations_booked)) - len(asset.schedules) - else: - depreciation_left = flt(row.total_number_of_depreciations) - flt(asset.number_of_depreciations_booked) - for schedule in asset.get('schedules'): - if schedule.finance_book == row.finance_book: - depreciation_left -= 1 - - return depreciation_left diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index b1cbe70d14b..bfccb48c5a3 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -14,7 +14,6 @@ from erpnext.controllers.taxes_and_totals import get_itemised_tax, get_itemised_ from erpnext.hr.utils import get_salary_assignment from erpnext.payroll.doctype.salary_structure.salary_structure import make_salary_slip from erpnext.regional.india import number_state_mapping, state_numbers, states -from erpnext.assets.doctype.asset.asset import get_depreciation_left GST_INVOICE_NUMBER_FORMAT = re.compile(r"^[a-zA-Z0-9\-/]+$") #alphanumeric and - / GSTIN_FORMAT = re.compile("^[0-9]{2}[A-Z]{4}[0-9A-Z]{1}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}[1-9A-Z]{1}[0-9A-Z]{1}$") @@ -843,13 +842,13 @@ def update_taxable_values(doc, method): diff = additional_taxes - total_charges doc.get('items')[item_count - 1].taxable_value += diff -def get_depreciation_amount(asset, depreciable_value, row, date_of_sale=None): - depreciation_left = get_depreciation_left(asset, row, date_of_sale) +def get_depreciation_amount(asset, depreciable_value, row): + depreciation_left = flt(row.total_number_of_depreciations) - flt(asset.number_of_depreciations_booked) if row.depreciation_method in ("Straight Line", "Manual"): # if the Depreciation Schedule is being prepared for the first time if not asset.flags.increase_in_asset_life: - depreciation_amount = (flt(row.value_after_depreciation) - + depreciation_amount = ((flt(asset.gross_purchase_amount) - flt(asset.opening_accumulated_depreciation)) - flt(row.expected_value_after_useful_life)) / depreciation_left # if the Depreciation Schedule is being modified after Asset Repair From 700e78d69b2e4e8f12dafc20e536b08c99cd2852 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 21 Sep 2021 07:03:12 +0530 Subject: [PATCH 006/200] fix: Remove extra brackets --- erpnext/assets/doctype/asset/asset.py | 2 +- erpnext/regional/india/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 01f4935feec..5c552f9850e 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -841,7 +841,7 @@ def get_depreciation_amount(asset, depreciable_value, row): if row.depreciation_method in ("Straight Line", "Manual"): # if the Depreciation Schedule is being prepared for the first time if not asset.flags.increase_in_asset_life: - depreciation_amount = ((flt(asset.gross_purchase_amount) - flt(asset.opening_accumulated_depreciation)) - + depreciation_amount = (flt(asset.gross_purchase_amount) - flt(asset.opening_accumulated_depreciation) - flt(row.expected_value_after_useful_life)) / depreciation_left # if the Depreciation Schedule is being modified after Asset Repair diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 01742d11c3d..5c3a48e77bd 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -845,7 +845,7 @@ def get_depreciation_amount(asset, depreciable_value, row): if row.depreciation_method in ("Straight Line", "Manual"): # if the Depreciation Schedule is being prepared for the first time if not asset.flags.increase_in_asset_life: - depreciation_amount = ((flt(asset.gross_purchase_amount) - flt(asset.opening_accumulated_depreciation)) - + depreciation_amount = (flt(asset.gross_purchase_amount) - flt(asset.opening_accumulated_depreciation) - flt(row.expected_value_after_useful_life)) / depreciation_left # if the Depreciation Schedule is being modified after Asset Repair From 249672c35db9278e1c4027b2331e1b6b5ef8f7d2 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 21 Sep 2021 07:04:39 +0530 Subject: [PATCH 007/200] fix: Add depreciation_schedule details in create_asset() --- erpnext/assets/doctype/asset/test_asset.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 4cc9be5b05d..b4e891e06c1 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -704,9 +704,8 @@ def create_asset(**args): "calculate_depreciation": args.calculate_depreciation or 0, "gross_purchase_amount": 100000, "purchase_receipt_amount": 100000, - "expected_value_after_useful_life": 10000, "warehouse": args.warehouse or "_Test Warehouse - _TC", - "available_for_use_date": "2020-06-06", + "available_for_use_date": args.available_for_use_date or "2020-06-06", "location": "Test Location", "asset_owner": "Company", "is_existing_asset": 1 @@ -715,8 +714,10 @@ def create_asset(**args): if asset.calculate_depreciation: asset.append("finance_books", { "depreciation_method": "Straight Line", - "frequency_of_depreciation": 12, - "total_number_of_depreciations": 5 + "frequency_of_depreciation": args.frequency_of_depreciation or 12, + "total_number_of_depreciations": args.total_number_of_depreciations or 5, + "expected_value_after_useful_life": args.expected_value_after_useful_life or 0, + "depreciation_start_date": args.depreciation_start_date }) try: From 7ab3b9dd5a8877b1c1dff6eb1d5ab453b0a4c8f5 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 21 Sep 2021 07:07:00 +0530 Subject: [PATCH 008/200] fix: Add test for depreciation on sale of a depreciated Asset --- .../sales_invoice/test_sales_invoice.py | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index e9eb6ca36a6..1c75f5cc51d 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -2201,7 +2201,7 @@ class TestSalesInvoice(unittest.TestCase): def test_asset_depreciation_on_sale(self): """ - Tests if an Asset set to depreciate yearly on June 30, that gets sold on Sept 30, creates an additional depreciation entry on Sept 30. + Tests if an Asset set to depreciate yearly on June 30, that gets sold on Sept 30, creates an additional depreciation entry on its date of sale. """ create_asset_data() @@ -2223,6 +2223,32 @@ class TestSalesInvoice(unittest.TestCase): self.assertEqual(expected_values[i][2], schedule.accumulated_depreciation_amount) self.assertTrue(schedule.journal_entry) + def test_depreciation_on_sale_for_depreciated_asset(self): + """ + Tests if an Asset set to depreciate yearly on Dec 31, that gets sold on Dec 31 after two years, created an additional depreciation entry on its date of sale. + """ + + create_asset_data() + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, + available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, + expected_value_after_useful_life=10000, depreciation_start_date=getdate("2020-12-31"), submit=1) + + post_depreciation_entries(getdate("2021-09-30")) + + create_sales_invoice(item_code="Macbook Pro", asset=asset.name, qty=1, rate=90000, posting_date=getdate("2021-12-31")) + asset.load_from_db() + + expected_values = [ + ["2020-12-31", 30000, 30000], + ["2021-12-31", 30000, 60000] + ] + + for i, schedule in enumerate(asset.schedules): + self.assertEqual(getdate(expected_values[i][0]), schedule.schedule_date) + self.assertEqual(expected_values[i][1], schedule.depreciation_amount) + self.assertEqual(expected_values[i][2], schedule.accumulated_depreciation_amount) + self.assertTrue(schedule.journal_entry) + def test_sales_invoice_against_supplier(self): from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import ( make_customer, From b9fb59da58aa4ac5f0e287fcdce7d2993d9af9c7 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Sat, 25 Sep 2021 19:04:16 +0530 Subject: [PATCH 009/200] fix: Reset depreciation schedule on returning asset --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 4 ++-- erpnext/assets/doctype/asset/asset.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index ca6a77a2af7..64cbd24e9f0 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1015,7 +1015,7 @@ class SalesInvoice(SellingController): def depreciate_asset(self, asset): asset.flags.ignore_validate_update_after_submit = True - asset.prepare_depreciation_data(self.posting_date) + asset.prepare_depreciation_data(date_of_sale=self.posting_date) asset.save() post_depreciation_entries(self.posting_date) @@ -1024,7 +1024,7 @@ class SalesInvoice(SellingController): asset.flags.ignore_validate_update_after_submit = True # recreate original depreciation schedule of the asset - asset.prepare_depreciation_data() + asset.prepare_depreciation_data(date_of_return=self.posting_date) self.modify_depreciation_schedule_for_asset_repairs(asset) asset.save() diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 5c552f9850e..653fa662fd0 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -75,12 +75,12 @@ class Asset(AccountsController): if self.is_existing_asset and self.purchase_invoice: frappe.throw(_("Purchase Invoice cannot be made against an existing asset {0}").format(self.name)) - def prepare_depreciation_data(self, date_of_sale=None): + def prepare_depreciation_data(self, date_of_sale=None, date_of_return=None): if self.calculate_depreciation: self.value_after_depreciation = 0 self.set_depreciation_rate() self.make_depreciation_schedule(date_of_sale) - self.set_accumulated_depreciation(date_of_sale) + self.set_accumulated_depreciation(date_of_sale, date_of_return) else: self.finance_books = [] self.value_after_depreciation = (flt(self.gross_purchase_amount) - @@ -406,7 +406,7 @@ class Asset(AccountsController): frappe.throw(_("Depreciation Row {0}: Next Depreciation Date cannot be before Available-for-use Date") .format(row.idx)) - def set_accumulated_depreciation(self, date_of_sale=None, ignore_booked_entry = False): + def set_accumulated_depreciation(self, date_of_sale=None, date_of_return=None, ignore_booked_entry = False): straight_line_idx = [d.idx for d in self.get("schedules") if d.depreciation_method == 'Straight Line'] finance_books = [] @@ -423,7 +423,7 @@ class Asset(AccountsController): value_after_depreciation -= flt(depreciation_amount) # for the last row, if depreciation method = Straight Line - if straight_line_idx and i == max(straight_line_idx) - 1 and not date_of_sale: + if straight_line_idx and i == max(straight_line_idx) - 1 and not date_of_sale and not date_of_return: book = self.get('finance_books')[cint(d.finance_book_id) - 1] depreciation_amount += flt(value_after_depreciation - flt(book.expected_value_after_useful_life), d.precision("depreciation_amount")) From 796ed947ce2217496706bf00e7c3ddf8c4fc2e3a Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Sat, 25 Sep 2021 19:11:29 +0530 Subject: [PATCH 010/200] fix: Reverse depreciation entry made on sale if asset that was set to be sold in the future gets returned --- .../doctype/sales_invoice/sales_invoice.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 64cbd24e9f0..e969aa6cc4d 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -952,6 +952,7 @@ class SalesInvoice(SellingController): asset.db_set("disposal_date", None) if asset.calculate_depreciation: + self.reverse_depreciation_entry_made_after_sale(asset) self.reset_depreciation_schedule(asset) else: @@ -1029,8 +1030,6 @@ class SalesInvoice(SellingController): self.modify_depreciation_schedule_for_asset_repairs(asset) asset.save() - self.delete_depreciation_entry_made_after_sale(asset) - def modify_depreciation_schedule_for_asset_repairs(self, asset): asset_repairs = frappe.get_all( 'Asset Repair', @@ -1044,7 +1043,7 @@ class SalesInvoice(SellingController): asset_repair.modify_depreciation_schedule() asset.prepare_depreciation_data() - def delete_depreciation_entry_made_after_sale(self, asset): + def reverse_depreciation_entry_made_after_sale(self, asset): from erpnext.accounts.doctype.journal_entry.journal_entry import make_reverse_journal_entry posting_date_of_original_invoice = self.get_posting_date_of_sales_invoice() @@ -1059,7 +1058,8 @@ class SalesInvoice(SellingController): row += 1 if schedule.schedule_date == posting_date_of_original_invoice: - if not self.sale_was_made_on_original_schedule_date(asset, schedule, row, posting_date_of_original_invoice): + if not self.sale_was_made_on_original_schedule_date(asset, schedule, row, posting_date_of_original_invoice) \ + or self.sale_happens_in_the_future(posting_date_of_original_invoice): reverse_journal_entry = make_reverse_journal_entry(schedule.journal_entry) reverse_journal_entry.posting_date = nowdate() reverse_journal_entry.submit() @@ -1078,6 +1078,12 @@ class SalesInvoice(SellingController): return True return False + def sale_happens_in_the_future(self, posting_date_of_original_invoice): + if posting_date_of_original_invoice > getdate(): + return True + + return False + @property def enable_discount_accounting(self): if not hasattr(self, "_enable_discount_accounting"): From fdd9e6cc3c62a85573b7f02ff4940046d572e92b Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Mon, 27 Sep 2021 22:14:16 +0530 Subject: [PATCH 011/200] fix: Replace asset.schedules with asset.get('schedules') --- erpnext/assets/doctype/asset/asset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 653fa662fd0..0138a1282a8 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -187,7 +187,7 @@ class Asset(AccountsController): d.precision("rate_of_depreciation")) def make_depreciation_schedule(self, date_of_sale): - if 'Manual' not in [d.depreciation_method for d in self.finance_books] and not self.schedules: + if 'Manual' not in [d.depreciation_method for d in self.finance_books] and not self.get('schedules'): self.schedules = [] if not self.available_for_use_date: From 40ec2d622baeb43f45086fcb7298457100a94f40 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Mon, 27 Sep 2021 22:14:42 +0530 Subject: [PATCH 012/200] fix: Add tests for depreciation --- erpnext/assets/doctype/asset/test_asset.py | 256 ++++++++++++++++++++- 1 file changed, 252 insertions(+), 4 deletions(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index b4e891e06c1..e747204a696 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -276,6 +276,7 @@ class TestAsset(unittest.TestCase): self.assertEqual(gle, expected_gle) self.assertEqual(asset.get("value_after_depreciation"), 0) + # WDV: Written Down Value def test_depreciation_entry_for_wdv_without_pro_rata(self): pr = make_purchase_receipt(item_code="Macbook Pro", qty=1, rate=8000.0, location="Test Location") @@ -479,6 +480,7 @@ class TestAsset(unittest.TestCase): self.assertTrue(asset.finance_books[0].expected_value_after_useful_life >= asset_value_after_full_schedule) + # CWIP: Capital Work In Progress def test_cwip_accounting(self): pr = make_purchase_receipt(item_code="Macbook Pro", qty=1, rate=5000, do_not_submit=True, location="Test Location") @@ -676,6 +678,249 @@ class TestAsset(unittest.TestCase): # reset indian company frappe.flags.company = company_flag + def test_depreciation_without_pro_rata(self): + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, + available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, + expected_value_after_useful_life=10000, depreciation_start_date=getdate("2020-12-31"), submit=1) + + expected_values = [ + ["2020-12-31", 30000, 30000], + ["2021-12-31", 30000, 60000], + ["2022-12-31", 30000, 90000] + ] + + for i, schedule in enumerate(asset.schedules): + self.assertEqual(getdate(expected_values[i][0]), schedule.schedule_date) + self.assertEqual(expected_values[i][1], schedule.depreciation_amount) + self.assertEqual(expected_values[i][2], schedule.accumulated_depreciation_amount) + + def test_depreciation_with_pro_rata(self): + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, + available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, + expected_value_after_useful_life=10000, depreciation_start_date=getdate("2020-07-01"), submit=1) + + expected_values = [ + ["2020-07-01", 15000, 15000], + ["2021-07-01", 30000, 45000], + ["2022-07-01", 30000, 75000], + ["2022-12-31", 15000, 90000] + ] + + for i, schedule in enumerate(asset.schedules): + self.assertEqual(getdate(expected_values[i][0]), schedule.schedule_date) + self.assertEqual(expected_values[i][1], schedule.depreciation_amount) + self.assertEqual(expected_values[i][2], schedule.accumulated_depreciation_amount) + + def test_get_depreciation_amount(self): + """Tests if get_depreciation_amount() returns the right value.""" + + from erpnext.assets.doctype.asset.asset import get_depreciation_amount + + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, + available_for_use_date=getdate("2019-12-31")) + + asset.finance_books = [] + asset.append("finance_books", { + "depreciation_method": "Straight Line", + "frequency_of_depreciation": 12, + "total_number_of_depreciations": 3, + "expected_value_after_useful_life": 10000, + "depreciation_start_date": getdate("2020-12-31") + }) + + depreciation_amount = get_depreciation_amount(asset, 100000, asset.finance_books[0]) + self.assertEqual(depreciation_amount, 30000) + + def test_make_depreciation_schedule(self): + """Tests if make_depreciation_schedule() returns the right values.""" + + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, + available_for_use_date=getdate("2019-12-31"), do_not_save=1) + + asset.finance_books = [] + asset.append("finance_books", { + "depreciation_method": "Straight Line", + "frequency_of_depreciation": 12, + "total_number_of_depreciations": 3, + "expected_value_after_useful_life": 10000, + "depreciation_start_date": getdate("2020-12-31") + }) + + asset.make_depreciation_schedule(date_of_sale=None) + + expected_values = [ + ['2020-12-31', 30000.0], + ['2021-12-31', 30000.0], + ['2022-12-31', 30000.0] + ] + + for i, schedule in enumerate(asset.schedules): + self.assertEqual(getdate(expected_values[i][0]), schedule.schedule_date) + self.assertEqual(expected_values[i][1], schedule.depreciation_amount) + + def test_set_accumulated_depreciation(self): + """Tests if set_accumulated_depreciation() returns the right values.""" + + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, + available_for_use_date=getdate("2019-12-31"), do_not_save=1) + + asset.finance_books = [] + asset.append("finance_books", { + "depreciation_method": "Straight Line", + "frequency_of_depreciation": 12, + "total_number_of_depreciations": 3, + "expected_value_after_useful_life": 10000, + "depreciation_start_date": getdate("2020-12-31") + }) + + asset.make_depreciation_schedule(date_of_sale=None) + asset.set_accumulated_depreciation() + + expected_values = [30000.0, 60000.0, 90000.0] + + for i, schedule in enumerate(asset.schedules): + self.assertEqual(expected_values[i], schedule.accumulated_depreciation_amount) + + def test_check_is_pro_rata(self): + """Tests if check_is_pro_rata() returns the right value(i.e. checks if has_pro_rata is accurate).""" + + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, + available_for_use_date=getdate("2019-12-31"), do_not_save=1) + + asset.finance_books = [] + asset.append("finance_books", { + "depreciation_method": "Straight Line", + "frequency_of_depreciation": 12, + "total_number_of_depreciations": 3, + "expected_value_after_useful_life": 10000, + "depreciation_start_date": getdate("2020-12-31") + }) + + has_pro_rata = asset.check_is_pro_rata(asset.finance_books[0]) + self.assertFalse(has_pro_rata) + + asset.finance_books = [] + asset.append("finance_books", { + "depreciation_method": "Straight Line", + "frequency_of_depreciation": 12, + "total_number_of_depreciations": 3, + "expected_value_after_useful_life": 10000, + "depreciation_start_date": getdate("2020-07-01") + }) + + has_pro_rata = asset.check_is_pro_rata(asset.finance_books[0]) + self.assertTrue(has_pro_rata) + + def test_expected_value_after_useful_life(self): + """Tests if an error is raised when expected_value_after_useful_life(110,000) > gross_purchase_amount(100,000).""" + + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, + available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, + expected_value_after_useful_life=110000, depreciation_start_date=getdate("2020-07-01"), do_not_save=1) + + self.assertRaises(frappe.ValidationError, asset.save) + + def test_depreciation_start_date(self): + """Tests if an error is raised when neither depreciation_start_date nor available_for_use_date are specified.""" + + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, + total_number_of_depreciations=3, expected_value_after_useful_life=110000, do_not_save=1) + + self.assertRaises(frappe.ValidationError, asset.save) + + def test_opening_accumulated_depreciation(self): + """Tests if an error is raised when opening_accumulated_depreciation > (gross_purchase_amount - expected_value_after_useful_life).""" + + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, + available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, + expected_value_after_useful_life=10000, depreciation_start_date=getdate("2020-07-01"), + opening_accumulated_depreciation=100000, do_not_save=1) + + self.assertRaises(frappe.ValidationError, asset.save) + + def test_number_of_depreciations_booked(self): + """Tests if an error is raised when number_of_depreciations_booked is not specified when opening_accumulated_depreciation is.""" + + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, + available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, + expected_value_after_useful_life=10000, depreciation_start_date=getdate("2020-07-01"), + opening_accumulated_depreciation=10000, do_not_save=1) + + self.assertRaises(frappe.ValidationError, asset.save) + + def test_number_of_depreciations(self): + """Tests if an error is raised when number_of_depreciations_booked > total_number_of_depreciations.""" + + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, + available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, + expected_value_after_useful_life=10000, depreciation_start_date=getdate("2020-07-01"), + opening_accumulated_depreciation=10000, number_of_depreciations_booked=5, + do_not_save=1) + + self.assertRaises(frappe.ValidationError, asset.save) + + def test_depreciation_start_date_is_before_purchase_date(self): + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, + available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, + expected_value_after_useful_life=10000, depreciation_start_date=getdate("2014-07-01"), + do_not_save=1) + + self.assertRaises(frappe.ValidationError, asset.save) + + def test_depreciation_start_date_is_before_available_for_use_date(self): + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, + available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, + expected_value_after_useful_life=10000, depreciation_start_date=getdate("2018-07-01"), + do_not_save=1) + + self.assertRaises(frappe.ValidationError, asset.save) + + def test_post_depreciation_entries(self): + """Tests if post_depreciation_entries() works as expected.""" + + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, + available_for_use_date=getdate("2019-12-31"), do_not_save=1) + + asset.finance_books = [] + asset.append("finance_books", { + "depreciation_method": "Straight Line", + "frequency_of_depreciation": 12, + "total_number_of_depreciations": 3, + "expected_value_after_useful_life": 10000, + "depreciation_start_date": getdate("2020-12-31") + }) + asset.submit() + + post_depreciation_entries(date="2021-06-01") + asset.load_from_db() + + self.assertTrue(asset.schedules[0].journal_entry) + self.assertFalse(asset.schedules[1].journal_entry) + self.assertFalse(asset.schedules[2].journal_entry) + + def test_clear_depreciation_schedule(self): + """Tests if clear_depreciation_schedule() works as expected.""" + + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, + available_for_use_date=getdate("2019-12-31"), do_not_save=1) + + asset.finance_books = [] + asset.append("finance_books", { + "depreciation_method": "Straight Line", + "frequency_of_depreciation": 12, + "total_number_of_depreciations": 3, + "expected_value_after_useful_life": 10000, + "depreciation_start_date": getdate("2020-12-31") + }) + asset.submit() + + post_depreciation_entries(date="2021-06-01") + asset.load_from_db() + + asset.clear_depreciation_schedule() + + self.assertEqual(len(asset.schedules), 1) + def create_asset_data(): if not frappe.db.exists("Asset Category", "Computers"): create_asset_category() @@ -702,6 +947,8 @@ def create_asset(**args): "company": args.company or"_Test Company", "purchase_date": "2015-01-01", "calculate_depreciation": args.calculate_depreciation or 0, + "opening_accumulated_depreciation": args.opening_accumulated_depreciation or 0, + "number_of_depreciations_booked": args.number_of_depreciations_booked or 0, "gross_purchase_amount": 100000, "purchase_receipt_amount": 100000, "warehouse": args.warehouse or "_Test Warehouse - _TC", @@ -720,10 +967,11 @@ def create_asset(**args): "depreciation_start_date": args.depreciation_start_date }) - try: - asset.save() - except frappe.DuplicateEntryError: - pass + if not args.do_not_save: + try: + asset.save() + except frappe.DuplicateEntryError: + pass if args.submit: asset.submit() From c84c983073943ae711100b265a981dfdc73c5fd6 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 28 Sep 2021 01:22:38 +0530 Subject: [PATCH 013/200] fix: Categorize into test suites --- erpnext/assets/doctype/asset/test_asset.py | 621 +++++++++++---------- 1 file changed, 312 insertions(+), 309 deletions(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index e747204a696..b5488750eba 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -20,13 +20,13 @@ from erpnext.stock.doctype.purchase_receipt.purchase_receipt import ( ) from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_purchase_receipt - -class TestAsset(unittest.TestCase): +class AssetSetup(unittest.TestCase): def setUp(self): set_depreciation_settings_in_company() create_asset_data() frappe.db.sql("delete from `tabTax Rule`") +class TestAsset(AssetSetup): def test_purchase_asset(self): pr = make_purchase_receipt(item_code="Macbook Pro", qty=1, rate=100000.0, location="Test Location") @@ -89,287 +89,6 @@ class TestAsset(unittest.TestCase): doc.set_missing_values() self.assertEqual(doc.items[0].is_fixed_asset, 1) - def test_schedule_for_straight_line_method(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=100000.0, location="Test Location") - - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.available_for_use_date = '2030-01-01' - asset.purchase_date = '2030-01-01' - - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Straight Line", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 12, - "depreciation_start_date": "2030-12-31" - }) - asset.save() - - self.assertEqual(asset.status, "Draft") - expected_schedules = [ - ["2030-12-31", 30000.00, 30000.00], - ["2031-12-31", 30000.00, 60000.00], - ["2032-12-31", 30000.00, 90000.00] - ] - - schedules = [[cstr(d.schedule_date), d.depreciation_amount, d.accumulated_depreciation_amount] - for d in asset.get("schedules")] - - self.assertEqual(schedules, expected_schedules) - - def test_schedule_for_straight_line_method_for_existing_asset(self): - create_asset(is_existing_asset=1) - asset = frappe.get_doc("Asset", {"asset_name": "Macbook Pro 1"}) - asset.calculate_depreciation = 1 - asset.number_of_depreciations_booked = 1 - asset.opening_accumulated_depreciation = 40000 - asset.available_for_use_date = "2030-06-06" - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Straight Line", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 12, - "depreciation_start_date": "2030-12-31" - }) - self.assertEqual(asset.status, "Draft") - asset.save() - expected_schedules = [ - ["2030-12-31", 14246.58, 54246.58], - ["2031-12-31", 25000.00, 79246.58], - ["2032-06-06", 10753.42, 90000.00] - ] - schedules = [[cstr(d.schedule_date), flt(d.depreciation_amount, 2), d.accumulated_depreciation_amount] - for d in asset.get("schedules")] - - self.assertEqual(schedules, expected_schedules) - - def test_schedule_for_double_declining_method(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=100000.0, location="Test Location") - - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.available_for_use_date = '2030-01-01' - asset.purchase_date = '2030-01-01' - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Double Declining Balance", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 12, - "depreciation_start_date": '2030-12-31' - }) - asset.save() - self.assertEqual(asset.status, "Draft") - - expected_schedules = [ - ['2030-12-31', 66667.00, 66667.00], - ['2031-12-31', 22222.11, 88889.11], - ['2032-12-31', 1110.89, 90000.0] - ] - - schedules = [[cstr(d.schedule_date), d.depreciation_amount, d.accumulated_depreciation_amount] - for d in asset.get("schedules")] - - self.assertEqual(schedules, expected_schedules) - - def test_schedule_for_double_declining_method_for_existing_asset(self): - create_asset(is_existing_asset = 1) - asset = frappe.get_doc("Asset", {"asset_name": "Macbook Pro 1"}) - asset.calculate_depreciation = 1 - asset.is_existing_asset = 1 - asset.number_of_depreciations_booked = 1 - asset.opening_accumulated_depreciation = 50000 - asset.available_for_use_date = '2030-01-01' - asset.purchase_date = '2029-11-30' - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Double Declining Balance", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 12, - "depreciation_start_date": "2030-12-31" - }) - asset.save() - self.assertEqual(asset.status, "Draft") - - expected_schedules = [ - ["2030-12-31", 33333.50, 83333.50], - ["2031-12-31", 6666.50, 90000.0] - ] - - schedules = [[cstr(d.schedule_date), d.depreciation_amount, d.accumulated_depreciation_amount] - for d in asset.get("schedules")] - - self.assertEqual(schedules, expected_schedules) - - def test_schedule_for_prorated_straight_line_method(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=100000.0, location="Test Location") - - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.purchase_date = '2030-01-30' - asset.is_existing_asset = 0 - asset.available_for_use_date = "2030-01-30" - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Straight Line", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 12, - "depreciation_start_date": "2030-12-31" - }) - - asset.save() - - expected_schedules = [ - ["2030-12-31", 27534.25, 27534.25], - ["2031-12-31", 30000.0, 57534.25], - ["2032-12-31", 30000.0, 87534.25], - ["2033-01-30", 2465.75, 90000.0] - ] - - schedules = [[cstr(d.schedule_date), flt(d.depreciation_amount, 2), flt(d.accumulated_depreciation_amount, 2)] - for d in asset.get("schedules")] - - self.assertEqual(schedules, expected_schedules) - - def test_depreciation(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=100000.0, location="Test Location") - - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.purchase_date = '2020-01-30' - asset.available_for_use_date = "2020-01-30" - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Straight Line", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 10, - "depreciation_start_date": "2020-12-31" - }) - asset.submit() - asset.load_from_db() - self.assertEqual(asset.status, "Submitted") - - frappe.db.set_value("Company", "_Test Company", "series_for_depreciation_entry", "DEPR-") - post_depreciation_entries(date="2021-01-01") - asset.load_from_db() - - # check depreciation entry series - self.assertEqual(asset.get("schedules")[0].journal_entry[:4], "DEPR") - - expected_gle = ( - ("_Test Accumulated Depreciations - _TC", 0.0, 30000.0), - ("_Test Depreciations - _TC", 30000.0, 0.0) - ) - - gle = frappe.db.sql("""select account, debit, credit from `tabGL Entry` - where against_voucher_type='Asset' and against_voucher = %s - order by account""", asset.name) - - self.assertEqual(gle, expected_gle) - self.assertEqual(asset.get("value_after_depreciation"), 0) - - # WDV: Written Down Value - def test_depreciation_entry_for_wdv_without_pro_rata(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=8000.0, location="Test Location") - - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.available_for_use_date = '2030-01-01' - asset.purchase_date = '2030-01-01' - asset.append("finance_books", { - "expected_value_after_useful_life": 1000, - "depreciation_method": "Written Down Value", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 12, - "depreciation_start_date": "2030-12-31" - }) - asset.save(ignore_permissions=True) - - self.assertEqual(asset.finance_books[0].rate_of_depreciation, 50.0) - - expected_schedules = [ - ["2030-12-31", 4000.00, 4000.00], - ["2031-12-31", 2000.00, 6000.00], - ["2032-12-31", 1000.00, 7000.0], - ] - - schedules = [[cstr(d.schedule_date), flt(d.depreciation_amount, 2), flt(d.accumulated_depreciation_amount, 2)] - for d in asset.get("schedules")] - - self.assertEqual(schedules, expected_schedules) - - def test_pro_rata_depreciation_entry_for_wdv(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=8000.0, location="Test Location") - - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.available_for_use_date = '2030-06-06' - asset.purchase_date = '2030-01-01' - asset.append("finance_books", { - "expected_value_after_useful_life": 1000, - "depreciation_method": "Written Down Value", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 12, - "depreciation_start_date": "2030-12-31" - }) - asset.save(ignore_permissions=True) - - self.assertEqual(asset.finance_books[0].rate_of_depreciation, 50.0) - - expected_schedules = [ - ["2030-12-31", 2279.45, 2279.45], - ["2031-12-31", 2860.28, 5139.73], - ["2032-12-31", 1430.14, 6569.87], - ["2033-06-06", 430.13, 7000.0], - ] - - schedules = [[cstr(d.schedule_date), flt(d.depreciation_amount, 2), flt(d.accumulated_depreciation_amount, 2)] - for d in asset.get("schedules")] - - self.assertEqual(schedules, expected_schedules) - - def test_depreciation_entry_cancellation(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=100000.0, location="Test Location") - - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.available_for_use_date = '2020-06-06' - asset.purchase_date = '2020-06-06' - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Straight Line", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 10, - "depreciation_start_date": "2020-12-31" - }) - asset.submit() - post_depreciation_entries(date="2021-01-01") - - asset.load_from_db() - - # cancel depreciation entry - depr_entry = asset.get("schedules")[0].journal_entry - self.assertTrue(depr_entry) - frappe.get_doc("Journal Entry", depr_entry).cancel() - - asset.load_from_db() - depr_entry = asset.get("schedules")[0].journal_entry - self.assertFalse(depr_entry) - def test_scrap_asset(self): pr = make_purchase_receipt(item_code="Macbook Pro", qty=1, rate=100000.0, location="Test Location") @@ -412,7 +131,7 @@ class TestAsset(unittest.TestCase): self.assertFalse(asset.journal_entry_for_scrap) self.assertEqual(asset.status, "Partially Depreciated") - def test_asset_sale(self): + def test_gle_made_by_asset_sale(self): pr = make_purchase_receipt(item_code="Macbook Pro", qty=1, rate=100000.0, location="Test Location") @@ -456,30 +175,6 @@ class TestAsset(unittest.TestCase): si.cancel() self.assertEqual(frappe.db.get_value("Asset", asset.name, "status"), "Partially Depreciated") - def test_asset_expected_value_after_useful_life(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=100000.0, location="Test Location") - - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.available_for_use_date = '2020-06-06' - asset.purchase_date = '2020-06-06' - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Straight Line", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 10 - }) - asset.save() - accumulated_depreciation_after_full_schedule = \ - max(d.accumulated_depreciation_amount for d in asset.get("schedules")) - - asset_value_after_full_schedule = (flt(asset.gross_purchase_amount) - - flt(accumulated_depreciation_after_full_schedule)) - - self.assertTrue(asset.finance_books[0].expected_value_after_useful_life >= asset_value_after_full_schedule) - # CWIP: Capital Work In Progress def test_cwip_accounting(self): pr = make_purchase_receipt(item_code="Macbook Pro", @@ -639,6 +334,220 @@ class TestAsset(unittest.TestCase): frappe.db.set_value("Asset Category Account", name, "capital_work_in_progress_account", cwip_acc) frappe.db.get_value("Company", "_Test Company", "capital_work_in_progress_account", cwip_acc) +class TestDepreciationMethods(AssetSetup): + def test_schedule_for_straight_line_method(self): + pr = make_purchase_receipt(item_code="Macbook Pro", + qty=1, rate=100000.0, location="Test Location") + + asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') + asset = frappe.get_doc('Asset', asset_name) + asset.calculate_depreciation = 1 + asset.available_for_use_date = '2030-01-01' + asset.purchase_date = '2030-01-01' + + asset.append("finance_books", { + "expected_value_after_useful_life": 10000, + "depreciation_method": "Straight Line", + "total_number_of_depreciations": 3, + "frequency_of_depreciation": 12, + "depreciation_start_date": "2030-12-31" + }) + asset.save() + + self.assertEqual(asset.status, "Draft") + expected_schedules = [ + ["2030-12-31", 30000.00, 30000.00], + ["2031-12-31", 30000.00, 60000.00], + ["2032-12-31", 30000.00, 90000.00] + ] + + schedules = [[cstr(d.schedule_date), d.depreciation_amount, d.accumulated_depreciation_amount] + for d in asset.get("schedules")] + + self.assertEqual(schedules, expected_schedules) + + def test_schedule_for_straight_line_method_for_existing_asset(self): + create_asset(is_existing_asset=1) + asset = frappe.get_doc("Asset", {"asset_name": "Macbook Pro 1"}) + asset.calculate_depreciation = 1 + asset.number_of_depreciations_booked = 1 + asset.opening_accumulated_depreciation = 40000 + asset.available_for_use_date = "2030-06-06" + asset.append("finance_books", { + "expected_value_after_useful_life": 10000, + "depreciation_method": "Straight Line", + "total_number_of_depreciations": 3, + "frequency_of_depreciation": 12, + "depreciation_start_date": "2030-12-31" + }) + self.assertEqual(asset.status, "Draft") + asset.save() + expected_schedules = [ + ["2030-12-31", 14246.58, 54246.58], + ["2031-12-31", 25000.00, 79246.58], + ["2032-06-06", 10753.42, 90000.00] + ] + schedules = [[cstr(d.schedule_date), flt(d.depreciation_amount, 2), d.accumulated_depreciation_amount] + for d in asset.get("schedules")] + + self.assertEqual(schedules, expected_schedules) + + def test_schedule_for_double_declining_method(self): + pr = make_purchase_receipt(item_code="Macbook Pro", + qty=1, rate=100000.0, location="Test Location") + + asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') + asset = frappe.get_doc('Asset', asset_name) + asset.calculate_depreciation = 1 + asset.available_for_use_date = '2030-01-01' + asset.purchase_date = '2030-01-01' + asset.append("finance_books", { + "expected_value_after_useful_life": 10000, + "depreciation_method": "Double Declining Balance", + "total_number_of_depreciations": 3, + "frequency_of_depreciation": 12, + "depreciation_start_date": '2030-12-31' + }) + asset.save() + self.assertEqual(asset.status, "Draft") + + expected_schedules = [ + ['2030-12-31', 66667.00, 66667.00], + ['2031-12-31', 22222.11, 88889.11], + ['2032-12-31', 1110.89, 90000.0] + ] + + schedules = [[cstr(d.schedule_date), d.depreciation_amount, d.accumulated_depreciation_amount] + for d in asset.get("schedules")] + + self.assertEqual(schedules, expected_schedules) + + def test_schedule_for_double_declining_method_for_existing_asset(self): + create_asset(is_existing_asset = 1) + asset = frappe.get_doc("Asset", {"asset_name": "Macbook Pro 1"}) + asset.calculate_depreciation = 1 + asset.is_existing_asset = 1 + asset.number_of_depreciations_booked = 1 + asset.opening_accumulated_depreciation = 50000 + asset.available_for_use_date = '2030-01-01' + asset.purchase_date = '2029-11-30' + asset.append("finance_books", { + "expected_value_after_useful_life": 10000, + "depreciation_method": "Double Declining Balance", + "total_number_of_depreciations": 3, + "frequency_of_depreciation": 12, + "depreciation_start_date": "2030-12-31" + }) + asset.save() + self.assertEqual(asset.status, "Draft") + + expected_schedules = [ + ["2030-12-31", 33333.50, 83333.50], + ["2031-12-31", 6666.50, 90000.0] + ] + + schedules = [[cstr(d.schedule_date), d.depreciation_amount, d.accumulated_depreciation_amount] + for d in asset.get("schedules")] + + self.assertEqual(schedules, expected_schedules) + + def test_schedule_for_prorated_straight_line_method(self): + pr = make_purchase_receipt(item_code="Macbook Pro", + qty=1, rate=100000.0, location="Test Location") + + asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') + asset = frappe.get_doc('Asset', asset_name) + asset.calculate_depreciation = 1 + asset.purchase_date = '2030-01-30' + asset.is_existing_asset = 0 + asset.available_for_use_date = "2030-01-30" + asset.append("finance_books", { + "expected_value_after_useful_life": 10000, + "depreciation_method": "Straight Line", + "total_number_of_depreciations": 3, + "frequency_of_depreciation": 12, + "depreciation_start_date": "2030-12-31" + }) + + asset.save() + + expected_schedules = [ + ["2030-12-31", 27534.25, 27534.25], + ["2031-12-31", 30000.0, 57534.25], + ["2032-12-31", 30000.0, 87534.25], + ["2033-01-30", 2465.75, 90000.0] + ] + + schedules = [[cstr(d.schedule_date), flt(d.depreciation_amount, 2), flt(d.accumulated_depreciation_amount, 2)] + for d in asset.get("schedules")] + + self.assertEqual(schedules, expected_schedules) + + # WDV: Written Down Value method + def test_depreciation_entry_for_wdv_without_pro_rata(self): + pr = make_purchase_receipt(item_code="Macbook Pro", + qty=1, rate=8000.0, location="Test Location") + + asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') + asset = frappe.get_doc('Asset', asset_name) + asset.calculate_depreciation = 1 + asset.available_for_use_date = '2030-01-01' + asset.purchase_date = '2030-01-01' + asset.append("finance_books", { + "expected_value_after_useful_life": 1000, + "depreciation_method": "Written Down Value", + "total_number_of_depreciations": 3, + "frequency_of_depreciation": 12, + "depreciation_start_date": "2030-12-31" + }) + asset.save(ignore_permissions=True) + + self.assertEqual(asset.finance_books[0].rate_of_depreciation, 50.0) + + expected_schedules = [ + ["2030-12-31", 4000.00, 4000.00], + ["2031-12-31", 2000.00, 6000.00], + ["2032-12-31", 1000.00, 7000.0], + ] + + schedules = [[cstr(d.schedule_date), flt(d.depreciation_amount, 2), flt(d.accumulated_depreciation_amount, 2)] + for d in asset.get("schedules")] + + self.assertEqual(schedules, expected_schedules) + + # WDV: Written Down Value method + def test_pro_rata_depreciation_entry_for_wdv(self): + pr = make_purchase_receipt(item_code="Macbook Pro", + qty=1, rate=8000.0, location="Test Location") + + asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') + asset = frappe.get_doc('Asset', asset_name) + asset.calculate_depreciation = 1 + asset.available_for_use_date = '2030-06-06' + asset.purchase_date = '2030-01-01' + asset.append("finance_books", { + "expected_value_after_useful_life": 1000, + "depreciation_method": "Written Down Value", + "total_number_of_depreciations": 3, + "frequency_of_depreciation": 12, + "depreciation_start_date": "2030-12-31" + }) + asset.save(ignore_permissions=True) + + self.assertEqual(asset.finance_books[0].rate_of_depreciation, 50.0) + + expected_schedules = [ + ["2030-12-31", 2279.45, 2279.45], + ["2031-12-31", 2860.28, 5139.73], + ["2032-12-31", 1430.14, 6569.87], + ["2033-06-06", 430.13, 7000.0], + ] + + schedules = [[cstr(d.schedule_date), flt(d.depreciation_amount, 2), flt(d.accumulated_depreciation_amount, 2)] + for d in asset.get("schedules")] + + self.assertEqual(schedules, expected_schedules) + def test_discounted_wdv_depreciation_rate_for_indian_region(self): # set indian company company_flag = frappe.flags.company @@ -678,6 +587,7 @@ class TestAsset(unittest.TestCase): # reset indian company frappe.flags.company = company_flag +class TestDepreciationBasics(AssetSetup): def test_depreciation_without_pro_rata(self): asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, @@ -811,7 +721,7 @@ class TestAsset(unittest.TestCase): has_pro_rata = asset.check_is_pro_rata(asset.finance_books[0]) self.assertTrue(has_pro_rata) - def test_expected_value_after_useful_life(self): + def test_expected_value_after_useful_life_greater_than_purchase_amount(self): """Tests if an error is raised when expected_value_after_useful_life(110,000) > gross_purchase_amount(100,000).""" asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, @@ -921,6 +831,99 @@ class TestAsset(unittest.TestCase): self.assertEqual(len(asset.schedules), 1) + def test_depreciation_entry_cancellation(self): + pr = make_purchase_receipt(item_code="Macbook Pro", + qty=1, rate=100000.0, location="Test Location") + + asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') + asset = frappe.get_doc('Asset', asset_name) + asset.calculate_depreciation = 1 + asset.available_for_use_date = '2020-06-06' + asset.purchase_date = '2020-06-06' + asset.append("finance_books", { + "expected_value_after_useful_life": 10000, + "depreciation_method": "Straight Line", + "total_number_of_depreciations": 3, + "frequency_of_depreciation": 10, + "depreciation_start_date": "2020-12-31" + }) + asset.submit() + post_depreciation_entries(date="2021-01-01") + + asset.load_from_db() + + # cancel depreciation entry + depr_entry = asset.get("schedules")[0].journal_entry + self.assertTrue(depr_entry) + frappe.get_doc("Journal Entry", depr_entry).cancel() + + asset.load_from_db() + depr_entry = asset.get("schedules")[0].journal_entry + self.assertFalse(depr_entry) + + def test_asset_expected_value_after_useful_life(self): + pr = make_purchase_receipt(item_code="Macbook Pro", + qty=1, rate=100000.0, location="Test Location") + + asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') + asset = frappe.get_doc('Asset', asset_name) + asset.calculate_depreciation = 1 + asset.available_for_use_date = '2020-06-06' + asset.purchase_date = '2020-06-06' + asset.append("finance_books", { + "expected_value_after_useful_life": 10000, + "depreciation_method": "Straight Line", + "total_number_of_depreciations": 3, + "frequency_of_depreciation": 10 + }) + asset.save() + accumulated_depreciation_after_full_schedule = \ + max(d.accumulated_depreciation_amount for d in asset.get("schedules")) + + asset_value_after_full_schedule = (flt(asset.gross_purchase_amount) - + flt(accumulated_depreciation_after_full_schedule)) + + self.assertTrue(asset.finance_books[0].expected_value_after_useful_life >= asset_value_after_full_schedule) + + def test_gle_made_by_depreciation_entries(self): + pr = make_purchase_receipt(item_code="Macbook Pro", + qty=1, rate=100000.0, location="Test Location") + + asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') + asset = frappe.get_doc('Asset', asset_name) + asset.calculate_depreciation = 1 + asset.purchase_date = '2020-01-30' + asset.available_for_use_date = "2020-01-30" + asset.append("finance_books", { + "expected_value_after_useful_life": 10000, + "depreciation_method": "Straight Line", + "total_number_of_depreciations": 3, + "frequency_of_depreciation": 10, + "depreciation_start_date": "2020-12-31" + }) + asset.submit() + asset.load_from_db() + self.assertEqual(asset.status, "Submitted") + + frappe.db.set_value("Company", "_Test Company", "series_for_depreciation_entry", "DEPR-") + post_depreciation_entries(date="2021-01-01") + asset.load_from_db() + + # check depreciation entry series + self.assertEqual(asset.get("schedules")[0].journal_entry[:4], "DEPR") + + expected_gle = ( + ("_Test Accumulated Depreciations - _TC", 0.0, 30000.0), + ("_Test Depreciations - _TC", 30000.0, 0.0) + ) + + gle = frappe.db.sql("""select account, debit, credit from `tabGL Entry` + where against_voucher_type='Asset' and against_voucher = %s + order by account""", asset.name) + + self.assertEqual(gle, expected_gle) + self.assertEqual(asset.get("value_after_depreciation"), 0) + def create_asset_data(): if not frappe.db.exists("Asset Category", "Computers"): create_asset_category() From 99edc9c83a16137a73516d809b67ec398e46a921 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Sat, 2 Oct 2021 02:03:29 +0530 Subject: [PATCH 014/200] fix: Display message to delete linked invoices in the draft state --- erpnext/selling/doctype/sales_order/sales_order.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 93676094218..c2107b6c573 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -241,7 +241,7 @@ class SalesOrder(SellingController): # Checks Sales Invoice submit_rv = frappe.db.sql_list("""select t1.name from `tabSales Invoice` t1,`tabSales Invoice Item` t2 - where t1.name = t2.parent and t2.sales_order = %s and t1.docstatus < 2""", + where t1.name = t2.parent and t2.sales_order = %s and t1.docstatus = 1""", self.name) if submit_rv: @@ -249,6 +249,16 @@ class SalesOrder(SellingController): frappe.throw(_("Sales Invoice {0} must be cancelled before cancelling this Sales Order") .format(", ".join(submit_rv))) + draft_rv = frappe.db.sql_list("""select t1.name + from `tabSales Invoice` t1,`tabSales Invoice Item` t2 + where t1.name = t2.parent and t2.sales_order = %s and t1.docstatus = 0""", + self.name) + + if draft_rv: + draft_rv = [get_link_to_form("Sales Invoice", si) for si in draft_rv] + frappe.throw(_("Sales Invoice {0} must be deleted before cancelling this Sales Order") + .format(", ".join(draft_rv))) + #check maintenance schedule submit_ms = frappe.db.sql_list(""" select t1.name From 6e5a3c0ea4d6949e138e1d76359b19ceeda6aa73 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Sat, 2 Oct 2021 02:15:17 +0530 Subject: [PATCH 015/200] fix: Display draft invoices only once in error message --- erpnext/selling/doctype/sales_order/sales_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index c2107b6c573..b1a68930343 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -249,7 +249,7 @@ class SalesOrder(SellingController): frappe.throw(_("Sales Invoice {0} must be cancelled before cancelling this Sales Order") .format(", ".join(submit_rv))) - draft_rv = frappe.db.sql_list("""select t1.name + draft_rv = frappe.db.sql_list("""select distinct t1.name from `tabSales Invoice` t1,`tabSales Invoice Item` t2 where t1.name = t2.parent and t2.sales_order = %s and t1.docstatus = 0""", self.name) From 62fea8a5aa02b14e05eeb7aa5eb6496d65ceef2d Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 5 Oct 2021 21:38:39 +0530 Subject: [PATCH 016/200] fix: Rename tests --- erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 31f911203d0..79d46c5e566 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -2202,7 +2202,7 @@ class TestSalesInvoice(unittest.TestCase): check_gl_entries(self, si.name, expected_gle, add_days(nowdate(), -1)) enable_discount_accounting(enable=0) - def test_asset_depreciation_on_sale(self): + def test_asset_depreciation_on_sale_with_pro_rata(self): """ Tests if an Asset set to depreciate yearly on June 30, that gets sold on Sept 30, creates an additional depreciation entry on its date of sale. """ @@ -2226,7 +2226,7 @@ class TestSalesInvoice(unittest.TestCase): self.assertEqual(expected_values[i][2], schedule.accumulated_depreciation_amount) self.assertTrue(schedule.journal_entry) - def test_depreciation_on_sale_for_depreciated_asset(self): + def test_asset_depreciation_on_sale_without_pro_rata(self): """ Tests if an Asset set to depreciate yearly on Dec 31, that gets sold on Dec 31 after two years, created an additional depreciation entry on its date of sale. """ From f51bd44929275949652dfc97f1b5a8107f64e6cf Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 6 Oct 2021 01:18:05 +0530 Subject: [PATCH 017/200] fix: Unlink Depreciation Entry made on sale if the Asset is returned --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index e135490cad3..44a5fae6fb1 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1060,10 +1060,15 @@ class SalesInvoice(SellingController): if schedule.schedule_date == posting_date_of_original_invoice: if not self.sale_was_made_on_original_schedule_date(asset, schedule, row, posting_date_of_original_invoice) \ or self.sale_happens_in_the_future(posting_date_of_original_invoice): + reverse_journal_entry = make_reverse_journal_entry(schedule.journal_entry) reverse_journal_entry.posting_date = nowdate() reverse_journal_entry.submit() + asset.flags.ignore_validate_update_after_submit = True + schedule.journal_entry = None + asset.save() + def get_posting_date_of_sales_invoice(self): return frappe.db.get_value('Sales Invoice', self.return_against, 'posting_date') From adebf2d71b2336037e45e85b214920e1f91deaae Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 6 Oct 2021 02:04:05 +0530 Subject: [PATCH 018/200] fix: Adjust depreciation_amount in final row --- erpnext/assets/doctype/asset/asset.py | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index 0138a1282a8..2a1d51beb45 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -262,11 +262,15 @@ class Asset(AccountsController): self.to_date = add_months(self.available_for_use_date, n * cint(d.frequency_of_depreciation)) + depreciation_amount_without_pro_rata = depreciation_amount + depreciation_amount, days, months = self.get_pro_rata_amt(d, depreciation_amount, schedule_date, self.to_date) - monthly_schedule_date = add_months(schedule_date, 1) + depreciation_amount = self.get_adjusted_depreciation_amount(depreciation_amount_without_pro_rata, + depreciation_amount, d.finance_book) + monthly_schedule_date = add_months(schedule_date, 1) schedule_date = add_days(schedule_date, days) last_schedule_date = schedule_date @@ -406,6 +410,27 @@ class Asset(AccountsController): frappe.throw(_("Depreciation Row {0}: Next Depreciation Date cannot be before Available-for-use Date") .format(row.idx)) + # to ensure that final accumulated depreciation amount is accurate + def get_adjusted_depreciation_amount(self, depreciation_amount_without_pro_rata, depreciation_amount_for_last_row, finance_book): + depreciation_amount_for_first_row = self.get_depreciation_amount_for_first_row(finance_book) + + if depreciation_amount_for_first_row + depreciation_amount_for_last_row != depreciation_amount_without_pro_rata: + depreciation_amount_for_last_row = depreciation_amount_without_pro_rata - depreciation_amount_for_first_row + + return depreciation_amount_for_last_row + + def get_depreciation_amount_for_first_row(self, finance_book): + if self.has_only_one_finance_book(): + return self.schedules[0].depreciation_amount + else: + for schedule in self.schedules: + if schedule.finance_book == finance_book: + return schedule.depreciation_amount + + def has_only_one_finance_book(self): + if len(self.finance_books) == 1: + return True + def set_accumulated_depreciation(self, date_of_sale=None, date_of_return=None, ignore_booked_entry = False): straight_line_idx = [d.idx for d in self.get("schedules") if d.depreciation_method == 'Straight Line'] finance_books = [] From 273fccf0ddfd5e6d79150b0a2c7e010b12753e21 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 6 Oct 2021 02:08:28 +0530 Subject: [PATCH 019/200] fix: Add test for depreciation on return of sold Asset --- .../sales_invoice/test_sales_invoice.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 79d46c5e566..0e9ceead7f5 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -2252,6 +2252,33 @@ class TestSalesInvoice(unittest.TestCase): self.assertEqual(expected_values[i][2], schedule.accumulated_depreciation_amount) self.assertTrue(schedule.journal_entry) + def test_depreciation_on_return_of_sold_asset(self): + from erpnext.controllers.sales_and_purchase_return import make_return_doc + + create_asset_data() + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, submit=1) + post_depreciation_entries(getdate("2021-09-30")) + + si = create_sales_invoice(item_code="Macbook Pro", asset=asset.name, qty=1, rate=90000, posting_date=getdate("2021-09-30")) + return_si = make_return_doc("Sales Invoice", si.name) + return_si.submit() + asset.load_from_db() + + expected_values = [ + ["2020-06-30", 1311.48, 1311.48, True], + ["2021-06-30", 20000.0, 21311.48, True], + ["2022-06-30", 20000.0, 41311.48, False], + ["2023-06-30", 20000.0, 61311.48, False], + ["2024-06-30", 20000.0, 81311.48, False], + ["2025-06-06", 18688.52, 100000.0, False] + ] + + for i, schedule in enumerate(asset.schedules): + self.assertEqual(getdate(expected_values[i][0]), schedule.schedule_date) + self.assertEqual(expected_values[i][1], schedule.depreciation_amount) + self.assertEqual(expected_values[i][2], schedule.accumulated_depreciation_amount) + self.assertEqual(schedule.journal_entry, schedule.journal_entry) + def test_sales_invoice_against_supplier(self): from erpnext.accounts.doctype.opening_invoice_creation_tool.test_opening_invoice_creation_tool import ( make_customer, From ef3f2fcb3a9ccd4be37b9359b31458ba48e91865 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Sun, 10 Oct 2021 03:50:45 +0530 Subject: [PATCH 020/200] fix: Replace setUp() with setUpClass() --- erpnext/assets/doctype/asset/test_asset.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index b5488750eba..461e110a999 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -21,7 +21,8 @@ from erpnext.stock.doctype.purchase_receipt.purchase_receipt import ( from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_purchase_receipt class AssetSetup(unittest.TestCase): - def setUp(self): + @classmethod + def setUpClass(cls): set_depreciation_settings_in_company() create_asset_data() frappe.db.sql("delete from `tabTax Rule`") From 4918e9533b10bbc56461a5514d9e8556352d7dd2 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Sun, 10 Oct 2021 03:51:35 +0530 Subject: [PATCH 021/200] fix: Add tearDownClass() --- erpnext/assets/doctype/asset/test_asset.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 461e110a999..45a1ae4a7c5 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -27,6 +27,10 @@ class AssetSetup(unittest.TestCase): create_asset_data() frappe.db.sql("delete from `tabTax Rule`") + @classmethod + def tearDownClass(cls): + frappe.db.rollback() + class TestAsset(AssetSetup): def test_purchase_asset(self): pr = make_purchase_receipt(item_code="Macbook Pro", From d8aaf3d389366544b39c05d26e0bc29312f0e797 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 12 Oct 2021 01:07:11 +0530 Subject: [PATCH 022/200] fix: Add tests to validate Asset values --- erpnext/assets/doctype/asset/test_asset.py | 62 +++++++++++++++++++--- 1 file changed, 54 insertions(+), 8 deletions(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 45a1ae4a7c5..6a283df9f44 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -32,6 +32,49 @@ class AssetSetup(unittest.TestCase): frappe.db.rollback() class TestAsset(AssetSetup): + def test_asset_category_is_fetched(self): + """Tests if the Item's Asset Category value is assigned to the Asset, if the field is empty.""" + + asset = create_asset(item_code="Macbook Pro", do_not_save=1) + asset.asset_category = None + asset.save() + + self.assertEqual(asset.asset_category, "Computers") + + def test_gross_purchase_amount_is_mandatory(self): + asset = create_asset(item_code="Macbook Pro", do_not_save=1) + asset.gross_purchase_amount = 0 + + self.assertRaises(frappe.MandatoryError, asset.save) + + def test_pr_or_pi_mandatory_if_not_existing_asset(self): + """Tests if either PI or PR is present if CWIP is enabled and is_existing_asset=0.""" + + asset = create_asset(item_code="Macbook Pro", do_not_save=1) + enable_cwip_accounting(asset.asset_category) + asset.is_existing_asset=0 + + self.assertRaises(frappe.ValidationError, asset.save) + + enable_cwip_accounting(asset.asset_category, enable=0) + + def test_finance_books_are_present_if_calculate_depreciation_is_enabled(self): + asset = create_asset(item_code="Macbook Pro", do_not_save=1) + asset.calculate_depreciation = 1 + + self.assertRaises(frappe.ValidationError, asset.save) + + # def test_available_for_use_date_is_after_purchase_date(self): + # pr = make_purchase_receipt(item_code="Macbook Pro", + # qty=1, rate=100000.0, location="Test Location", posting_date=add_days(nowdate(), -15)) + + # asset = create_asset(item_code="Macbook Pro", do_not_save=1) + # asset.is_existing_asset = 0 + # asset.purchase_receipt = pr + # asset.available_for_use_date = nowdate() + + # self.assertRaises(frappe.ValidationError, asset.save) + def test_purchase_asset(self): pr = make_purchase_receipt(item_code="Macbook Pro", qty=1, rate=100000.0, location="Test Location") @@ -950,20 +993,20 @@ def create_asset(**args): asset = frappe.get_doc({ "doctype": "Asset", "asset_name": args.asset_name or "Macbook Pro 1", - "asset_category": "Computers", + "asset_category": args.asset_category or "Computers", "item_code": args.item_code or "Macbook Pro", - "company": args.company or"_Test Company", - "purchase_date": "2015-01-01", + "company": args.company or "_Test Company", + "purchase_date": args.purchase_date or "2015-01-01", "calculate_depreciation": args.calculate_depreciation or 0, "opening_accumulated_depreciation": args.opening_accumulated_depreciation or 0, "number_of_depreciations_booked": args.number_of_depreciations_booked or 0, - "gross_purchase_amount": 100000, - "purchase_receipt_amount": 100000, + "gross_purchase_amount": args.gross_purchase_amount or 100000, + "purchase_receipt_amount": args.purchase_receipt_amount or 100000, "warehouse": args.warehouse or "_Test Warehouse - _TC", "available_for_use_date": args.available_for_use_date or "2020-06-06", - "location": "Test Location", - "asset_owner": "Company", - "is_existing_asset": 1 + "location": args.location or "Test Location", + "asset_owner": args.asset_owner or "Company", + "is_existing_asset": args.is_existing_asset or 1 }) if asset.calculate_depreciation: @@ -1030,3 +1073,6 @@ def set_depreciation_settings_in_company(): # Enable booking asset depreciation entry automatically frappe.db.set_value("Accounts Settings", None, "book_asset_depreciation_entry_automatically", 1) + +def enable_cwip_accounting(asset_category, enable=1): + frappe.db.set_value("Asset Category", asset_category, "enable_cwip_accounting", enable) From a7ec007dcff77f99d1af9e8f8c473cba629f6efe Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 12 Oct 2021 01:33:46 +0530 Subject: [PATCH 023/200] fix: Add tests to validate item --- erpnext/assets/doctype/asset/test_asset.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 6a283df9f44..ce1d8d51944 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -75,6 +75,27 @@ class TestAsset(AssetSetup): # self.assertRaises(frappe.ValidationError, asset.save) + def test_item_exists(self): + asset = create_asset(item_code="MacBook", do_not_save=1) + + self.assertRaises(frappe.DoesNotExistError, asset.save) + + def test_validate_item(self): + asset = create_asset(item_code="MacBook Pro", do_not_save=1) + item = frappe.get_doc("Item", "MacBook Pro") + + item.disabled = 1 + item.save() + self.assertRaises(frappe.ValidationError, asset.save) + item.disabled = 0 + + item.is_fixed_asset = 0 + self.assertRaises(frappe.ValidationError, asset.save) + item.is_fixed_asset = 1 + + item.is_stock_item = 1 + self.assertRaises(frappe.ValidationError, asset.save) + def test_purchase_asset(self): pr = make_purchase_receipt(item_code="Macbook Pro", qty=1, rate=100000.0, location="Test Location") From a5002525704d5e9d4a33913143f49a355ac20f16 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Tue, 12 Oct 2021 13:25:55 +0530 Subject: [PATCH 024/200] perf: skip get_pricing_rules if no pricing rule exists --- erpnext/accounts/doctype/pricing_rule/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index 0637fdaef02..ef44b414761 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -29,6 +29,9 @@ def get_pricing_rules(args, doc=None): pricing_rules = [] values = {} + if not frappe.db.exists('Pricing Rule', {'disable': 0, args.transaction_type: 1}): + return + for apply_on in ['Item Code', 'Item Group', 'Brand']: pricing_rules.extend(_get_pricing_rules(apply_on, args, values)) if pricing_rules and not apply_multiple_pricing_rules(pricing_rules): From 7b691beabb40cdf3156a5cf81355d8d4c6b8bd7b Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Tue, 12 Oct 2021 13:28:31 +0530 Subject: [PATCH 025/200] perf: fetch mode of payments data in single query --- .../doctype/sales_invoice/sales_invoice.py | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index d9098149210..0c3eff2a030 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1951,22 +1951,23 @@ def update_multi_mode_option(doc, pos_profile): def append_payment(payment_mode): payment = doc.append('payments', {}) payment.default = payment_mode.default - payment.mode_of_payment = payment_mode.parent + payment.mode_of_payment = payment_mode.mop payment.account = payment_mode.default_account payment.type = payment_mode.type doc.set('payments', []) invalid_modes = [] - for pos_payment_method in pos_profile.get('payments'): - pos_payment_method = pos_payment_method.as_dict() + mode_of_payments = [d.mode_of_payment for d in pos_profile.get('payments')] + mode_of_payments_info = get_mode_of_payments_info(mode_of_payments, doc.company) - payment_mode = get_mode_of_payment_info(pos_payment_method.mode_of_payment, doc.company) + for row in pos_profile.get('payments'): + payment_mode = mode_of_payments_info.get(row.mode_of_payment) if not payment_mode: - invalid_modes.append(get_link_to_form("Mode of Payment", pos_payment_method.mode_of_payment)) + invalid_modes.append(get_link_to_form("Mode of Payment", row.mode_of_payment)) continue - payment_mode[0].default = pos_payment_method.default - append_payment(payment_mode[0]) + payment_mode.default = row.default + append_payment(payment_mode) if invalid_modes: if invalid_modes == 1: @@ -1982,6 +1983,25 @@ def get_all_mode_of_payments(doc): where mpa.parent = mp.name and mpa.company = %(company)s and mp.enabled = 1""", {'company': doc.company}, as_dict=1) +def get_mode_of_payments_info(mode_of_payments, company): + data = frappe.db.sql( + """ + select + mpa.default_account, mpa.parent as mop, mp.type as type + from + `tabMode of Payment Account` mpa,`tabMode of Payment` mp + where + mpa.parent = mp.name and + mpa.company = %s and + mp.enabled = 1 and + mp.name in (%s) + group by + mp.name + """, + (company, mode_of_payments), as_dict=1) + + return {row.get('mop'): row for row in data} + def get_mode_of_payment_info(mode_of_payment, company): return frappe.db.sql(""" select mpa.default_account, mpa.parent, mp.type as type From eb3aae870f92e73b2b7babdb1bba01aaebf6e854 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Tue, 12 Oct 2021 13:29:32 +0530 Subject: [PATCH 026/200] perf: get total company stock only for purchase order --- erpnext/stock/get_item_details.py | 36 ++++++++++++++++++------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index cbff2149d64..e0190b64a75 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -89,7 +89,13 @@ def get_item_details(args, doc=None, for_validate=False, overwrite_warehouse=Tru out.update(get_bin_details(args.item_code, args.get("from_warehouse"))) elif out.get("warehouse"): - out.update(get_bin_details(args.item_code, out.warehouse, args.company)) + if doc and doc.get('doctype') == 'Purchase Order': + # calculate company_total_stock only for po + bin_details = get_bin_details(args.item_code, out.warehouse, args.company) + else: + bin_details = get_bin_details(args.item_code, out.warehouse) + + out.update(bin_details) # update args with out, if key or value not exists for key, value in iteritems(out): @@ -485,8 +491,9 @@ def get_item_tax_template(args, item, out): "item_tax_template": None } """ - item_tax_template = args.get("item_tax_template") - item_tax_template = _get_item_tax_template(args, item.taxes, out) + item_tax_template = None + if item.taxes: + item_tax_template = _get_item_tax_template(args, item.taxes, out) if not item_tax_template: item_group = item.item_group @@ -502,17 +509,17 @@ def _get_item_tax_template(args, taxes, out=None, for_validate=False): taxes_with_no_validity = [] for tax in taxes: - tax_company = frappe.get_value("Item Tax Template", tax.item_tax_template, 'company') - if (tax.valid_from or tax.maximum_net_rate) and tax_company == args['company']: - # In purchase Invoice first preference will be given to supplier invoice date - # if supplier date is not present then posting date - validation_date = args.get('transaction_date') or args.get('bill_date') or args.get('posting_date') + tax_company = frappe.get_cached_value("Item Tax Template", tax.item_tax_template, 'company') + if tax_company == args['company']: + if (tax.valid_from or tax.maximum_net_rate): + # In purchase Invoice first preference will be given to supplier invoice date + # if supplier date is not present then posting date + validation_date = args.get('transaction_date') or args.get('bill_date') or args.get('posting_date') - if getdate(tax.valid_from) <= getdate(validation_date) \ - and is_within_valid_range(args, tax): - taxes_with_validity.append(tax) - else: - if tax_company == args['company']: + if getdate(tax.valid_from) <= getdate(validation_date) \ + and is_within_valid_range(args, tax): + taxes_with_validity.append(tax) + else: taxes_with_no_validity.append(tax) if taxes_with_validity: @@ -890,8 +897,7 @@ def get_pos_profile_item_details(company, args, pos_profile=None, update_data=Fa res[fieldname] = pos_profile.get(fieldname) if res.get("warehouse"): - res.actual_qty = get_bin_details(args.item_code, - res.warehouse).get("actual_qty") + res.actual_qty = get_bin_details(args.item_code, res.warehouse).get("actual_qty") return res From c7fc609236aeaada0375e90b664c041bdbc52570 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Tue, 12 Oct 2021 13:30:40 +0530 Subject: [PATCH 027/200] perf: skip insertion of stock ledger entry --- erpnext/stock/stock_ledger.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 1b5b792f946..bff7880fd6f 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -123,12 +123,11 @@ def set_as_cancel(voucher_type, voucher_no): (now(), frappe.session.user, voucher_type, voucher_no)) def make_entry(args, allow_negative_stock=False, via_landed_cost_voucher=False): - args.update({"doctype": "Stock Ledger Entry"}) + args["doctype"] = "Stock Ledger Entry" sle = frappe.get_doc(args) sle.flags.ignore_permissions = 1 sle.allow_negative_stock=allow_negative_stock sle.via_landed_cost_voucher = via_landed_cost_voucher - sle.insert() sle.submit() return sle @@ -240,8 +239,7 @@ class update_entries_after(object): self.verbose = verbose self.allow_zero_rate = allow_zero_rate self.via_landed_cost_voucher = via_landed_cost_voucher - self.allow_negative_stock = allow_negative_stock \ - or cint(frappe.db.get_single_value("Stock Settings", "allow_negative_stock")) + self.allow_negative_stock = True self.args = frappe._dict(args) self.item_code = args.get("item_code") From 7bafa11d5758c40496898cd0151efde4ff358946 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Tue, 12 Oct 2021 20:39:10 +0530 Subject: [PATCH 028/200] fix: undo changes to allow negative stock flag --- erpnext/stock/stock_ledger.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index bff7880fd6f..2b6eefb5cc6 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -239,7 +239,8 @@ class update_entries_after(object): self.verbose = verbose self.allow_zero_rate = allow_zero_rate self.via_landed_cost_voucher = via_landed_cost_voucher - self.allow_negative_stock = True + self.allow_negative_stock = allow_negative_stock \ + or cint(frappe.db.get_single_value("Stock Settings", "allow_negative_stock")) self.args = frappe._dict(args) self.item_code = args.get("item_code") From 8ea1ad9232ceac388c3fc4117752af3fa6880276 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 13 Oct 2021 20:47:39 +0530 Subject: [PATCH 029/200] fix: Only validate against JV if it's not a reverse depreciation entry --- erpnext/accounts/doctype/journal_entry/journal_entry.py | 6 ++++-- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index e568a827617..d04e4a5d8bd 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -58,7 +58,10 @@ class JournalEntry(AccountsController): if not frappe.flags.in_import: self.validate_total_debit_and_credit() - self.validate_against_jv() + if not self.flags.is_reverse_depr_entry: + self.validate_against_jv() + self.validate_stock_accounts() + self.validate_reference_doc() if self.docstatus == 0: self.set_against_account() @@ -69,7 +72,6 @@ class JournalEntry(AccountsController): self.validate_empty_accounts_table() self.set_account_and_party_balance() self.validate_inter_company_accounts() - self.validate_stock_accounts() if self.docstatus == 0: self.apply_tax_withholding() diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 44a5fae6fb1..2744e0d310e 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1063,6 +1063,7 @@ class SalesInvoice(SellingController): reverse_journal_entry = make_reverse_journal_entry(schedule.journal_entry) reverse_journal_entry.posting_date = nowdate() + reverse_journal_entry.flags.is_reverse_depr_entry = True reverse_journal_entry.submit() asset.flags.ignore_validate_update_after_submit = True From 749d1b6ee68603984c99045c3d4115678523893e Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 13 Oct 2021 20:49:07 +0530 Subject: [PATCH 030/200] fix: Enable cwip accounting --- erpnext/assets/doctype/asset/test_asset.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index ce1d8d51944..878a31ef930 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -25,6 +25,7 @@ class AssetSetup(unittest.TestCase): def setUpClass(cls): set_depreciation_settings_in_company() create_asset_data() + enable_cwip_accounting("Computers") frappe.db.sql("delete from `tabTax Rule`") @classmethod @@ -51,13 +52,10 @@ class TestAsset(AssetSetup): """Tests if either PI or PR is present if CWIP is enabled and is_existing_asset=0.""" asset = create_asset(item_code="Macbook Pro", do_not_save=1) - enable_cwip_accounting(asset.asset_category) asset.is_existing_asset=0 self.assertRaises(frappe.ValidationError, asset.save) - enable_cwip_accounting(asset.asset_category, enable=0) - def test_finance_books_are_present_if_calculate_depreciation_is_enabled(self): asset = create_asset(item_code="Macbook Pro", do_not_save=1) asset.calculate_depreciation = 1 @@ -330,7 +328,6 @@ class TestAsset(AssetSetup): def test_expense_head(self): pr = make_purchase_receipt(item_code="Macbook Pro", qty=2, rate=200000.0, location="Test Location") - doc = make_invoice(pr.name) self.assertEqual('Asset Received But Not Billed - _TC', doc.items[0].expense_account) From 83ec9879ee963c3e8b3b7551df93679eb3643689 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 13 Oct 2021 21:21:50 +0530 Subject: [PATCH 031/200] fix: Add test to validate available_for_use_date --- erpnext/assets/doctype/asset/test_asset.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 878a31ef930..964451dc2f4 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -62,16 +62,17 @@ class TestAsset(AssetSetup): self.assertRaises(frappe.ValidationError, asset.save) - # def test_available_for_use_date_is_after_purchase_date(self): - # pr = make_purchase_receipt(item_code="Macbook Pro", - # qty=1, rate=100000.0, location="Test Location", posting_date=add_days(nowdate(), -15)) + def test_available_for_use_date_is_after_purchase_date(self): + pr = make_purchase_receipt(item_code="Macbook Pro", qty=1, rate=100000.0, + location="Test Location", posting_date=getdate("2021-10-10")) - # asset = create_asset(item_code="Macbook Pro", do_not_save=1) - # asset.is_existing_asset = 0 - # asset.purchase_receipt = pr - # asset.available_for_use_date = nowdate() + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, do_not_save=1) + asset.is_existing_asset = 0 + asset.purchase_receipt = pr.name + asset.purchase_date = getdate("2021-10-10") + asset.available_for_use_date = getdate("2021-10-1") - # self.assertRaises(frappe.ValidationError, asset.save) + self.assertRaises(frappe.ValidationError, asset.save) def test_item_exists(self): asset = create_asset(item_code="MacBook", do_not_save=1) From e8986df3cafa49d1b317429036f4c145ca4f8d86 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 13 Oct 2021 21:36:10 +0530 Subject: [PATCH 032/200] fix: Move test for Finance Books to Depreciation test suite --- erpnext/assets/doctype/asset/test_asset.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 964451dc2f4..cb984a70bc0 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -56,12 +56,6 @@ class TestAsset(AssetSetup): self.assertRaises(frappe.ValidationError, asset.save) - def test_finance_books_are_present_if_calculate_depreciation_is_enabled(self): - asset = create_asset(item_code="Macbook Pro", do_not_save=1) - asset.calculate_depreciation = 1 - - self.assertRaises(frappe.ValidationError, asset.save) - def test_available_for_use_date_is_after_purchase_date(self): pr = make_purchase_receipt(item_code="Macbook Pro", qty=1, rate=100000.0, location="Test Location", posting_date=getdate("2021-10-10")) @@ -852,6 +846,12 @@ class TestDepreciationBasics(AssetSetup): self.assertRaises(frappe.ValidationError, asset.save) + def test_finance_books_are_present_if_calculate_depreciation_is_enabled(self): + asset = create_asset(item_code="Macbook Pro", do_not_save=1) + asset.calculate_depreciation = 1 + + self.assertRaises(frappe.ValidationError, asset.save) + def test_post_depreciation_entries(self): """Tests if post_depreciation_entries() works as expected.""" From 4bf01bb4b7b6770b5f957824d912397b1556f168 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 14 Oct 2021 20:28:57 +0530 Subject: [PATCH 033/200] fix: Move Purchase Receipt creation to setUpClass --- erpnext/assets/doctype/asset/test_asset.py | 56 ++++++---------------- 1 file changed, 15 insertions(+), 41 deletions(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 773ecc78414..a94f84f9691 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -26,6 +26,7 @@ class AssetSetup(unittest.TestCase): set_depreciation_settings_in_company() create_asset_data() enable_cwip_accounting("Computers") + make_purchase_receipt(item_code="Macbook Pro", qty=1, rate=100000.0, location="Test Location") frappe.db.sql("delete from `tabTax Rule`") @classmethod @@ -57,12 +58,8 @@ class TestAsset(AssetSetup): self.assertRaises(frappe.ValidationError, asset.save) def test_available_for_use_date_is_after_purchase_date(self): - pr = make_purchase_receipt(item_code="Macbook Pro", qty=1, rate=100000.0, - location="Test Location", posting_date=getdate("2021-10-10")) - asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, do_not_save=1) asset.is_existing_asset = 0 - asset.purchase_receipt = pr.name asset.purchase_date = getdate("2021-10-10") asset.available_for_use_date = getdate("2021-10-1") @@ -152,21 +149,9 @@ class TestAsset(AssetSetup): self.assertEqual(doc.items[0].is_fixed_asset, 1) def test_scrap_asset(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=100000.0, location="Test Location") - - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.available_for_use_date = '2020-01-01' - asset.purchase_date = '2020-01-01' - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Straight Line", - "total_number_of_depreciations": 10, - "frequency_of_depreciation": 1 - }) - asset.submit() + asset = create_asset(calculate_depreciation=1, available_for_use_date='2020-01-01', + purchase_date = '2020-01-01', expected_value_after_useful_life=10000, + total_number_of_depreciations=10, frequency_of_depreciation=1, submit=1) post_depreciation_entries(date=add_months('2020-01-01', 4)) @@ -194,22 +179,11 @@ class TestAsset(AssetSetup): self.assertEqual(asset.status, "Partially Depreciated") def test_gle_made_by_asset_sale(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=100000.0, location="Test Location") + asset = create_asset(calculate_depreciation=1, available_for_use_date='2020-06-06', + purchase_date = '2020-01-01', expected_value_after_useful_life=10000, + total_number_of_depreciations=3, frequency_of_depreciation=10, + depreciation_start_date='2020-12-31', submit=1) - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.available_for_use_date = '2020-06-06' - asset.purchase_date = '2020-06-06' - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Straight Line", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 10, - "depreciation_start_date": "2020-12-31" - }) - asset.submit() post_depreciation_entries(date="2021-01-01") si = make_sales_invoice(asset=asset.name, item_code="Macbook Pro", company="_Test Company") @@ -237,6 +211,13 @@ class TestAsset(AssetSetup): si.cancel() self.assertEqual(frappe.db.get_value("Asset", asset.name, "status"), "Partially Depreciated") + def test_expense_head(self): + pr = make_purchase_receipt(item_code="Macbook Pro", + qty=2, rate=200000.0, location="Test Location") + doc = make_invoice(pr.name) + + self.assertEqual('Asset Received But Not Billed - _TC', doc.items[0].expense_account) + # CWIP: Capital Work In Progress def test_cwip_accounting(self): pr = make_purchase_receipt(item_code="Macbook Pro", @@ -320,13 +301,6 @@ class TestAsset(AssetSetup): self.assertEqual(gle, expected_gle) - def test_expense_head(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=2, rate=200000.0, location="Test Location") - doc = make_invoice(pr.name) - - self.assertEqual('Asset Received But Not Billed - _TC', doc.items[0].expense_account) - def test_asset_cwip_toggling_cases(self): cwip = frappe.db.get_value("Asset Category", "Computers", "enable_cwip_accounting") name = frappe.db.get_value("Asset Category Account", filters={"parent": "Computers"}, fieldname=["name"]) From 09215a9781379e78b78b3d7e5a5c6546558256a6 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 14 Oct 2021 22:15:10 +0530 Subject: [PATCH 034/200] fix: Remove PR creation from all tests for Depreciation Methods --- erpnext/assets/doctype/asset/test_asset.py | 194 ++++++--------------- 1 file changed, 54 insertions(+), 140 deletions(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index a94f84f9691..8795b0223ee 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -371,23 +371,10 @@ class TestAsset(AssetSetup): class TestDepreciationMethods(AssetSetup): def test_schedule_for_straight_line_method(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=100000.0, location="Test Location") - - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.available_for_use_date = '2030-01-01' - asset.purchase_date = '2030-01-01' - - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Straight Line", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 12, - "depreciation_start_date": "2030-12-31" - }) - asset.save() + asset = create_asset(calculate_depreciation=1, + available_for_use_date="2030-01-01", purchase_date="2030-01-01", + expected_value_after_useful_life=10000, depreciation_start_date="2030-12-31", + total_number_of_depreciations=3, frequency_of_depreciation=12) self.assertEqual(asset.status, "Draft") expected_schedules = [ @@ -402,21 +389,13 @@ class TestDepreciationMethods(AssetSetup): self.assertEqual(schedules, expected_schedules) def test_schedule_for_straight_line_method_for_existing_asset(self): - create_asset(is_existing_asset=1) - asset = frappe.get_doc("Asset", {"asset_name": "Macbook Pro 1"}) - asset.calculate_depreciation = 1 - asset.number_of_depreciations_booked = 1 - asset.opening_accumulated_depreciation = 40000 - asset.available_for_use_date = "2030-06-06" - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Straight Line", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 12, - "depreciation_start_date": "2030-12-31" - }) + asset = create_asset(calculate_depreciation=1, + available_for_use_date="2030-06-06", is_existing_asset=1, + number_of_depreciations_booked = 1, opening_accumulated_depreciation=40000, + expected_value_after_useful_life=10000, depreciation_start_date="2030-12-31", + total_number_of_depreciations=3, frequency_of_depreciation=12) + self.assertEqual(asset.status, "Draft") - asset.save() expected_schedules = [ ["2030-12-31", 14246.58, 54246.58], ["2031-12-31", 25000.00, 79246.58], @@ -428,22 +407,12 @@ class TestDepreciationMethods(AssetSetup): self.assertEqual(schedules, expected_schedules) def test_schedule_for_double_declining_method(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=100000.0, location="Test Location") + asset = create_asset(calculate_depreciation=1, + available_for_use_date="2030-01-01", purchase_date="2030-01-01", + depreciation_method="Double Declining Balance", + expected_value_after_useful_life=10000, depreciation_start_date="2030-12-31", + total_number_of_depreciations=3, frequency_of_depreciation=12) - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.available_for_use_date = '2030-01-01' - asset.purchase_date = '2030-01-01' - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Double Declining Balance", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 12, - "depreciation_start_date": '2030-12-31' - }) - asset.save() self.assertEqual(asset.status, "Draft") expected_schedules = [ @@ -458,22 +427,13 @@ class TestDepreciationMethods(AssetSetup): self.assertEqual(schedules, expected_schedules) def test_schedule_for_double_declining_method_for_existing_asset(self): - create_asset(is_existing_asset = 1) - asset = frappe.get_doc("Asset", {"asset_name": "Macbook Pro 1"}) - asset.calculate_depreciation = 1 - asset.is_existing_asset = 1 - asset.number_of_depreciations_booked = 1 - asset.opening_accumulated_depreciation = 50000 - asset.available_for_use_date = '2030-01-01' - asset.purchase_date = '2029-11-30' - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Double Declining Balance", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 12, - "depreciation_start_date": "2030-12-31" - }) - asset.save() + asset = create_asset(calculate_depreciation=1, + available_for_use_date="2030-01-01", is_existing_asset=1, + depreciation_method="Double Declining Balance", + number_of_depreciations_booked = 1, opening_accumulated_depreciation=50000, + expected_value_after_useful_life=10000, depreciation_start_date="2030-12-31", + total_number_of_depreciations=3, frequency_of_depreciation=12) + self.assertEqual(asset.status, "Draft") expected_schedules = [ @@ -487,24 +447,11 @@ class TestDepreciationMethods(AssetSetup): self.assertEqual(schedules, expected_schedules) def test_schedule_for_prorated_straight_line_method(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=100000.0, location="Test Location") - - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.purchase_date = '2030-01-30' - asset.is_existing_asset = 0 - asset.available_for_use_date = "2030-01-30" - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Straight Line", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 12, - "depreciation_start_date": "2030-12-31" - }) - - asset.save() + asset = create_asset(calculate_depreciation=1, + available_for_use_date="2030-01-30", purchase_date="2030-01-30", + depreciation_method="Straight Line", + expected_value_after_useful_life=10000, depreciation_start_date="2030-12-31", + total_number_of_depreciations=3, frequency_of_depreciation=12) expected_schedules = [ ["2030-12-31", 27534.25, 27534.25], @@ -520,29 +467,18 @@ class TestDepreciationMethods(AssetSetup): # WDV: Written Down Value method def test_depreciation_entry_for_wdv_without_pro_rata(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=8000.0, location="Test Location") - - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.available_for_use_date = '2030-01-01' - asset.purchase_date = '2030-01-01' - asset.append("finance_books", { - "expected_value_after_useful_life": 1000, - "depreciation_method": "Written Down Value", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 12, - "depreciation_start_date": "2030-12-31" - }) - asset.save(ignore_permissions=True) + asset = create_asset(calculate_depreciation=1, + available_for_use_date="2030-01-01", purchase_date="2030-01-01", + depreciation_method="Written Down Value", + expected_value_after_useful_life=12500, depreciation_start_date="2030-12-31", + total_number_of_depreciations=3, frequency_of_depreciation=12) self.assertEqual(asset.finance_books[0].rate_of_depreciation, 50.0) expected_schedules = [ - ["2030-12-31", 4000.00, 4000.00], - ["2031-12-31", 2000.00, 6000.00], - ["2032-12-31", 1000.00, 7000.0], + ["2030-12-31", 50000.0, 50000.0], + ["2031-12-31", 25000.0, 75000.0], + ["2032-12-31", 12500.0, 87500.0], ] schedules = [[cstr(d.schedule_date), flt(d.depreciation_amount, 2), flt(d.accumulated_depreciation_amount, 2)] @@ -552,30 +488,19 @@ class TestDepreciationMethods(AssetSetup): # WDV: Written Down Value method def test_pro_rata_depreciation_entry_for_wdv(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=8000.0, location="Test Location") - - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.available_for_use_date = '2030-06-06' - asset.purchase_date = '2030-01-01' - asset.append("finance_books", { - "expected_value_after_useful_life": 1000, - "depreciation_method": "Written Down Value", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 12, - "depreciation_start_date": "2030-12-31" - }) - asset.save(ignore_permissions=True) + asset = create_asset(calculate_depreciation=1, + available_for_use_date="2030-06-06", purchase_date="2030-01-01", + depreciation_method="Written Down Value", + expected_value_after_useful_life=12500, depreciation_start_date="2030-12-31", + total_number_of_depreciations=3, frequency_of_depreciation=12) self.assertEqual(asset.finance_books[0].rate_of_depreciation, 50.0) expected_schedules = [ - ["2030-12-31", 2279.45, 2279.45], - ["2031-12-31", 2860.28, 5139.73], - ["2032-12-31", 1430.14, 6569.87], - ["2033-06-06", 430.13, 7000.0], + ["2030-12-31", 28493.15, 28493.15], + ["2031-12-31", 35753.43, 64246.58], + ["2032-12-31", 17876.71, 82123.29], + ["2033-06-06", 5376.71, 87500.0] ] schedules = [[cstr(d.schedule_date), flt(d.depreciation_amount, 2), flt(d.accumulated_depreciation_amount, 2)] @@ -588,30 +513,19 @@ class TestDepreciationMethods(AssetSetup): company_flag = frappe.flags.company frappe.flags.company = "_Test Company" - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=8000.0, location="Test Location") - - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.available_for_use_date = '2030-07-12' - asset.purchase_date = '2030-01-01' - asset.append("finance_books", { - "expected_value_after_useful_life": 1000, - "depreciation_method": "Written Down Value", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 12, - "depreciation_start_date": "2030-12-31" - }) - asset.save(ignore_permissions=True) + asset = create_asset(calculate_depreciation=1, + available_for_use_date="2030-07-12", purchase_date="2030-01-01", + depreciation_method="Written Down Value", + expected_value_after_useful_life=12500, depreciation_start_date="2030-12-31", + total_number_of_depreciations=3, frequency_of_depreciation=12) self.assertEqual(asset.finance_books[0].rate_of_depreciation, 50.0) expected_schedules = [ - ["2030-12-31", 942.47, 942.47], - ["2031-12-31", 3528.77, 4471.24], - ["2032-12-31", 1764.38, 6235.62], - ["2033-07-12", 764.38, 7000.00] + ["2030-12-31", 11780.82, 11780.82], + ["2031-12-31", 44109.59, 55890.41], + ["2032-12-31", 22054.8, 77945.21], + ["2033-07-12", 9554.79, 87500.0] ] schedules = [[cstr(d.schedule_date), flt(d.depreciation_amount, 2), flt(d.accumulated_depreciation_amount, 2)] @@ -1009,7 +923,7 @@ def create_asset(**args): if asset.calculate_depreciation: asset.append("finance_books", { - "depreciation_method": "Straight Line", + "depreciation_method": args.depreciation_method or "Straight Line", "frequency_of_depreciation": args.frequency_of_depreciation or 12, "total_number_of_depreciations": args.total_number_of_depreciations or 5, "expected_value_after_useful_life": args.expected_value_after_useful_life or 0, From 968be70bd1c0011792ea2c3887dc2f794b15d300 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 14 Oct 2021 22:32:27 +0530 Subject: [PATCH 035/200] fix: Remove PR creation from all tests in TestDepreciationBasics --- erpnext/assets/doctype/asset/test_asset.py | 92 +++++----------------- 1 file changed, 20 insertions(+), 72 deletions(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 8795b0223ee..cbfadc04706 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -744,17 +744,9 @@ class TestDepreciationBasics(AssetSetup): """Tests if post_depreciation_entries() works as expected.""" asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - available_for_use_date=getdate("2019-12-31"), do_not_save=1) - - asset.finance_books = [] - asset.append("finance_books", { - "depreciation_method": "Straight Line", - "frequency_of_depreciation": 12, - "total_number_of_depreciations": 3, - "expected_value_after_useful_life": 10000, - "depreciation_start_date": getdate("2020-12-31") - }) - asset.submit() + available_for_use_date="2019-12-31", depreciation_start_date="2020-12-31", + frequency_of_depreciation=12, total_number_of_depreciations=3, + expected_value_after_useful_life=10000, submit=1) post_depreciation_entries(date="2021-06-01") asset.load_from_db() @@ -767,17 +759,9 @@ class TestDepreciationBasics(AssetSetup): """Tests if clear_depreciation_schedule() works as expected.""" asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - available_for_use_date=getdate("2019-12-31"), do_not_save=1) - - asset.finance_books = [] - asset.append("finance_books", { - "depreciation_method": "Straight Line", - "frequency_of_depreciation": 12, - "total_number_of_depreciations": 3, - "expected_value_after_useful_life": 10000, - "depreciation_start_date": getdate("2020-12-31") - }) - asset.submit() + available_for_use_date="2019-12-31", depreciation_start_date="2020-12-31", + frequency_of_depreciation=12, total_number_of_depreciations=3, + expected_value_after_useful_life=10000, submit=1) post_depreciation_entries(date="2021-06-01") asset.load_from_db() @@ -787,22 +771,12 @@ class TestDepreciationBasics(AssetSetup): self.assertEqual(len(asset.schedules), 1) def test_depreciation_entry_cancellation(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=100000.0, location="Test Location") + asset = create_asset(item_code="Macbook Pro", + calculate_depreciation=1, purchase_date="2020-06-06", + available_for_use_date="2020-06-06", depreciation_start_date="2020-12-31", + frequency_of_depreciation=10, total_number_of_depreciations=3, + expected_value_after_useful_life=10000, submit=1) - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.available_for_use_date = '2020-06-06' - asset.purchase_date = '2020-06-06' - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Straight Line", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 10, - "depreciation_start_date": "2020-12-31" - }) - asset.submit() post_depreciation_entries(date="2021-01-01") asset.load_from_db() @@ -817,21 +791,11 @@ class TestDepreciationBasics(AssetSetup): self.assertFalse(depr_entry) def test_asset_expected_value_after_useful_life(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=100000.0, location="Test Location") + asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, + available_for_use_date="2020-06-06", purchase_date="2020-06-06", + frequency_of_depreciation=10, total_number_of_depreciations=3, + expected_value_after_useful_life=10000) - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.available_for_use_date = '2020-06-06' - asset.purchase_date = '2020-06-06' - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Straight Line", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 10 - }) - asset.save() accumulated_depreciation_after_full_schedule = \ max(d.accumulated_depreciation_amount for d in asset.get("schedules")) @@ -841,28 +805,12 @@ class TestDepreciationBasics(AssetSetup): self.assertTrue(asset.finance_books[0].expected_value_after_useful_life >= asset_value_after_full_schedule) def test_gle_made_by_depreciation_entries(self): - pr = make_purchase_receipt(item_code="Macbook Pro", - qty=1, rate=100000.0, location="Test Location") + asset = create_asset(item_code="Macbook Pro", + calculate_depreciation=1, purchase_date="2020-01-30", + available_for_use_date="2020-01-30", depreciation_start_date="2020-12-31", + frequency_of_depreciation=10, total_number_of_depreciations=3, + expected_value_after_useful_life=10000, submit=1) - finance_book = frappe.new_doc('Finance Book') - finance_book.finance_book_name = 'Income Tax' - finance_book.for_income_tax = 1 - finance_book.insert(ignore_if_duplicate=1) - - asset_name = frappe.db.get_value("Asset", {"purchase_receipt": pr.name}, 'name') - asset = frappe.get_doc('Asset', asset_name) - asset.calculate_depreciation = 1 - asset.purchase_date = '2020-01-30' - asset.available_for_use_date = "2020-01-30" - asset.append("finance_books", { - "expected_value_after_useful_life": 10000, - "depreciation_method": "Straight Line", - "total_number_of_depreciations": 3, - "frequency_of_depreciation": 10, - "depreciation_start_date": "2020-12-31" - }) - asset.submit() - asset.load_from_db() self.assertEqual(asset.status, "Submitted") frappe.db.set_value("Company", "_Test Company", "series_for_depreciation_entry", "DEPR-") From e9d310a13e902d7208a925bb577faba2604cd684 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Fri, 15 Oct 2021 01:45:53 +0530 Subject: [PATCH 036/200] fix: Format tests --- erpnext/assets/doctype/asset/test_asset.py | 406 ++++++++++++++------- 1 file changed, 269 insertions(+), 137 deletions(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 070a3e9f55a..523c8195ae2 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -149,9 +149,15 @@ class TestAsset(AssetSetup): self.assertEqual(doc.items[0].is_fixed_asset, 1) def test_scrap_asset(self): - asset = create_asset(calculate_depreciation=1, available_for_use_date='2020-01-01', - purchase_date = '2020-01-01', expected_value_after_useful_life=10000, - total_number_of_depreciations=10, frequency_of_depreciation=1, submit=1) + asset = create_asset( + calculate_depreciation = 1, + available_for_use_date = '2020-01-01', + purchase_date = '2020-01-01', + expected_value_after_useful_life = 10000, + total_number_of_depreciations = 10, + frequency_of_depreciation = 1, + submit = 1 + ) post_depreciation_entries(date=add_months('2020-01-01', 4)) @@ -179,10 +185,16 @@ class TestAsset(AssetSetup): self.assertEqual(asset.status, "Partially Depreciated") def test_gle_made_by_asset_sale(self): - asset = create_asset(calculate_depreciation=1, available_for_use_date='2020-06-06', - purchase_date = '2020-01-01', expected_value_after_useful_life=10000, - total_number_of_depreciations=3, frequency_of_depreciation=10, - depreciation_start_date='2020-12-31', submit=1) + asset = create_asset( + calculate_depreciation = 1, + available_for_use_date = '2020-06-06', + purchase_date = '2020-01-01', + expected_value_after_useful_life = 10000, + total_number_of_depreciations = 3, + frequency_of_depreciation = 10, + depreciation_start_date = '2020-12-31', + submit = 1 + ) post_depreciation_entries(date="2021-01-01") @@ -371,10 +383,15 @@ class TestAsset(AssetSetup): class TestDepreciationMethods(AssetSetup): def test_schedule_for_straight_line_method(self): - asset = create_asset(calculate_depreciation=1, - available_for_use_date="2030-01-01", purchase_date="2030-01-01", - expected_value_after_useful_life=10000, depreciation_start_date="2030-12-31", - total_number_of_depreciations=3, frequency_of_depreciation=12) + asset = create_asset( + calculate_depreciation = 1, + available_for_use_date = "2030-01-01", + purchase_date = "2030-01-01", + expected_value_after_useful_life = 10000, + depreciation_start_date = "2030-12-31", + total_number_of_depreciations = 3, + frequency_of_depreciation = 12 + ) self.assertEqual(asset.status, "Draft") expected_schedules = [ @@ -389,11 +406,17 @@ class TestDepreciationMethods(AssetSetup): self.assertEqual(schedules, expected_schedules) def test_schedule_for_straight_line_method_for_existing_asset(self): - asset = create_asset(calculate_depreciation=1, - available_for_use_date="2030-06-06", is_existing_asset=1, - number_of_depreciations_booked = 1, opening_accumulated_depreciation=40000, - expected_value_after_useful_life=10000, depreciation_start_date="2030-12-31", - total_number_of_depreciations=3, frequency_of_depreciation=12) + asset = create_asset( + calculate_depreciation = 1, + available_for_use_date = "2030-06-06", + is_existing_asset = 1, + number_of_depreciations_booked = 1, + opening_accumulated_depreciation = 40000, + expected_value_after_useful_life = 10000, + depreciation_start_date = "2030-12-31", + total_number_of_depreciations = 3, + frequency_of_depreciation = 12 + ) self.assertEqual(asset.status, "Draft") expected_schedules = [ @@ -407,11 +430,16 @@ class TestDepreciationMethods(AssetSetup): self.assertEqual(schedules, expected_schedules) def test_schedule_for_double_declining_method(self): - asset = create_asset(calculate_depreciation=1, - available_for_use_date="2030-01-01", purchase_date="2030-01-01", - depreciation_method="Double Declining Balance", - expected_value_after_useful_life=10000, depreciation_start_date="2030-12-31", - total_number_of_depreciations=3, frequency_of_depreciation=12) + asset = create_asset( + calculate_depreciation = 1, + available_for_use_date = "2030-01-01", + purchase_date = "2030-01-01", + depreciation_method = "Double Declining Balance", + expected_value_after_useful_life = 10000, + depreciation_start_date = "2030-12-31", + total_number_of_depreciations = 3, + frequency_of_depreciation = 12 + ) self.assertEqual(asset.status, "Draft") @@ -427,12 +455,18 @@ class TestDepreciationMethods(AssetSetup): self.assertEqual(schedules, expected_schedules) def test_schedule_for_double_declining_method_for_existing_asset(self): - asset = create_asset(calculate_depreciation=1, - available_for_use_date="2030-01-01", is_existing_asset=1, - depreciation_method="Double Declining Balance", - number_of_depreciations_booked = 1, opening_accumulated_depreciation=50000, - expected_value_after_useful_life=10000, depreciation_start_date="2030-12-31", - total_number_of_depreciations=3, frequency_of_depreciation=12) + asset = create_asset( + calculate_depreciation = 1, + available_for_use_date = "2030-01-01", + is_existing_asset = 1, + depreciation_method = "Double Declining Balance", + number_of_depreciations_booked = 1, + opening_accumulated_depreciation = 50000, + expected_value_after_useful_life = 10000, + depreciation_start_date = "2030-12-31", + total_number_of_depreciations = 3, + frequency_of_depreciation = 12 + ) self.assertEqual(asset.status, "Draft") @@ -447,11 +481,16 @@ class TestDepreciationMethods(AssetSetup): self.assertEqual(schedules, expected_schedules) def test_schedule_for_prorated_straight_line_method(self): - asset = create_asset(calculate_depreciation=1, - available_for_use_date="2030-01-30", purchase_date="2030-01-30", - depreciation_method="Straight Line", - expected_value_after_useful_life=10000, depreciation_start_date="2030-12-31", - total_number_of_depreciations=3, frequency_of_depreciation=12) + asset = create_asset( + calculate_depreciation = 1, + available_for_use_date = "2030-01-30", + purchase_date = "2030-01-30", + depreciation_method = "Straight Line", + expected_value_after_useful_life = 10000, + depreciation_start_date = "2030-12-31", + total_number_of_depreciations = 3, + frequency_of_depreciation = 12 + ) expected_schedules = [ ["2030-12-31", 27534.25, 27534.25], @@ -467,11 +506,16 @@ class TestDepreciationMethods(AssetSetup): # WDV: Written Down Value method def test_depreciation_entry_for_wdv_without_pro_rata(self): - asset = create_asset(calculate_depreciation=1, - available_for_use_date="2030-01-01", purchase_date="2030-01-01", - depreciation_method="Written Down Value", - expected_value_after_useful_life=12500, depreciation_start_date="2030-12-31", - total_number_of_depreciations=3, frequency_of_depreciation=12) + asset = create_asset( + calculate_depreciation = 1, + available_for_use_date = "2030-01-01", + purchase_date = "2030-01-01", + depreciation_method = "Written Down Value", + expected_value_after_useful_life = 12500, + depreciation_start_date = "2030-12-31", + total_number_of_depreciations = 3, + frequency_of_depreciation = 12 + ) self.assertEqual(asset.finance_books[0].rate_of_depreciation, 50.0) @@ -488,11 +532,16 @@ class TestDepreciationMethods(AssetSetup): # WDV: Written Down Value method def test_pro_rata_depreciation_entry_for_wdv(self): - asset = create_asset(calculate_depreciation=1, - available_for_use_date="2030-06-06", purchase_date="2030-01-01", - depreciation_method="Written Down Value", - expected_value_after_useful_life=12500, depreciation_start_date="2030-12-31", - total_number_of_depreciations=3, frequency_of_depreciation=12) + asset = create_asset( + calculate_depreciation = 1, + available_for_use_date = "2030-06-06", + purchase_date = "2030-01-01", + depreciation_method = "Written Down Value", + expected_value_after_useful_life = 12500, + depreciation_start_date = "2030-12-31", + total_number_of_depreciations = 3, + frequency_of_depreciation = 12 + ) self.assertEqual(asset.finance_books[0].rate_of_depreciation, 50.0) @@ -513,11 +562,16 @@ class TestDepreciationMethods(AssetSetup): company_flag = frappe.flags.company frappe.flags.company = "_Test Company" - asset = create_asset(calculate_depreciation=1, - available_for_use_date="2030-07-12", purchase_date="2030-01-01", - depreciation_method="Written Down Value", - expected_value_after_useful_life=12500, depreciation_start_date="2030-12-31", - total_number_of_depreciations=3, frequency_of_depreciation=12) + asset = create_asset( + calculate_depreciation = 1, + available_for_use_date = "2030-07-12", + purchase_date = "2030-01-01", + depreciation_method = "Written Down Value", + expected_value_after_useful_life = 12500, + depreciation_start_date = "2030-12-31", + total_number_of_depreciations = 3, + frequency_of_depreciation = 12 + ) self.assertEqual(asset.finance_books[0].rate_of_depreciation, 50.0) @@ -538,9 +592,15 @@ class TestDepreciationMethods(AssetSetup): class TestDepreciationBasics(AssetSetup): def test_depreciation_without_pro_rata(self): - asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, - expected_value_after_useful_life=10000, depreciation_start_date=getdate("2020-12-31"), submit=1) + asset = create_asset( + item_code = "Macbook Pro", + calculate_depreciation = 1, + available_for_use_date = getdate("2019-12-31"), + total_number_of_depreciations = 3, + expected_value_after_useful_life = 10000, + depreciation_start_date = getdate("2020-12-31"), + submit = 1 + ) expected_values = [ ["2020-12-31", 30000, 30000], @@ -554,9 +614,15 @@ class TestDepreciationBasics(AssetSetup): self.assertEqual(expected_values[i][2], schedule.accumulated_depreciation_amount) def test_depreciation_with_pro_rata(self): - asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, - expected_value_after_useful_life=10000, depreciation_start_date=getdate("2020-07-01"), submit=1) + asset = create_asset( + item_code = "Macbook Pro", + calculate_depreciation = 1, + available_for_use_date = getdate("2019-12-31"), + total_number_of_depreciations = 3, + expected_value_after_useful_life = 10000, + depreciation_start_date = getdate("2020-07-01"), + submit = 1 + ) expected_values = [ ["2020-07-01", 15000, 15000], @@ -575,16 +641,18 @@ class TestDepreciationBasics(AssetSetup): from erpnext.assets.doctype.asset.asset import get_depreciation_amount - asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - available_for_use_date=getdate("2019-12-31")) + asset = create_asset( + item_code = "Macbook Pro", + available_for_use_date = "2019-12-31" + ) - asset.finance_books = [] + asset.calculate_depreciation = 1 asset.append("finance_books", { "depreciation_method": "Straight Line", "frequency_of_depreciation": 12, "total_number_of_depreciations": 3, "expected_value_after_useful_life": 10000, - "depreciation_start_date": getdate("2020-12-31") + "depreciation_start_date": "2020-12-31" }) depreciation_amount = get_depreciation_amount(asset, 100000, asset.finance_books[0]) @@ -593,19 +661,16 @@ class TestDepreciationBasics(AssetSetup): def test_make_depreciation_schedule(self): """Tests if make_depreciation_schedule() returns the right values.""" - asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - available_for_use_date=getdate("2019-12-31"), do_not_save=1) - - asset.finance_books = [] - asset.append("finance_books", { - "depreciation_method": "Straight Line", - "frequency_of_depreciation": 12, - "total_number_of_depreciations": 3, - "expected_value_after_useful_life": 10000, - "depreciation_start_date": getdate("2020-12-31") - }) - - asset.make_depreciation_schedule(date_of_sale=None) + asset = create_asset( + item_code = "Macbook Pro", + calculate_depreciation = 1, + available_for_use_date = "2019-12-31", + depreciation_method = "Straight Line", + frequency_of_depreciation = 12, + total_number_of_depreciations = 3, + expected_value_after_useful_life = 1000, + depreciation_start_date = "2020-12-31" + ) expected_values = [ ['2020-12-31', 30000.0], @@ -620,20 +685,16 @@ class TestDepreciationBasics(AssetSetup): def test_set_accumulated_depreciation(self): """Tests if set_accumulated_depreciation() returns the right values.""" - asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - available_for_use_date=getdate("2019-12-31"), do_not_save=1) - - asset.finance_books = [] - asset.append("finance_books", { - "depreciation_method": "Straight Line", - "frequency_of_depreciation": 12, - "total_number_of_depreciations": 3, - "expected_value_after_useful_life": 10000, - "depreciation_start_date": getdate("2020-12-31") - }) - - asset.make_depreciation_schedule(date_of_sale=None) - asset.set_accumulated_depreciation() + asset = create_asset( + item_code = "Macbook Pro", + calculate_depreciation = 1, + available_for_use_date = "2019-12-31", + depreciation_method = "Straight Line", + frequency_of_depreciation = 12, + total_number_of_depreciations = 3, + expected_value_after_useful_life = 1000, + depreciation_start_date = "2020-12-31" + ) expected_values = [30000.0, 60000.0, 90000.0] @@ -643,16 +704,19 @@ class TestDepreciationBasics(AssetSetup): def test_check_is_pro_rata(self): """Tests if check_is_pro_rata() returns the right value(i.e. checks if has_pro_rata is accurate).""" - asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - available_for_use_date=getdate("2019-12-31"), do_not_save=1) + asset = create_asset( + item_code = "Macbook Pro", + available_for_use_date = "2019-12-31", + do_not_save = 1 + ) - asset.finance_books = [] + asset.calculate_depreciation = 1 asset.append("finance_books", { "depreciation_method": "Straight Line", "frequency_of_depreciation": 12, "total_number_of_depreciations": 3, "expected_value_after_useful_life": 10000, - "depreciation_start_date": getdate("2020-12-31") + "depreciation_start_date": "2020-12-31" }) has_pro_rata = asset.check_is_pro_rata(asset.finance_books[0]) @@ -664,7 +728,7 @@ class TestDepreciationBasics(AssetSetup): "frequency_of_depreciation": 12, "total_number_of_depreciations": 3, "expected_value_after_useful_life": 10000, - "depreciation_start_date": getdate("2020-07-01") + "depreciation_start_date": "2020-07-01" }) has_pro_rata = asset.check_is_pro_rata(asset.finance_books[0]) @@ -673,64 +737,103 @@ class TestDepreciationBasics(AssetSetup): def test_expected_value_after_useful_life_greater_than_purchase_amount(self): """Tests if an error is raised when expected_value_after_useful_life(110,000) > gross_purchase_amount(100,000).""" - asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, - expected_value_after_useful_life=110000, depreciation_start_date=getdate("2020-07-01"), do_not_save=1) + asset = create_asset( + item_code = "Macbook Pro", + calculate_depreciation = 1, + available_for_use_date = "2019-12-31", + total_number_of_depreciations = 3, + expected_value_after_useful_life = 110000, + depreciation_start_date = "2020-07-01", + do_not_save = 1 + ) self.assertRaises(frappe.ValidationError, asset.save) def test_depreciation_start_date(self): """Tests if an error is raised when neither depreciation_start_date nor available_for_use_date are specified.""" - asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - total_number_of_depreciations=3, expected_value_after_useful_life=110000, do_not_save=1) + asset = create_asset( + item_code = "Macbook Pro", + calculate_depreciation = 1, + total_number_of_depreciations = 3, + expected_value_after_useful_life = 110000, + do_not_save = 1 + ) self.assertRaises(frappe.ValidationError, asset.save) def test_opening_accumulated_depreciation(self): """Tests if an error is raised when opening_accumulated_depreciation > (gross_purchase_amount - expected_value_after_useful_life).""" - asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, - expected_value_after_useful_life=10000, depreciation_start_date=getdate("2020-07-01"), - opening_accumulated_depreciation=100000, do_not_save=1) + asset = create_asset( + item_code = "Macbook Pro", + calculate_depreciation = 1, + available_for_use_date = "2019-12-31", + total_number_of_depreciations = 3, + expected_value_after_useful_life = 10000, + depreciation_start_date = "2020-07-01", + opening_accumulated_depreciation = 100000, + do_not_save = 1 + ) self.assertRaises(frappe.ValidationError, asset.save) def test_number_of_depreciations_booked(self): """Tests if an error is raised when number_of_depreciations_booked is not specified when opening_accumulated_depreciation is.""" - asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, - expected_value_after_useful_life=10000, depreciation_start_date=getdate("2020-07-01"), - opening_accumulated_depreciation=10000, do_not_save=1) + asset = create_asset( + item_code = "Macbook Pro", + calculate_depreciation = 1, + available_for_use_date = "2019-12-31", + total_number_of_depreciations = 3, + expected_value_after_useful_life = 10000, + depreciation_start_date = "2020-07-01", + opening_accumulated_depreciation = 10000, + do_not_save = 1 + ) self.assertRaises(frappe.ValidationError, asset.save) def test_number_of_depreciations(self): """Tests if an error is raised when number_of_depreciations_booked > total_number_of_depreciations.""" - asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, - expected_value_after_useful_life=10000, depreciation_start_date=getdate("2020-07-01"), - opening_accumulated_depreciation=10000, number_of_depreciations_booked=5, - do_not_save=1) + asset = create_asset( + item_code = "Macbook Pro", + calculate_depreciation = 1, + available_for_use_date = "2019-12-31", + total_number_of_depreciations = 3, + expected_value_after_useful_life = 10000, + depreciation_start_date = "2020-07-01", + opening_accumulated_depreciation = 10000, + number_of_depreciations_booked = 5, + do_not_save = 1 + ) self.assertRaises(frappe.ValidationError, asset.save) def test_depreciation_start_date_is_before_purchase_date(self): - asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, - expected_value_after_useful_life=10000, depreciation_start_date=getdate("2014-07-01"), - do_not_save=1) + asset = create_asset( + item_code = "Macbook Pro", + calculate_depreciation = 1, + available_for_use_date = "2019-12-31", + total_number_of_depreciations = 3, + expected_value_after_useful_life = 10000, + depreciation_start_date = "2014-07-01", + do_not_save = 1 + ) self.assertRaises(frappe.ValidationError, asset.save) def test_depreciation_start_date_is_before_available_for_use_date(self): - asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - available_for_use_date=getdate("2019-12-31"), total_number_of_depreciations=3, - expected_value_after_useful_life=10000, depreciation_start_date=getdate("2018-07-01"), - do_not_save=1) + asset = create_asset( + item_code = "Macbook Pro", + calculate_depreciation = 1, + available_for_use_date = "2019-12-31", + total_number_of_depreciations = 3, + expected_value_after_useful_life = 10000, + depreciation_start_date = "2018-07-01", + do_not_save = 1 + ) self.assertRaises(frappe.ValidationError, asset.save) @@ -743,10 +846,16 @@ class TestDepreciationBasics(AssetSetup): def test_post_depreciation_entries(self): """Tests if post_depreciation_entries() works as expected.""" - asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - available_for_use_date="2019-12-31", depreciation_start_date="2020-12-31", - frequency_of_depreciation=12, total_number_of_depreciations=3, - expected_value_after_useful_life=10000, submit=1) + asset = create_asset( + item_code = "Macbook Pro", + calculate_depreciation = 1, + available_for_use_date = "2019-12-31", + depreciation_start_date = "2020-12-31", + frequency_of_depreciation = 12, + total_number_of_depreciations = 3, + expected_value_after_useful_life = 10000, + submit = 1 + ) post_depreciation_entries(date="2021-06-01") asset.load_from_db() @@ -758,10 +867,16 @@ class TestDepreciationBasics(AssetSetup): def test_clear_depreciation_schedule(self): """Tests if clear_depreciation_schedule() works as expected.""" - asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - available_for_use_date="2019-12-31", depreciation_start_date="2020-12-31", - frequency_of_depreciation=12, total_number_of_depreciations=3, - expected_value_after_useful_life=10000, submit=1) + asset = create_asset( + item_code = "Macbook Pro", + calculate_depreciation = 1, + available_for_use_date = "2019-12-31", + depreciation_start_date = "2020-12-31", + frequency_of_depreciation = 12, + total_number_of_depreciations = 3, + expected_value_after_useful_life = 10000, + submit = 1 + ) post_depreciation_entries(date="2021-06-01") asset.load_from_db() @@ -771,11 +886,17 @@ class TestDepreciationBasics(AssetSetup): self.assertEqual(len(asset.schedules), 1) def test_depreciation_entry_cancellation(self): - asset = create_asset(item_code="Macbook Pro", - calculate_depreciation=1, purchase_date="2020-06-06", - available_for_use_date="2020-06-06", depreciation_start_date="2020-12-31", - frequency_of_depreciation=10, total_number_of_depreciations=3, - expected_value_after_useful_life=10000, submit=1) + asset = create_asset( + item_code = "Macbook Pro", + calculate_depreciation = 1, + purchase_date = "2020-06-06", + available_for_use_date = "2020-06-06", + depreciation_start_date = "2020-12-31", + frequency_of_depreciation = 10, + total_number_of_depreciations = 3, + expected_value_after_useful_life = 10000, + submit = 1 + ) post_depreciation_entries(date="2021-01-01") @@ -791,10 +912,15 @@ class TestDepreciationBasics(AssetSetup): self.assertFalse(depr_entry) def test_asset_expected_value_after_useful_life(self): - asset = create_asset(item_code="Macbook Pro", calculate_depreciation=1, - available_for_use_date="2020-06-06", purchase_date="2020-06-06", - frequency_of_depreciation=10, total_number_of_depreciations=3, - expected_value_after_useful_life=10000) + asset = create_asset( + item_code = "Macbook Pro", + calculate_depreciation = 1, + available_for_use_date = "2020-06-06", + purchase_date = "2020-06-06", + frequency_of_depreciation = 10, + total_number_of_depreciations = 3, + expected_value_after_useful_life = 10000 + ) accumulated_depreciation_after_full_schedule = \ max(d.accumulated_depreciation_amount for d in asset.get("schedules")) @@ -805,11 +931,17 @@ class TestDepreciationBasics(AssetSetup): self.assertTrue(asset.finance_books[0].expected_value_after_useful_life >= asset_value_after_full_schedule) def test_gle_made_by_depreciation_entries(self): - asset = create_asset(item_code="Macbook Pro", - calculate_depreciation=1, purchase_date="2020-01-30", - available_for_use_date="2020-01-30", depreciation_start_date="2020-12-31", - frequency_of_depreciation=10, total_number_of_depreciations=3, - expected_value_after_useful_life=10000, submit=1) + asset = create_asset( + item_code = "Macbook Pro", + calculate_depreciation = 1, + purchase_date = "2020-01-30", + available_for_use_date = "2020-01-30", + depreciation_start_date = "2020-12-31", + frequency_of_depreciation = 10, + total_number_of_depreciations = 3, + expected_value_after_useful_life = 10000, + submit = 1 + ) self.assertEqual(asset.status, "Submitted") From 371b62136454f720a02b12644d6e57e7d9840a34 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Fri, 15 Oct 2021 04:02:27 +0530 Subject: [PATCH 037/200] fix: Compare date strings --- erpnext/assets/doctype/asset/test_asset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 523c8195ae2..c694677d8d7 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -679,7 +679,7 @@ class TestDepreciationBasics(AssetSetup): ] for i, schedule in enumerate(asset.schedules): - self.assertEqual(getdate(expected_values[i][0]), schedule.schedule_date) + self.assertEqual(expected_values[i][0], schedule.schedule_date) self.assertEqual(expected_values[i][1], schedule.depreciation_amount) def test_set_accumulated_depreciation(self): From 60aae4423dcf9e26557f0a44c2f7c206d54eb07b Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Fri, 15 Oct 2021 04:03:30 +0530 Subject: [PATCH 038/200] fix: Add missing digit --- erpnext/assets/doctype/asset/test_asset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index c694677d8d7..c28add80653 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -692,7 +692,7 @@ class TestDepreciationBasics(AssetSetup): depreciation_method = "Straight Line", frequency_of_depreciation = 12, total_number_of_depreciations = 3, - expected_value_after_useful_life = 1000, + expected_value_after_useful_life = 10000, depreciation_start_date = "2020-12-31" ) From fdeb273fa06670d802847199d57ecd40dbecd476 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Fri, 15 Oct 2021 04:53:23 +0530 Subject: [PATCH 039/200] fix: Sider issues --- erpnext/assets/doctype/asset/test_asset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index c28add80653..6dd7a5be71f 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -410,7 +410,7 @@ class TestDepreciationMethods(AssetSetup): calculate_depreciation = 1, available_for_use_date = "2030-06-06", is_existing_asset = 1, - number_of_depreciations_booked = 1, + number_of_depreciations_booked = 1, opening_accumulated_depreciation = 40000, expected_value_after_useful_life = 10000, depreciation_start_date = "2030-12-31", @@ -460,7 +460,7 @@ class TestDepreciationMethods(AssetSetup): available_for_use_date = "2030-01-01", is_existing_asset = 1, depreciation_method = "Double Declining Balance", - number_of_depreciations_booked = 1, + number_of_depreciations_booked = 1, opening_accumulated_depreciation = 50000, expected_value_after_useful_life = 10000, depreciation_start_date = "2030-12-31", From 0b8cb5dd47816b87cfea2176ffa76c889bb9d383 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Fri, 15 Oct 2021 04:56:00 +0530 Subject: [PATCH 040/200] fix: Add missing digit --- erpnext/assets/doctype/asset/test_asset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 6dd7a5be71f..c44c63ae9e4 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -668,7 +668,7 @@ class TestDepreciationBasics(AssetSetup): depreciation_method = "Straight Line", frequency_of_depreciation = 12, total_number_of_depreciations = 3, - expected_value_after_useful_life = 1000, + expected_value_after_useful_life = 10000, depreciation_start_date = "2020-12-31" ) From ac381d21fe94b99406b4d7d332a6356a41bd8e26 Mon Sep 17 00:00:00 2001 From: Saqib Date: Mon, 18 Oct 2021 10:43:15 +0530 Subject: [PATCH 041/200] fix: sider --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 0c3eff2a030..290c7fe60b2 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1997,8 +1997,7 @@ def get_mode_of_payments_info(mode_of_payments, company): mp.name in (%s) group by mp.name - """, - (company, mode_of_payments), as_dict=1) + """, (company, mode_of_payments), as_dict=1) return {row.get('mop'): row for row in data} From 1aa34d178051c9b1ec20bf45171bd12d6df4d151 Mon Sep 17 00:00:00 2001 From: Dany Robert Date: Mon, 18 Oct 2021 18:46:45 +0530 Subject: [PATCH 042/200] fix: incorrect VAT Amount in UAT VAT 201 report --- erpnext/regional/report/uae_vat_201/uae_vat_201.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/regional/report/uae_vat_201/uae_vat_201.py b/erpnext/regional/report/uae_vat_201/uae_vat_201.py index f4c049d1623..8507b0effb2 100644 --- a/erpnext/regional/report/uae_vat_201/uae_vat_201.py +++ b/erpnext/regional/report/uae_vat_201/uae_vat_201.py @@ -122,7 +122,7 @@ def get_total_emiratewise(filters): try: return frappe.db.sql(""" select - s.vat_emirate as emirate, sum(i.base_amount) as total, sum(s.total_taxes_and_charges) + s.vat_emirate as emirate, sum(i.base_amount) as total, s.total_taxes_and_charges from `tabSales Invoice Item` i inner join `tabSales Invoice` s on From 4c499e804a29ac6639de6df9cfd6704f338a58c3 Mon Sep 17 00:00:00 2001 From: Dany Robert Date: Tue, 19 Oct 2021 14:12:59 +0530 Subject: [PATCH 043/200] fix: wrong vat amount --- erpnext/regional/report/uae_vat_201/uae_vat_201.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/regional/report/uae_vat_201/uae_vat_201.py b/erpnext/regional/report/uae_vat_201/uae_vat_201.py index 8507b0effb2..2b5ecc3b18c 100644 --- a/erpnext/regional/report/uae_vat_201/uae_vat_201.py +++ b/erpnext/regional/report/uae_vat_201/uae_vat_201.py @@ -122,7 +122,7 @@ def get_total_emiratewise(filters): try: return frappe.db.sql(""" select - s.vat_emirate as emirate, sum(i.base_amount) as total, s.total_taxes_and_charges + s.vat_emirate as emirate, sum(i.base_amount) as total, sum(i.tax_amount) from `tabSales Invoice Item` i inner join `tabSales Invoice` s on From 8b547e39a872f3ce5c785d1e905bff58496db8d6 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Thu, 21 Oct 2021 12:06:02 +0530 Subject: [PATCH 044/200] feat: Taxes template for selling/buying doctypes Depends on the new Print Format Builder frappe/frappe#14134 --- .../print_format_field_template/__init__.py | 0 .../purchase_invoice_taxes/__init__.py | 0 .../purchase_invoice_taxes.json | 16 +++++++++ .../sales_invoice_taxes/__init__.py | 0 .../sales_invoice_taxes.json | 16 +++++++++ .../print_format_field_template/__init__.py | 0 .../purchase_order_taxes/__init__.py | 0 .../purchase_order_taxes.json | 16 +++++++++ .../supplier_quotation_taxes/__init__.py | 0 .../supplier_quotation_taxes.json | 16 +++++++++ .../print_format_field_template/__init__.py | 0 .../quotation_taxes/__init__.py | 0 .../quotation_taxes/quotation_taxes.json | 16 +++++++++ .../sales_order_taxes/__init__.py | 0 .../sales_order_taxes/sales_order_taxes.json | 16 +++++++++ .../includes/taxes_and_charges.html | 34 +++++++++++++++++++ 16 files changed, 130 insertions(+) create mode 100644 erpnext/accounts/print_format_field_template/__init__.py create mode 100644 erpnext/accounts/print_format_field_template/purchase_invoice_taxes/__init__.py create mode 100644 erpnext/accounts/print_format_field_template/purchase_invoice_taxes/purchase_invoice_taxes.json create mode 100644 erpnext/accounts/print_format_field_template/sales_invoice_taxes/__init__.py create mode 100644 erpnext/accounts/print_format_field_template/sales_invoice_taxes/sales_invoice_taxes.json create mode 100644 erpnext/buying/print_format_field_template/__init__.py create mode 100644 erpnext/buying/print_format_field_template/purchase_order_taxes/__init__.py create mode 100644 erpnext/buying/print_format_field_template/purchase_order_taxes/purchase_order_taxes.json create mode 100644 erpnext/buying/print_format_field_template/supplier_quotation_taxes/__init__.py create mode 100644 erpnext/buying/print_format_field_template/supplier_quotation_taxes/supplier_quotation_taxes.json create mode 100644 erpnext/selling/print_format_field_template/__init__.py create mode 100644 erpnext/selling/print_format_field_template/quotation_taxes/__init__.py create mode 100644 erpnext/selling/print_format_field_template/quotation_taxes/quotation_taxes.json create mode 100644 erpnext/selling/print_format_field_template/sales_order_taxes/__init__.py create mode 100644 erpnext/selling/print_format_field_template/sales_order_taxes/sales_order_taxes.json create mode 100644 erpnext/templates/print_formats/includes/taxes_and_charges.html diff --git a/erpnext/accounts/print_format_field_template/__init__.py b/erpnext/accounts/print_format_field_template/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/print_format_field_template/purchase_invoice_taxes/__init__.py b/erpnext/accounts/print_format_field_template/purchase_invoice_taxes/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/print_format_field_template/purchase_invoice_taxes/purchase_invoice_taxes.json b/erpnext/accounts/print_format_field_template/purchase_invoice_taxes/purchase_invoice_taxes.json new file mode 100644 index 00000000000..f525f7b8d42 --- /dev/null +++ b/erpnext/accounts/print_format_field_template/purchase_invoice_taxes/purchase_invoice_taxes.json @@ -0,0 +1,16 @@ +{ + "creation": "2021-10-19 18:06:53.083133", + "docstatus": 0, + "doctype": "Print Format Field Template", + "document_type": "Purchase Invoice", + "field": "taxes", + "idx": 0, + "modified": "2021-10-19 18:06:53.083133", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Purchase Invoice Taxes", + "owner": "Administrator", + "standard": 1, + "template": "", + "template_file": "templates/print_formats/includes/taxes_and_charges.html" +} \ No newline at end of file diff --git a/erpnext/accounts/print_format_field_template/sales_invoice_taxes/__init__.py b/erpnext/accounts/print_format_field_template/sales_invoice_taxes/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/print_format_field_template/sales_invoice_taxes/sales_invoice_taxes.json b/erpnext/accounts/print_format_field_template/sales_invoice_taxes/sales_invoice_taxes.json new file mode 100644 index 00000000000..8ce62a8b26f --- /dev/null +++ b/erpnext/accounts/print_format_field_template/sales_invoice_taxes/sales_invoice_taxes.json @@ -0,0 +1,16 @@ +{ + "creation": "2021-10-19 17:50:00.152759", + "docstatus": 0, + "doctype": "Print Format Field Template", + "document_type": "Sales Invoice", + "field": "taxes", + "idx": 0, + "modified": "2021-10-19 18:13:20.894207", + "modified_by": "Administrator", + "module": "Accounts", + "name": "Sales Invoice Taxes", + "owner": "Administrator", + "standard": 1, + "template": "", + "template_file": "templates/print_formats/includes/taxes_and_charges.html" +} \ No newline at end of file diff --git a/erpnext/buying/print_format_field_template/__init__.py b/erpnext/buying/print_format_field_template/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/buying/print_format_field_template/purchase_order_taxes/__init__.py b/erpnext/buying/print_format_field_template/purchase_order_taxes/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/buying/print_format_field_template/purchase_order_taxes/purchase_order_taxes.json b/erpnext/buying/print_format_field_template/purchase_order_taxes/purchase_order_taxes.json new file mode 100644 index 00000000000..73b77308949 --- /dev/null +++ b/erpnext/buying/print_format_field_template/purchase_order_taxes/purchase_order_taxes.json @@ -0,0 +1,16 @@ +{ + "creation": "2021-10-19 18:07:19.253457", + "docstatus": 0, + "doctype": "Print Format Field Template", + "document_type": "Purchase Order", + "field": "taxes", + "idx": 0, + "modified": "2021-10-19 18:07:19.253457", + "modified_by": "Administrator", + "module": "Buying", + "name": "Purchase Order Taxes", + "owner": "Administrator", + "standard": 1, + "template": "", + "template_file": "templates/print_formats/includes/taxes_and_charges.html" +} \ No newline at end of file diff --git a/erpnext/buying/print_format_field_template/supplier_quotation_taxes/__init__.py b/erpnext/buying/print_format_field_template/supplier_quotation_taxes/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/buying/print_format_field_template/supplier_quotation_taxes/supplier_quotation_taxes.json b/erpnext/buying/print_format_field_template/supplier_quotation_taxes/supplier_quotation_taxes.json new file mode 100644 index 00000000000..2be17a1b012 --- /dev/null +++ b/erpnext/buying/print_format_field_template/supplier_quotation_taxes/supplier_quotation_taxes.json @@ -0,0 +1,16 @@ +{ + "creation": "2021-10-19 18:09:08.103919", + "docstatus": 0, + "doctype": "Print Format Field Template", + "document_type": "Supplier Quotation", + "field": "taxes", + "idx": 0, + "modified": "2021-10-19 18:09:08.103919", + "modified_by": "Administrator", + "module": "Buying", + "name": "Supplier Quotation Taxes", + "owner": "Administrator", + "standard": 1, + "template": "", + "template_file": "templates/print_formats/includes/taxes_and_charges.html" +} \ No newline at end of file diff --git a/erpnext/selling/print_format_field_template/__init__.py b/erpnext/selling/print_format_field_template/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/selling/print_format_field_template/quotation_taxes/__init__.py b/erpnext/selling/print_format_field_template/quotation_taxes/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/selling/print_format_field_template/quotation_taxes/quotation_taxes.json b/erpnext/selling/print_format_field_template/quotation_taxes/quotation_taxes.json new file mode 100644 index 00000000000..eaa17cedf05 --- /dev/null +++ b/erpnext/selling/print_format_field_template/quotation_taxes/quotation_taxes.json @@ -0,0 +1,16 @@ +{ + "creation": "2021-10-19 15:48:56.416449", + "docstatus": 0, + "doctype": "Print Format Field Template", + "document_type": "Quotation", + "field": "taxes", + "idx": 0, + "modified": "2021-10-19 18:11:33.553722", + "modified_by": "Administrator", + "module": "Selling", + "name": "Quotation Taxes", + "owner": "Administrator", + "standard": 1, + "template": "", + "template_file": "templates/print_formats/includes/taxes_and_charges.html" +} \ No newline at end of file diff --git a/erpnext/selling/print_format_field_template/sales_order_taxes/__init__.py b/erpnext/selling/print_format_field_template/sales_order_taxes/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/selling/print_format_field_template/sales_order_taxes/sales_order_taxes.json b/erpnext/selling/print_format_field_template/sales_order_taxes/sales_order_taxes.json new file mode 100644 index 00000000000..2aacb440ff8 --- /dev/null +++ b/erpnext/selling/print_format_field_template/sales_order_taxes/sales_order_taxes.json @@ -0,0 +1,16 @@ +{ + "creation": "2021-10-19 18:04:24.443076", + "docstatus": 0, + "doctype": "Print Format Field Template", + "document_type": "Sales Order", + "field": "taxes", + "idx": 0, + "modified": "2021-10-19 18:04:24.443076", + "modified_by": "Administrator", + "module": "Selling", + "name": "Sales Order Taxes", + "owner": "Administrator", + "standard": 1, + "template": "", + "template_file": "templates/print_formats/includes/taxes_and_charges.html" +} \ No newline at end of file diff --git a/erpnext/templates/print_formats/includes/taxes_and_charges.html b/erpnext/templates/print_formats/includes/taxes_and_charges.html new file mode 100644 index 00000000000..0d8e3834d81 --- /dev/null +++ b/erpnext/templates/print_formats/includes/taxes_and_charges.html @@ -0,0 +1,34 @@ +{% macro render_row(label, value) %} +
+
+
{{ label }}
+
+
+ {{ value }} +
+
+{% endmacro %} + +{%- macro render_discount_amount(doc) -%} + {%- if doc.discount_amount -%} + {{ render_row(_(doc.meta.get_label('discount_amount')), '- ' + doc.get_formatted("discount_amount", doc)) }} + {%- endif -%} +{%- endmacro -%} + +
+
+
+ {%- if doc.apply_discount_on == "Net Total" -%} + {{ render_discount_amount(doc) }} + {%- endif -%} + {%- for charge in doc.taxes -%} + {%- if (charge.tax_amount or print_settings.print_taxes_with_zero_amount) and (not charge.included_in_print_rate or doc.flags.show_inclusive_tax_in_print) -%} + {{ render_row(charge.get_formatted("description"), charge.get_formatted('tax_amount', doc)) }} + {%- endif -%} + {%- endfor -%} + {%- if doc.apply_discount_on == "Grand Total" -%} + {{ render_discount_amount(doc) }} + {%- endif -%} +
+
+ From c6d06816cfbafef05d79c26df166cc6cd7c18b48 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 21 Oct 2021 15:37:59 +0530 Subject: [PATCH 045/200] fix: Auto update company address check on linking with company --- erpnext/accounts/custom/address.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/accounts/custom/address.py b/erpnext/accounts/custom/address.py index a6d08d8ff61..551048e50b4 100644 --- a/erpnext/accounts/custom/address.py +++ b/erpnext/accounts/custom/address.py @@ -10,6 +10,7 @@ from frappe.contacts.doctype.address.address import ( class ERPNextAddress(Address): def validate(self): self.validate_reference() + self.update_compnay_address() super(ERPNextAddress, self).validate() def link_address(self): @@ -19,6 +20,11 @@ class ERPNextAddress(Address): return super(ERPNextAddress, self).link_address() + def update_compnay_address(self): + for link in self.get('links'): + if link.link_doctype == 'Company': + self.is_your_company_address = 1 + def validate_reference(self): if self.is_your_company_address and not [ row for row in self.links if row.link_doctype == "Company" From 7733afc0ae7e5e3a67b8e498a282ac5fb54afabf Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 21 Oct 2021 16:13:00 +0530 Subject: [PATCH 046/200] fix(minor): Filters and fixes in Tax Withholding Category --- .../tax_withholding_category/tax_withholding_category.js | 3 ++- .../tax_withholding_category/tax_withholding_category.py | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.js b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.js index b8d6c9af3a9..7b479749465 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.js +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.js @@ -8,7 +8,8 @@ frappe.ui.form.on('Tax Withholding Category', { if (child.company) { return { filters: { - 'company': child.company + 'company': child.company, + 'root_type': ['in', ['Asset', 'Liability']] } }; } diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index c3cb8396d0d..c36f3cb201b 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -13,6 +13,7 @@ from frappe.utils import cint, getdate class TaxWithholdingCategory(Document): def validate(self): self.validate_dates() + self.validate_accounts() self.validate_thresholds() def validate_dates(self): @@ -25,6 +26,14 @@ class TaxWithholdingCategory(Document): if last_date and getdate(d.to_date) < getdate(last_date): frappe.throw(_("Row #{0}: Dates overlapping with other row").format(d.idx)) + def validate_accounts(self): + existing_accounts = [] + for d in self.get('accounts'): + if d.get('account') in existing_accounts: + frappe.throw(_("Account {0} added multiple times").format(frappe.bold(d.get('account')))) + + existing_accounts.append(d.get('account')) + def validate_thresholds(self): for d in self.get('rates'): if d.cumulative_threshold and d.cumulative_threshold < d.single_threshold: From a20058a3436f63afb4c537916aeffacdac14c786 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 21 Oct 2021 17:52:13 +0530 Subject: [PATCH 047/200] fix(minor): Add mandatory depends on condition for reference no and date fields --- .../doctype/payment_entry/payment_entry.json | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.json b/erpnext/accounts/doctype/payment_entry/payment_entry.json index 6f362c1fbb9..ee2e319a6fc 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.json +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.json @@ -27,10 +27,12 @@ "payment_accounts_section", "party_balance", "paid_from", + "paid_from_account_type", "paid_from_account_currency", "paid_from_account_balance", "column_break_18", "paid_to", + "paid_to_account_type", "paid_to_account_currency", "paid_to_account_balance", "payment_amounts_section", @@ -440,7 +442,8 @@ "depends_on": "eval:(doc.paid_from && doc.paid_to)", "fieldname": "reference_no", "fieldtype": "Data", - "label": "Cheque/Reference No" + "label": "Cheque/Reference No", + "mandatory_depends_on": "eval:(doc.paid_from_account_type == 'Bank' || doc.paid_to_account_type == 'Bank')" }, { "fieldname": "column_break_23", @@ -452,6 +455,7 @@ "fieldname": "reference_date", "fieldtype": "Date", "label": "Cheque/Reference Date", + "mandatory_depends_on": "eval:(doc.paid_from_account_type == 'Bank' || doc.paid_to_account_type == 'Bank')", "search_index": 1 }, { @@ -707,15 +711,30 @@ "label": "Received Amount After Tax (Company Currency)", "options": "Company:company:default_currency", "read_only": 1 + }, + { + "fetch_from": "paid_from.account_type", + "fieldname": "paid_from_account_type", + "fieldtype": "Data", + "hidden": 1, + "label": "Paid From Account Type" + }, + { + "fetch_from": "paid_to.account_type", + "fieldname": "paid_to_account_type", + "fieldtype": "Data", + "hidden": 1, + "label": "Paid To Account Type" } ], "index_web_pages_for_search": 1, "is_submittable": 1, "links": [], - "modified": "2021-07-09 08:58:15.008761", + "modified": "2021-10-22 17:50:24.632806", "modified_by": "Administrator", "module": "Accounts", "name": "Payment Entry", + "naming_rule": "By \"Naming Series\" field", "owner": "Administrator", "permissions": [ { From 65025fb628d55a97d3c2281760d7d5954ac44912 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 21 Oct 2021 19:29:18 +0530 Subject: [PATCH 048/200] fix: Update receivable/payable account on company change --- .../accounts/doctype/purchase_invoice/purchase_invoice.js | 6 ++++++ erpnext/accounts/doctype/sales_invoice/sales_invoice.js | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 6c74d2b438f..3526e488e11 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -590,5 +590,11 @@ frappe.ui.form.on("Purchase Invoice", { company: function(frm) { erpnext.accounts.dimensions.update_dimension(frm, frm.doctype); + + if (frm.doc.company) { + frappe.db.get_value('Company', frm.doc.company, 'default_payable_account', (r) => { + frm.set_value('credit_to', r.default_payable_account); + }); + } }, }) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index 73e12843047..bee153b7b8f 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -12,6 +12,13 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e } company() { erpnext.accounts.dimensions.update_dimension(this.frm, this.frm.doctype); + + let me = this; + if (this.frm.doc.company) { + frappe.db.get_value('Company', this.frm.doc.company, 'default_receivable_account', (r) => { + me.frm.set_value('debit_to', r.default_receivable_account); + }); + } } onload() { var me = this; From 59c31bb124048a0bbf203311ff7e4ce09feadb28 Mon Sep 17 00:00:00 2001 From: Anuja Pawar Date: Fri, 22 Oct 2021 19:26:31 +0530 Subject: [PATCH 049/200] fix: check if gst_category exist --- erpnext/regional/india/utils.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 0e4128024d3..46cf9f22536 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -29,12 +29,13 @@ def validate_gstin_for_india(doc, method): gst_category = [] - if len(doc.links): - link_doctype = doc.links[0].get("link_doctype") - link_name = doc.links[0].get("link_name") + if hasattr(doc, 'gst_category'): + if len(doc.links): + link_doctype = doc.links[0].get("link_doctype") + link_name = doc.links[0].get("link_name") - if link_doctype in ["Customer", "Supplier"]: - gst_category = frappe.db.get_value(link_doctype, {'name': link_name}, ['gst_category']) + if link_doctype in ["Customer", "Supplier"]: + gst_category = frappe.db.get_value(link_doctype, {'name': link_name}, ['gst_category']) doc.gstin = doc.gstin.upper().strip() if not doc.gstin or doc.gstin == 'NA': @@ -76,12 +77,13 @@ def validate_tax_category(doc, method): frappe.throw(_("Intra State tax category for GST State {0} already exists").format(doc.gst_state)) def update_gst_category(doc, method): - for link in doc.links: - if link.link_doctype in ['Customer', 'Supplier']: - if doc.get('gstin'): - frappe.db.sql(""" - UPDATE `tab{0}` SET gst_category = %s WHERE name = %s AND gst_category = 'Unregistered' - """.format(link.link_doctype), ("Registered Regular", link.link_name)) #nosec + if hasattr(doc, 'gst_category'): + for link in doc.links: + if link.link_doctype in ['Customer', 'Supplier']: + if doc.get('gstin'): + frappe.db.sql(""" + UPDATE `tab{0}` SET gst_category = %s WHERE name = %s AND gst_category = 'Unregistered' + """.format(link.link_doctype), ("Registered Regular", link.link_name)) #nosec def set_gst_state_and_state_number(doc): if not doc.gst_state: From 4f538376243647b779b0b35a2017264881d4ed41 Mon Sep 17 00:00:00 2001 From: Anuja Pawar Date: Fri, 22 Oct 2021 20:43:54 +0530 Subject: [PATCH 050/200] fix: sider --- erpnext/regional/india/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 46cf9f22536..14302cde89b 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -83,7 +83,7 @@ def update_gst_category(doc, method): if doc.get('gstin'): frappe.db.sql(""" UPDATE `tab{0}` SET gst_category = %s WHERE name = %s AND gst_category = 'Unregistered' - """.format(link.link_doctype), ("Registered Regular", link.link_name)) #nosec + """.format(link.link_doctype), ("Registered Regular", link.link_name)) #nosec def set_gst_state_and_state_number(doc): if not doc.gst_state: From 6a3bd882b42f62db4404841b4e338ead938b7417 Mon Sep 17 00:00:00 2001 From: Anuja Pawar Date: Fri, 22 Oct 2021 20:44:49 +0530 Subject: [PATCH 051/200] fix: sider --- erpnext/regional/india/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 14302cde89b..936d5539bcc 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -82,8 +82,8 @@ def update_gst_category(doc, method): if link.link_doctype in ['Customer', 'Supplier']: if doc.get('gstin'): frappe.db.sql(""" - UPDATE `tab{0}` SET gst_category = %s WHERE name = %s AND gst_category = 'Unregistered' - """.format(link.link_doctype), ("Registered Regular", link.link_name)) #nosec + UPDATE `tab{0}` SET gst_category = %s WHERE name = %s AND gst_category = 'Unregistered' """ + .format(link.link_doctype), ("Registered Regular", link.link_name)) #nosec def set_gst_state_and_state_number(doc): if not doc.gst_state: From e6e804e7d783a43d13dafe7b16f6e5d3b750f1d3 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sat, 23 Oct 2021 18:58:41 +0530 Subject: [PATCH 052/200] fix: Get LTDS based on tax withholding category --- .../doctype/tax_withholding_category/tax_withholding_category.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index c3cb8396d0d..54042fbe748 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -165,6 +165,7 @@ def get_lower_deduction_certificate(tax_details, pan_no): ldc_name = frappe.db.get_value('Lower Deduction Certificate', { 'pan_no': pan_no, + 'tax_withholding_category': tax_details.tax_withholding_category, 'valid_from': ('>=', tax_details.from_date), 'valid_upto': ('<=', tax_details.to_date) }, 'name') From bf13d183d8066219379a5e00c4ace4ca2f6c155b Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sat, 23 Oct 2021 19:00:03 +0530 Subject: [PATCH 053/200] fix: Replace section code with tax withholding category in LDC --- erpnext/patches.txt | 1 + .../update_category_in_ltds_certificate.py | 10 ++++++++++ .../lower_deduction_certificate.json | 20 ++++++++++--------- .../lower_deduction_certificate.py | 12 ++++++----- 4 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 erpnext/patches/v13_0/update_category_in_ltds_certificate.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index e446d6be42f..daea70cf62b 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -310,3 +310,4 @@ erpnext.patches.v13_0.enable_scheduler_job_for_item_reposting erpnext.patches.v13_0.requeue_failed_reposts erpnext.patches.v13_0.healthcare_deprecation_warning erpnext.patches.v14_0.delete_healthcare_doctypes +erpnext.patches.v13_0.update_category_in_ltds_certificate diff --git a/erpnext/patches/v13_0/update_category_in_ltds_certificate.py b/erpnext/patches/v13_0/update_category_in_ltds_certificate.py new file mode 100644 index 00000000000..f8a0646fcbb --- /dev/null +++ b/erpnext/patches/v13_0/update_category_in_ltds_certificate.py @@ -0,0 +1,10 @@ +import frappe + + +def execute(): + + frappe.db.sql(""" + UPDATE `tabLower Deduction Certificate` l, `tabSupplier` s + SET l.tax_withholding_category = s.tax_withholding_category + WHERE l.supplier = s.name + """) \ No newline at end of file diff --git a/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.json b/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.json index f48fe6f4763..c32ab6bec24 100644 --- a/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.json +++ b/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.json @@ -7,7 +7,7 @@ "engine": "InnoDB", "field_order": [ "certificate_details_section", - "section_code", + "tax_withholding_category", "fiscal_year", "column_break_3", "certificate_no", @@ -33,13 +33,6 @@ "reqd": 1, "unique": 1 }, - { - "fieldname": "section_code", - "fieldtype": "Select", - "label": "Section Code", - "options": "192\n193\n194\n194A\n194C\n194D\n194H\n194I\n194J\n194LA\n194LBB\n194LBC\n195", - "reqd": 1 - }, { "fieldname": "section_break_3", "fieldtype": "Section Break", @@ -123,13 +116,22 @@ "label": "Fiscal Year", "options": "Fiscal Year", "reqd": 1 + }, + { + "fieldname": "tax_withholding_category", + "fieldtype": "Link", + "label": "Tax Withholding Category", + "options": "Tax Withholding Category", + "reqd": 1 } ], + "index_web_pages_for_search": 1, "links": [], - "modified": "2020-04-23 23:04:41.203721", + "modified": "2021-10-23 18:33:38.962622", "modified_by": "Administrator", "module": "Regional", "name": "Lower Deduction Certificate", + "naming_rule": "By fieldname", "owner": "Administrator", "permissions": [], "sort_field": "modified", diff --git a/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.py b/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.py index d8553f1d913..7afbc00980c 100644 --- a/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.py +++ b/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.py @@ -15,7 +15,7 @@ from erpnext.accounts.utils import get_fiscal_year class LowerDeductionCertificate(Document): def validate(self): self.validate_dates() - self.validate_supplier_against_section_code() + self.validate_supplier_against_tax_category() def validate_dates(self): if getdate(self.valid_upto) < getdate(self.valid_from): @@ -31,12 +31,14 @@ class LowerDeductionCertificate(Document): <= fiscal_year.year_end_date): frappe.throw(_("Valid Upto date not in Fiscal Year {0}").format(frappe.bold(self.fiscal_year))) - def validate_supplier_against_section_code(self): - duplicate_certificate = frappe.db.get_value('Lower Deduction Certificate', {'supplier': self.supplier, 'section_code': self.section_code}, ['name', 'valid_from', 'valid_upto'], as_dict=True) + def tax_withholding_category(self): + duplicate_certificate = frappe.db.get_value('Lower Deduction Certificate', + {'supplier': self.supplier, 'tax_withholding_category': self.tax_withholding_category, 'name': ("!=", self.name)}, + ['name', 'valid_from', 'valid_upto'], as_dict=True) if duplicate_certificate and self.are_dates_overlapping(duplicate_certificate): certificate_link = get_link_to_form('Lower Deduction Certificate', duplicate_certificate.name) - frappe.throw(_("There is already a valid Lower Deduction Certificate {0} for Supplier {1} against Section Code {2} for this time period.") - .format(certificate_link, frappe.bold(self.supplier), frappe.bold(self.section_code))) + frappe.throw(_("There is already a valid Lower Deduction Certificate {0} for Supplier {1} against category {2} for this time period.") + .format(certificate_link, frappe.bold(self.supplier), frappe.bold(self.tax_withholding_category))) def are_dates_overlapping(self,duplicate_certificate): valid_from = duplicate_certificate.valid_from From e3ae8d5a1e6bc1251feae63f51215e9ce3c2365a Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 20 Oct 2021 22:10:21 +0530 Subject: [PATCH 054/200] fix: Move PAN field from standard doctype to fixtures for India --- erpnext/buying/doctype/supplier/supplier.json | 9 ++----- erpnext/patches.txt | 1 + .../v13_0/create_pan_field_for_india.py | 25 +++++++++++++++++++ erpnext/regional/india/setup.py | 16 ++++++++++-- .../selling/doctype/customer/customer.json | 12 +++------ 5 files changed, 45 insertions(+), 18 deletions(-) create mode 100644 erpnext/patches/v13_0/create_pan_field_for_india.py diff --git a/erpnext/buying/doctype/supplier/supplier.json b/erpnext/buying/doctype/supplier/supplier.json index 12a09cdd0ec..a57d9a92bb3 100644 --- a/erpnext/buying/doctype/supplier/supplier.json +++ b/erpnext/buying/doctype/supplier/supplier.json @@ -25,7 +25,6 @@ "column_break0", "supplier_group", "supplier_type", - "pan", "allow_purchase_invoice_creation_without_purchase_order", "allow_purchase_invoice_creation_without_purchase_receipt", "disabled", @@ -176,11 +175,6 @@ "options": "Company\nIndividual", "reqd": 1 }, - { - "fieldname": "pan", - "fieldtype": "Data", - "label": "PAN" - }, { "fieldname": "language", "fieldtype": "Link", @@ -438,11 +432,12 @@ "link_fieldname": "party" } ], - "modified": "2021-09-06 17:37:56.522233", + "modified": "2021-10-20 22:03:33.147249", "modified_by": "Administrator", "module": "Buying", "name": "Supplier", "name_case": "Title Case", + "naming_rule": "By \"Naming Series\" field", "owner": "Administrator", "permissions": [ { diff --git a/erpnext/patches.txt b/erpnext/patches.txt index e446d6be42f..9bcab5e74a3 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -310,3 +310,4 @@ erpnext.patches.v13_0.enable_scheduler_job_for_item_reposting erpnext.patches.v13_0.requeue_failed_reposts erpnext.patches.v13_0.healthcare_deprecation_warning erpnext.patches.v14_0.delete_healthcare_doctypes +erpnext.patches.v13_0.create_pan_field_for_india diff --git a/erpnext/patches/v13_0/create_pan_field_for_india.py b/erpnext/patches/v13_0/create_pan_field_for_india.py new file mode 100644 index 00000000000..e94a9d93b3b --- /dev/null +++ b/erpnext/patches/v13_0/create_pan_field_for_india.py @@ -0,0 +1,25 @@ +import frappe +from frappe.custom.doctype.custom_field.custom_field import create_custom_fields + + +def execute(): + custom_fields = { + 'Supplier': [ + { + 'fieldname': 'pan', + 'label': 'PAN', + 'fieldtype': 'Data', + 'insert_after': 'supplier_type' + } + ], + 'Customer': [ + { + 'fieldname': 'pan', + 'label': 'PAN', + 'fieldtype': 'Data', + 'insert_after': 'customer_type' + } + ] + } + + create_custom_fields(custom_fields, update=True) diff --git a/erpnext/regional/india/setup.py b/erpnext/regional/india/setup.py index afb1b07ccc4..1cbb154125f 100644 --- a/erpnext/regional/india/setup.py +++ b/erpnext/regional/india/setup.py @@ -614,11 +614,17 @@ def get_custom_fields(): fieldtype='Currency', insert_after='monthly_hra_exemption', read_only=1, depends_on='house_rent_payment_amount') ], 'Supplier': [ + { + 'fieldname': 'pan', + 'label': 'PAN', + 'fieldtype': 'Data', + 'insert_after': 'supplier_type' + }, { 'fieldname': 'gst_transporter_id', 'label': 'GST Transporter ID', 'fieldtype': 'Data', - 'insert_after': 'supplier_type', + 'insert_after': 'pan', 'depends_on': 'eval:doc.is_transporter' }, { @@ -640,11 +646,17 @@ def get_custom_fields(): } ], 'Customer': [ + { + 'fieldname': 'pan', + 'label': 'PAN', + 'fieldtype': 'Data', + 'insert_after': 'customer_type' + }, { 'fieldname': 'gst_category', 'label': 'GST Category', 'fieldtype': 'Select', - 'insert_after': 'customer_type', + 'insert_after': 'pan', 'options': 'Registered Regular\nRegistered Composition\nUnregistered\nSEZ\nOverseas\nConsumer\nDeemed Export\nUIN Holders', 'default': 'Unregistered' }, diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json index e811435e669..fa6e932d9eb 100644 --- a/erpnext/selling/doctype/customer/customer.json +++ b/erpnext/selling/doctype/customer/customer.json @@ -16,7 +16,6 @@ "customer_name", "gender", "customer_type", - "pan", "tax_withholding_category", "default_bank_account", "lead_name", @@ -213,8 +212,7 @@ "fieldtype": "Link", "ignore_user_permissions": 1, "label": "Represents Company", - "options": "Company", - "unique": 1 + "options": "Company" }, { "depends_on": "represents_company", @@ -486,11 +484,6 @@ "fieldtype": "Check", "label": "Allow Sales Invoice Creation Without Delivery Note" }, - { - "fieldname": "pan", - "fieldtype": "Data", - "label": "PAN" - }, { "fieldname": "tax_withholding_category", "fieldtype": "Link", @@ -517,11 +510,12 @@ "link_fieldname": "party" } ], - "modified": "2021-09-06 17:38:54.196663", + "modified": "2021-10-20 22:07:52.485809", "modified_by": "Administrator", "module": "Selling", "name": "Customer", "name_case": "Title Case", + "naming_rule": "By \"Naming Series\" field", "owner": "Administrator", "permissions": [ { From 9e7022830e058c3ba95f034942cad054e045e8f6 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Mon, 25 Oct 2021 01:34:42 +0530 Subject: [PATCH 055/200] fix: Only add additional depreciation schedule row on sale if depreciation_amount > 0 --- erpnext/assets/doctype/asset/asset.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index f6c2f4caa2d..cf62f496ea6 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -232,13 +232,15 @@ class Asset(AccountsController): depreciation_amount, days, months = self.get_pro_rata_amt(d, depreciation_amount, from_date, date_of_sale) - self.append("schedules", { - "schedule_date": date_of_sale, - "depreciation_amount": depreciation_amount, - "depreciation_method": d.depreciation_method, - "finance_book": d.finance_book, - "finance_book_id": d.idx - }) + if depreciation_amount > 0: + self.append("schedules", { + "schedule_date": date_of_sale, + "depreciation_amount": depreciation_amount, + "depreciation_method": d.depreciation_method, + "finance_book": d.finance_book, + "finance_book_id": d.idx + }) + break # For first row From cd4b20313e69affe3a5074a0c514f1a96ece0f6f Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Mon, 25 Oct 2021 11:21:55 +0530 Subject: [PATCH 056/200] fix: Test case fixes and linting issues --- erpnext/patches/v13_0/create_pan_field_for_india.py | 1 - erpnext/regional/india/utils.py | 2 +- erpnext/selling/doctype/customer/customer.json | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/patches/v13_0/create_pan_field_for_india.py b/erpnext/patches/v13_0/create_pan_field_for_india.py index e94a9d93b3b..01d4305bc4e 100644 --- a/erpnext/patches/v13_0/create_pan_field_for_india.py +++ b/erpnext/patches/v13_0/create_pan_field_for_india.py @@ -1,4 +1,3 @@ -import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 0e4128024d3..1733220c0ac 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -62,7 +62,7 @@ def validate_gstin_for_india(doc, method): .format(doc.gst_state_number), title=_("Invalid GSTIN")) def validate_pan_for_india(doc, method): - if doc.get('country') != 'India' or not doc.pan: + if doc.get('country') != 'India' or not doc.get('pan'): return if not PAN_NUMBER_FORMAT.match(doc.pan): diff --git a/erpnext/selling/doctype/customer/customer.json b/erpnext/selling/doctype/customer/customer.json index fa6e932d9eb..ae406306170 100644 --- a/erpnext/selling/doctype/customer/customer.json +++ b/erpnext/selling/doctype/customer/customer.json @@ -212,7 +212,8 @@ "fieldtype": "Link", "ignore_user_permissions": 1, "label": "Represents Company", - "options": "Company" + "options": "Company", + "unique": 1 }, { "depends_on": "represents_company", From 9c1705205f4597639c800b04eaf421bb7e987844 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Mon, 25 Oct 2021 20:06:24 +0530 Subject: [PATCH 057/200] fix: Payment Terms validation precision --- erpnext/controllers/accounts_controller.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 88c439b4f6c..b05d1b6f6d4 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1354,8 +1354,8 @@ class AccountsController(TransactionBase): total = 0 base_total = 0 for d in self.get("payment_schedule"): - total += flt(d.payment_amount) - base_total += flt(d.base_payment_amount) + total += flt(d.payment_amount, d.precision("payment_amount")) + base_total += flt(d.base_payment_amount, d.precision("base_payment_amount")) base_grand_total = self.get("base_rounded_total") or self.base_grand_total grand_total = self.get("rounded_total") or self.grand_total @@ -1371,8 +1371,9 @@ class AccountsController(TransactionBase): else: grand_total -= self.get("total_advance") base_grand_total = flt(grand_total * self.get("conversion_rate"), self.precision("base_grand_total")) - if total != flt(grand_total, self.precision("grand_total")) or \ - base_total != flt(base_grand_total, self.precision("base_grand_total")): + + if flt(total, self.precision("grand_total")) != flt(grand_total, self.precision("grand_total")) or \ + flt(base_total, self.precision("base_grand_total")) != flt(base_grand_total, self.precision("base_grand_total")): frappe.throw(_("Total Payment Amount in Payment Schedule must be equal to Grand / Rounded Total")) def is_rounded_total_disabled(self): From 89d5e494ddbe82912a65400ebf7f7b4ff565a8b0 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Tue, 26 Oct 2021 19:51:03 +0530 Subject: [PATCH 058/200] fix: Reload customer and supplier doctype --- erpnext/patches.txt | 2 +- erpnext/patches/v13_0/create_pan_field_for_india.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 9bcab5e74a3..20e54e08e6e 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -310,4 +310,4 @@ erpnext.patches.v13_0.enable_scheduler_job_for_item_reposting erpnext.patches.v13_0.requeue_failed_reposts erpnext.patches.v13_0.healthcare_deprecation_warning erpnext.patches.v14_0.delete_healthcare_doctypes -erpnext.patches.v13_0.create_pan_field_for_india +erpnext.patches.v13_0.create_pan_field_for_india #2 diff --git a/erpnext/patches/v13_0/create_pan_field_for_india.py b/erpnext/patches/v13_0/create_pan_field_for_india.py index 01d4305bc4e..c37651aaa3b 100644 --- a/erpnext/patches/v13_0/create_pan_field_for_india.py +++ b/erpnext/patches/v13_0/create_pan_field_for_india.py @@ -1,7 +1,11 @@ +import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields def execute(): + frappe.reload_doc('buying', 'doctype', 'supplier', force=True) + frappe.reload_doc('selling', 'doctype', 'customer', force=True) + custom_fields = { 'Supplier': [ { From 82bf5e55393520f7681615e1addf4ceee4319ee5 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 26 Oct 2021 20:53:47 +0530 Subject: [PATCH 059/200] fix: Replace post_depreciation_entries() with make_depreciation_entry() --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 379bbbe9114..1f0b3c244b6 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -37,7 +37,7 @@ from erpnext.assets.doctype.asset.depreciation import ( get_disposal_account_and_cost_center, get_gl_entries_on_asset_disposal, get_gl_entries_on_asset_regain, - post_depreciation_entries, + make_depreciation_entry ) from erpnext.controllers.selling_controller import SellingController from erpnext.projects.doctype.timesheet.timesheet import get_projectwise_timesheet_data @@ -1001,7 +1001,7 @@ class SalesInvoice(SellingController): asset.prepare_depreciation_data(date_of_sale=self.posting_date) asset.save() - post_depreciation_entries(self.posting_date) + make_depreciation_entry(asset.name, self.posting_date) def reset_depreciation_schedule(self, asset): asset.flags.ignore_validate_update_after_submit = True From cde0dae98733563c02c7e364de2b97d9831a3e97 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 26 Oct 2021 21:04:06 +0530 Subject: [PATCH 060/200] fix: Add flag for reverse depreciation entries --- erpnext/accounts/doctype/gl_entry/gl_entry.py | 3 ++- erpnext/accounts/doctype/journal_entry/journal_entry.py | 2 +- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index 1e983b1d429..60015f6ec88 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -58,7 +58,8 @@ class GLEntry(Document): # Update outstanding amt on against voucher if (self.against_voucher_type in ['Journal Entry', 'Sales Invoice', 'Purchase Invoice', 'Fees'] - and self.against_voucher and self.flags.update_outstanding == 'Yes'): + and self.against_voucher and self.flags.update_outstanding == 'Yes' + and not frappe.flags.is_reverse_depr_entry): update_outstanding_amt(self.account, self.party_type, self.party, self.against_voucher_type, self.against_voucher) diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index d04e4a5d8bd..f3a0bdbec49 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -58,7 +58,7 @@ class JournalEntry(AccountsController): if not frappe.flags.in_import: self.validate_total_debit_and_credit() - if not self.flags.is_reverse_depr_entry: + if not frappe.flags.is_reverse_depr_entry: self.validate_against_jv() self.validate_stock_accounts() diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 1f0b3c244b6..ef72decaa2b 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1045,7 +1045,7 @@ class SalesInvoice(SellingController): reverse_journal_entry = make_reverse_journal_entry(schedule.journal_entry) reverse_journal_entry.posting_date = nowdate() - reverse_journal_entry.flags.is_reverse_depr_entry = True + frappe.flags.is_reverse_depr_entry = True reverse_journal_entry.submit() asset.flags.ignore_validate_update_after_submit = True From 21798d883611101964ce6f69054c20c137cb6d33 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 26 Oct 2021 21:35:43 +0530 Subject: [PATCH 061/200] fix: Add test to check if SO can be cancelled when linked SI has been submitted --- .../selling/doctype/sales_order/test_sales_order.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index bbfe7c06d87..f9556c2021b 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -1279,6 +1279,19 @@ class TestSalesOrder(unittest.TestCase): self.assertRaises(frappe.ValidationError, so.cancel) + def test_so_cancellation_when_si_has_been_submitted(self): + """ + Test to check if Sales Order gets cancelled when linked Sales Invoice has been Submitted + Expected result: Sales Order should not get cancelled + """ + so = make_sales_order() + so.submit() + si = make_sales_invoice(so.name) + si.submit() + + so.load_from_db() + self.assertRaises(frappe.LinkExistsError, so.cancel) + def test_payment_terms_are_fetched_when_creating_sales_invoice(self): from erpnext.accounts.doctype.payment_entry.test_payment_entry import ( create_payment_terms_template, From aac574579abef8cb05e016b4a27e706149746d5a Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 26 Oct 2021 21:41:47 +0530 Subject: [PATCH 062/200] fix: Add test to check if SO can be cancelled when linked DN has been submitted --- .../doctype/sales_order/test_sales_order.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index f9556c2021b..b30bc030aea 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -1279,7 +1279,7 @@ class TestSalesOrder(unittest.TestCase): self.assertRaises(frappe.ValidationError, so.cancel) - def test_so_cancellation_when_si_has_been_submitted(self): + def test_so_cancellation_after_si_submission(self): """ Test to check if Sales Order gets cancelled when linked Sales Invoice has been Submitted Expected result: Sales Order should not get cancelled @@ -1292,6 +1292,19 @@ class TestSalesOrder(unittest.TestCase): so.load_from_db() self.assertRaises(frappe.LinkExistsError, so.cancel) + def test_so_cancellation_after_dn_submission(self): + """ + Test to check if Sales Order gets cancelled when linked Delivery Note has been Submitted + Expected result: Sales Order should not get cancelled + """ + so = make_sales_order() + so.submit() + dn = make_delivery_note(so.name) + dn.submit() + + so.load_from_db() + self.assertRaises(frappe.LinkExistsError, so.cancel) + def test_payment_terms_are_fetched_when_creating_sales_invoice(self): from erpnext.accounts.doctype.payment_entry.test_payment_entry import ( create_payment_terms_template, From 60119f5ce5c212e25934c2e34a1ac259e5fdcc77 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 26 Oct 2021 21:42:35 +0530 Subject: [PATCH 063/200] fix: Remove redundant validations --- .../doctype/sales_order/sales_order.py | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index b1a68930343..a8277ba78dc 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -227,28 +227,6 @@ class SalesOrder(SellingController): check_credit_limit(self.customer, self.company) def check_nextdoc_docstatus(self): - # Checks Delivery Note - submit_dn = frappe.db.sql_list(""" - select t1.name - from `tabDelivery Note` t1,`tabDelivery Note Item` t2 - where t1.name = t2.parent and t2.against_sales_order = %s and t1.docstatus = 1""", self.name) - - if submit_dn: - submit_dn = [get_link_to_form("Delivery Note", dn) for dn in submit_dn] - frappe.throw(_("Delivery Notes {0} must be cancelled before cancelling this Sales Order") - .format(", ".join(submit_dn))) - - # Checks Sales Invoice - submit_rv = frappe.db.sql_list("""select t1.name - from `tabSales Invoice` t1,`tabSales Invoice Item` t2 - where t1.name = t2.parent and t2.sales_order = %s and t1.docstatus = 1""", - self.name) - - if submit_rv: - submit_rv = [get_link_to_form("Sales Invoice", si) for si in submit_rv] - frappe.throw(_("Sales Invoice {0} must be cancelled before cancelling this Sales Order") - .format(", ".join(submit_rv))) - draft_rv = frappe.db.sql_list("""select distinct t1.name from `tabSales Invoice` t1,`tabSales Invoice Item` t2 where t1.name = t2.parent and t2.sales_order = %s and t1.docstatus = 0""", From 80ce3e6de722e1c64a4c881691316e432fdf44ea Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 27 Oct 2021 04:17:21 +0530 Subject: [PATCH 064/200] fix: Add test to check if SO can be cancelled after linked Maintenance Schedule has been submitted --- .../doctype/sales_order/test_sales_order.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index b30bc030aea..ff25a3a46dc 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -1305,6 +1305,21 @@ class TestSalesOrder(unittest.TestCase): so.load_from_db() self.assertRaises(frappe.LinkExistsError, so.cancel) + def test_so_cancellation_after_maintenance_schedule_submission(self): + """ + Expected result: Sales Order should not get cancelled + """ + from erpnext.maintenance.doctype.maintenance_schedule.test_maintenance_schedule import make_maintenance_schedule + + so = make_sales_order() + so.submit() + ms = make_maintenance_schedule() + ms.items[0].sales_order = so.name + ms.submit() + + so.load_from_db() + self.assertRaises(frappe.LinkExistsError, so.cancel) + def test_payment_terms_are_fetched_when_creating_sales_invoice(self): from erpnext.accounts.doctype.payment_entry.test_payment_entry import ( create_payment_terms_template, From 9ec24d491513fb4643667fe9e252574b4569f1b2 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 27 Oct 2021 04:46:59 +0530 Subject: [PATCH 065/200] fix: Add test to check if SO can be cancelled after linked Maintenance Visit has been submitted --- .../doctype/sales_order/test_sales_order.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index ff25a3a46dc..57b0c023ce1 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -1320,6 +1320,22 @@ class TestSalesOrder(unittest.TestCase): so.load_from_db() self.assertRaises(frappe.LinkExistsError, so.cancel) + def test_so_cancellation_after_maintenance_visit_submission(self): + """ + Expected result: Sales Order should not get cancelled + """ + from erpnext.maintenance.doctype.maintenance_visit.test_maintenance_visit import make_maintenance_visit + + so = make_sales_order() + so.submit() + mv = make_maintenance_visit() + mv.purposes[0].prevdoc_doctype = "Sales Order" + mv.purposes[0].prevdoc_docname = so.name + mv.submit() + + so.load_from_db() + self.assertRaises(frappe.LinkExistsError, so.cancel) + def test_payment_terms_are_fetched_when_creating_sales_invoice(self): from erpnext.accounts.doctype.payment_entry.test_payment_entry import ( create_payment_terms_template, From 29fc4da4c62db251ac8a1e20ac7e7bf510883a80 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 27 Oct 2021 04:47:26 +0530 Subject: [PATCH 066/200] fix: Create Maintenance Visit --- .../test_maintenance_visit.py | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/erpnext/maintenance/doctype/maintenance_visit/test_maintenance_visit.py b/erpnext/maintenance/doctype/maintenance_visit/test_maintenance_visit.py index 57e728d1b13..6f86f70eb73 100644 --- a/erpnext/maintenance/doctype/maintenance_visit/test_maintenance_visit.py +++ b/erpnext/maintenance/doctype/maintenance_visit/test_maintenance_visit.py @@ -4,8 +4,39 @@ from __future__ import unicode_literals import unittest +import frappe +from frappe.utils.data import today # test_records = frappe.get_test_records('Maintenance Visit') class TestMaintenanceVisit(unittest.TestCase): pass + +def make_maintenance_visit(): + mv = frappe.new_doc("Maintenance Visit") + mv.company = "_Test Company" + mv.customer = "_Test Customer" + mv.mntc_date = today() + mv.completion_status = "Partially Completed" + + sales_person = make_sales_person("Dwight Schrute") + + mv.append("purposes", { + "item_code": "_Test Item", + "sales_person": "Sales Team", + "description": "Test Item", + "work_done": "Test Work Done", + "service_person": sales_person.name + }) + mv.insert(ignore_permissions=True) + + return mv + +def make_sales_person(name): + sales_person = frappe.get_doc({ + 'doctype': "Sales Person", + 'sales_person_name': name + }) + sales_person.insert(ignore_if_duplicate = True) + + return sales_person From 69e011bf6ae7d3da6a86ee462bc26d6de63efc21 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 27 Oct 2021 05:07:16 +0530 Subject: [PATCH 067/200] fix: Add test to check if SO can be cancelled after linked Work Order has been submitted --- .../selling/doctype/sales_order/test_sales_order.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 57b0c023ce1..d8d7336211e 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -1336,6 +1336,19 @@ class TestSalesOrder(unittest.TestCase): so.load_from_db() self.assertRaises(frappe.LinkExistsError, so.cancel) + def test_so_cancellation_after_work_order_submission(self): + """ + Expected result: Sales Order should not get cancelled + """ + from erpnext.manufacturing.doctype.work_order.test_work_order import make_wo_order_test_record + + so = make_sales_order(item_code="_Test FG Item", qty=10) + so.submit() + make_wo_order_test_record(sales_order=so.name) + + so.load_from_db() + self.assertRaises(frappe.LinkExistsError, so.cancel) + def test_payment_terms_are_fetched_when_creating_sales_invoice(self): from erpnext.accounts.doctype.payment_entry.test_payment_entry import ( create_payment_terms_template, From 7454167725247b29ef067719a0c3bef72dd0d7a5 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 27 Oct 2021 05:08:11 +0530 Subject: [PATCH 068/200] fix: Remove redundant code --- .../doctype/sales_order/sales_order.py | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index a8277ba78dc..8d69f7b080c 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -237,39 +237,6 @@ class SalesOrder(SellingController): frappe.throw(_("Sales Invoice {0} must be deleted before cancelling this Sales Order") .format(", ".join(draft_rv))) - #check maintenance schedule - submit_ms = frappe.db.sql_list(""" - select t1.name - from `tabMaintenance Schedule` t1, `tabMaintenance Schedule Item` t2 - where t2.parent=t1.name and t2.sales_order = %s and t1.docstatus = 1""", self.name) - - if submit_ms: - submit_ms = [get_link_to_form("Maintenance Schedule", ms) for ms in submit_ms] - frappe.throw(_("Maintenance Schedule {0} must be cancelled before cancelling this Sales Order") - .format(", ".join(submit_ms))) - - # check maintenance visit - submit_mv = frappe.db.sql_list(""" - select t1.name - from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 - where t2.parent=t1.name and t2.prevdoc_docname = %s and t1.docstatus = 1""",self.name) - - if submit_mv: - submit_mv = [get_link_to_form("Maintenance Visit", mv) for mv in submit_mv] - frappe.throw(_("Maintenance Visit {0} must be cancelled before cancelling this Sales Order") - .format(", ".join(submit_mv))) - - # check work order - pro_order = frappe.db.sql_list(""" - select name - from `tabWork Order` - where sales_order = %s and docstatus = 1""", self.name) - - if pro_order: - pro_order = [get_link_to_form("Work Order", po) for po in pro_order] - frappe.throw(_("Work Order {0} must be cancelled before cancelling this Sales Order") - .format(", ".join(pro_order))) - def check_modified_date(self): mod_db = frappe.db.get_value("Sales Order", self.name, "modified") date_diff = frappe.db.sql("select TIMEDIFF('%s', '%s')" % From 6dbc47f2250c735130892821d0512e5f5e658611 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 27 Oct 2021 05:09:44 +0530 Subject: [PATCH 069/200] fix: Rename variables --- erpnext/selling/doctype/sales_order/sales_order.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 8d69f7b080c..79e40f65dba 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -227,15 +227,15 @@ class SalesOrder(SellingController): check_credit_limit(self.customer, self.company) def check_nextdoc_docstatus(self): - draft_rv = frappe.db.sql_list("""select distinct t1.name + linked_invoices = frappe.db.sql_list("""select distinct t1.name from `tabSales Invoice` t1,`tabSales Invoice Item` t2 where t1.name = t2.parent and t2.sales_order = %s and t1.docstatus = 0""", self.name) - if draft_rv: - draft_rv = [get_link_to_form("Sales Invoice", si) for si in draft_rv] + if linked_invoices: + linked_invoices = [get_link_to_form("Sales Invoice", si) for si in linked_invoices] frappe.throw(_("Sales Invoice {0} must be deleted before cancelling this Sales Order") - .format(", ".join(draft_rv))) + .format(", ".join(linked_invoices))) def check_modified_date(self): mod_db = frappe.db.get_value("Sales Order", self.name, "modified") From 54a0f5d04f2800ad4d08cd9271b75145e1d822ee Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 27 Oct 2021 05:15:44 +0530 Subject: [PATCH 070/200] fix: Make import statements fit conventions --- erpnext/selling/doctype/sales_order/test_sales_order.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index d8d7336211e..b26ee768c48 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -1309,7 +1309,9 @@ class TestSalesOrder(unittest.TestCase): """ Expected result: Sales Order should not get cancelled """ - from erpnext.maintenance.doctype.maintenance_schedule.test_maintenance_schedule import make_maintenance_schedule + from erpnext.maintenance.doctype.maintenance_schedule.test_maintenance_schedule import ( + make_maintenance_schedule + ) so = make_sales_order() so.submit() @@ -1324,7 +1326,9 @@ class TestSalesOrder(unittest.TestCase): """ Expected result: Sales Order should not get cancelled """ - from erpnext.maintenance.doctype.maintenance_visit.test_maintenance_visit import make_maintenance_visit + from erpnext.maintenance.doctype.maintenance_visit.test_maintenance_visit import ( + make_maintenance_visit + ) so = make_sales_order() so.submit() From 07b25c4275173d01bee700a8b129a43469c1a83b Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 27 Oct 2021 05:20:31 +0530 Subject: [PATCH 071/200] fix: Import statements --- .../doctype/sales_order/test_sales_order.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index b26ee768c48..752d358e43b 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -21,6 +21,12 @@ from erpnext.selling.doctype.sales_order.sales_order import ( make_sales_invoice, make_work_orders, ) +from erpnext.maintenance.doctype.maintenance_schedule.test_maintenance_schedule import ( + make_maintenance_schedule, +) +from erpnext.maintenance.doctype.maintenance_visit.test_maintenance_visit import ( + make_maintenance_visit, +) from erpnext.stock.doctype.item.test_item import make_item from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry @@ -1309,10 +1315,6 @@ class TestSalesOrder(unittest.TestCase): """ Expected result: Sales Order should not get cancelled """ - from erpnext.maintenance.doctype.maintenance_schedule.test_maintenance_schedule import ( - make_maintenance_schedule - ) - so = make_sales_order() so.submit() ms = make_maintenance_schedule() @@ -1326,10 +1328,6 @@ class TestSalesOrder(unittest.TestCase): """ Expected result: Sales Order should not get cancelled """ - from erpnext.maintenance.doctype.maintenance_visit.test_maintenance_visit import ( - make_maintenance_visit - ) - so = make_sales_order() so.submit() mv = make_maintenance_visit() From 06c505ddc2c3529703a35a986896112de7107ae3 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 27 Oct 2021 05:23:01 +0530 Subject: [PATCH 072/200] fix: Linters --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 +- erpnext/assets/doctype/asset/test_asset.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index ef72decaa2b..1c287d3f8cd 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -37,7 +37,7 @@ from erpnext.assets.doctype.asset.depreciation import ( get_disposal_account_and_cost_center, get_gl_entries_on_asset_disposal, get_gl_entries_on_asset_regain, - make_depreciation_entry + make_depreciation_entry, ) from erpnext.controllers.selling_controller import SellingController from erpnext.projects.doctype.timesheet.timesheet import get_projectwise_timesheet_data diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index c44c63ae9e4..81c679f851b 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -20,6 +20,7 @@ from erpnext.stock.doctype.purchase_receipt.purchase_receipt import ( ) from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import make_purchase_receipt + class AssetSetup(unittest.TestCase): @classmethod def setUpClass(cls): From 4789c3423d30adb02024d305e3afc517058857f3 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 27 Oct 2021 05:25:32 +0530 Subject: [PATCH 073/200] fix: Linters --- .../selling/doctype/sales_order/test_sales_order.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 752d358e43b..ca696034d6b 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -11,6 +11,12 @@ from frappe.core.doctype.user_permission.test_user_permission import create_user from frappe.utils import add_days, flt, getdate, nowdate from erpnext.controllers.accounts_controller import update_child_qty_rate +from erpnext.maintenance.doctype.maintenance_schedule.test_maintenance_schedule import ( + make_maintenance_schedule, +) +from erpnext.maintenance.doctype.maintenance_visit.test_maintenance_visit import ( + make_maintenance_visit, +) from erpnext.manufacturing.doctype.blanket_order.test_blanket_order import make_blanket_order from erpnext.selling.doctype.product_bundle.test_product_bundle import make_product_bundle from erpnext.selling.doctype.sales_order.sales_order import ( @@ -21,12 +27,6 @@ from erpnext.selling.doctype.sales_order.sales_order import ( make_sales_invoice, make_work_orders, ) -from erpnext.maintenance.doctype.maintenance_schedule.test_maintenance_schedule import ( - make_maintenance_schedule, -) -from erpnext.maintenance.doctype.maintenance_visit.test_maintenance_visit import ( - make_maintenance_visit, -) from erpnext.stock.doctype.item.test_item import make_item from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry From 78825f2c6c277f9229f663a31185fddfb8796b0e Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 27 Oct 2021 06:18:24 +0530 Subject: [PATCH 074/200] fix: Add extra line --- .../doctype/maintenance_visit/test_maintenance_visit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/maintenance/doctype/maintenance_visit/test_maintenance_visit.py b/erpnext/maintenance/doctype/maintenance_visit/test_maintenance_visit.py index 6f86f70eb73..7ebb4ba0232 100644 --- a/erpnext/maintenance/doctype/maintenance_visit/test_maintenance_visit.py +++ b/erpnext/maintenance/doctype/maintenance_visit/test_maintenance_visit.py @@ -4,6 +4,7 @@ from __future__ import unicode_literals import unittest + import frappe from frappe.utils.data import today From 6ec047cba9418815712efbe71abc147677ebfc0e Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 27 Oct 2021 10:30:05 +0530 Subject: [PATCH 075/200] fix(ux): overbiling message in SO->SI, PO->PI (#28088) --- erpnext/controllers/accounts_controller.py | 2 +- erpnext/controllers/status_updater.py | 20 ++++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 88c439b4f6c..904f2217180 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1032,7 +1032,7 @@ class AccountsController(TransactionBase): if role_allowed_to_over_bill in user_roles and total_overbilled_amt > 0.1: frappe.msgprint(_("Overbilling of {} ignored because you have {} role.") - .format(total_overbilled_amt, role_allowed_to_over_bill), title=_("Warning"), indicator="orange") + .format(total_overbilled_amt, role_allowed_to_over_bill), indicator="orange", alert=True) def throw_overbill_exception(self, item, max_allowed_amt): frappe.throw(_("Cannot overbill for Item {0} in row {1} more than {2}. To allow over-billing, please set allowance in Accounts Settings") diff --git a/erpnext/controllers/status_updater.py b/erpnext/controllers/status_updater.py index 8738204ce09..49a76da6976 100644 --- a/erpnext/controllers/status_updater.py +++ b/erpnext/controllers/status_updater.py @@ -216,11 +216,14 @@ class StatusUpdater(Document): overflow_percent = ((item[args['target_field']] - item[args['target_ref_field']]) / item[args['target_ref_field']]) * 100 - if overflow_percent - allowance > 0.01 and role not in frappe.get_roles(): + if overflow_percent - allowance > 0.01: item['max_allowed'] = flt(item[args['target_ref_field']] * (100+allowance)/100) item['reduce_by'] = item[args['target_field']] - item['max_allowed'] - self.limits_crossed_error(args, item, qty_or_amount) + if role not in frappe.get_roles(): + self.limits_crossed_error(args, item, qty_or_amount) + else: + self.warn_about_bypassing_with_role(item, qty_or_amount, role) def limits_crossed_error(self, args, item, qty_or_amount): '''Raise exception for limits crossed''' @@ -238,6 +241,19 @@ class StatusUpdater(Document): frappe.bold(item.get('item_code')) ) + '

' + action_msg, OverAllowanceError, title = _('Limit Crossed')) + def warn_about_bypassing_with_role(self, item, qty_or_amount, role): + action = _("Over Receipt/Delivery") if qty_or_amount == "qty" else _("Overbilling") + + msg = (_("{} of {} {} ignored for item {} because you have {} role.") + .format( + action, + _(item["target_ref_field"].title()), + frappe.bold(item["reduce_by"]), + frappe.bold(item.get('item_code')), + role) + ) + frappe.msgprint(msg, indicator="orange", alert=True) + def update_qty(self, update_modified=True): """Updates qty or amount at row level From f2d136e57475421694c12c97b9eba6ccb8e45f76 Mon Sep 17 00:00:00 2001 From: Diksha Jadhav Date: Tue, 5 Oct 2021 14:50:29 +0530 Subject: [PATCH 076/200] feat(pick list): group items based on item code and warehouse before printing picklist --- .../stock/doctype/pick_list/pick_list.json | 22 +++++++++++++--- erpnext/stock/doctype/pick_list/pick_list.py | 26 +++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/pick_list/pick_list.json b/erpnext/stock/doctype/pick_list/pick_list.json index 21467935370..c604c711ef5 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.json +++ b/erpnext/stock/doctype/pick_list/pick_list.json @@ -18,7 +18,9 @@ "get_item_locations", "section_break_6", "locations", - "amended_from" + "amended_from", + "print_settings_section", + "group_same_items" ], "fields": [ { @@ -110,14 +112,28 @@ "options": "STO-PICK-.YYYY.-", "reqd": 1, "set_only_once": 1 + }, + { + "fieldname": "print_settings_section", + "fieldtype": "Section Break", + "label": "Print Settings" + }, + { + "allow_on_submit": 1, + "default": "0", + "fieldname": "group_same_items", + "fieldtype": "Check", + "label": "Group Same Items", + "print_hide": 1 } ], "is_submittable": 1, "links": [], - "modified": "2020-03-17 11:38:41.932875", + "modified": "2021-10-05 15:08:40.369957", "modified_by": "Administrator", "module": "Stock", "name": "Pick List", + "naming_rule": "By \"Naming Series\" field", "owner": "Administrator", "permissions": [ { @@ -184,4 +200,4 @@ "sort_field": "modified", "sort_order": "DESC", "track_changes": 1 -} +} \ No newline at end of file diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index dffbe80fa39..7b2f44b0843 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -121,6 +121,32 @@ class PickList(Document): and (self.for_qty is None or self.for_qty == 0): frappe.throw(_("Qty of Finished Goods Item should be greater than 0.")) + def before_print(self, settings=None): + if self.get("group_same_items"): + self.group_similar_items() + + def group_similar_items(self): + group_item_qty = {} + group_picked_qty = {} + count = 0 + + for item in self.locations: + group_item_qty[(item.item_code, item.warehouse)] = group_item_qty.get((item.item_code,item.warehouse), 0) + item.qty + group_picked_qty[(item.item_code, item.warehouse)] = group_picked_qty.get((item.item_code,item.warehouse), 0) + item.picked_qty + + duplicate_list = [] + for item in self.locations: + if (item.item_code, item.warehouse) in group_item_qty: + count += 1 + item.qty = group_item_qty[(item.item_code, item.warehouse)] + item.picked_qty = group_picked_qty[(item.item_code, item.warehouse)] + item.stock_qty = group_item_qty[(item.item_code, item.warehouse)] + item.idx = count + del group_item_qty[(item.item_code, item.warehouse)] + else: + duplicate_list.append(item) + for item in duplicate_list: + self.remove(item) def validate_item_locations(pick_list): if not pick_list.locations: From 69429005551161e63cda5c2b2fcda1a685280775 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 27 Oct 2021 10:36:06 +0530 Subject: [PATCH 077/200] refactor: use defaultdict and enumeration --- erpnext/stock/doctype/pick_list/pick_list.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index 7b2f44b0843..4c02f3db43b 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -2,10 +2,8 @@ # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals - import json -from collections import OrderedDict +from collections import OrderedDict, defaultdict import frappe from frappe import _ @@ -126,28 +124,30 @@ class PickList(Document): self.group_similar_items() def group_similar_items(self): - group_item_qty = {} - group_picked_qty = {} - count = 0 + group_item_qty = defaultdict(float) + group_picked_qty = defaultdict(float) for item in self.locations: - group_item_qty[(item.item_code, item.warehouse)] = group_item_qty.get((item.item_code,item.warehouse), 0) + item.qty - group_picked_qty[(item.item_code, item.warehouse)] = group_picked_qty.get((item.item_code,item.warehouse), 0) + item.picked_qty + group_item_qty[(item.item_code, item.warehouse)] += item.qty + group_picked_qty[(item.item_code, item.warehouse)] += item.picked_qty duplicate_list = [] for item in self.locations: if (item.item_code, item.warehouse) in group_item_qty: - count += 1 item.qty = group_item_qty[(item.item_code, item.warehouse)] item.picked_qty = group_picked_qty[(item.item_code, item.warehouse)] item.stock_qty = group_item_qty[(item.item_code, item.warehouse)] - item.idx = count del group_item_qty[(item.item_code, item.warehouse)] else: duplicate_list.append(item) + for item in duplicate_list: self.remove(item) + for idx, item in enumerate(self.locations, start=1): + item.idx = idx + + def validate_item_locations(pick_list): if not pick_list.locations: frappe.throw(_("Add items in the Item Locations table")) From 479ecb8de0c77beafddd243c1b5fe38793ea32de Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 27 Oct 2021 10:51:47 +0530 Subject: [PATCH 078/200] test: picklist item grouping --- .../stock/doctype/pick_list/test_pick_list.py | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/erpnext/stock/doctype/pick_list/test_pick_list.py b/erpnext/stock/doctype/pick_list/test_pick_list.py index fd0b3680df2..58b46e1eefc 100644 --- a/erpnext/stock/doctype/pick_list/test_pick_list.py +++ b/erpnext/stock/doctype/pick_list/test_pick_list.py @@ -4,6 +4,7 @@ from __future__ import unicode_literals import frappe +from frappe import _dict test_dependencies = ['Item', 'Sales Invoice', 'Stock Entry', 'Batch'] @@ -356,6 +357,39 @@ class TestPickList(ERPNextTestCase): sales_order.cancel() purchase_receipt.cancel() + def test_pick_list_grouping_before_print(self): + def _compare_dicts(a, b): + "compare dicts but ignore missing keys in `a`" + for key, value in a.items(): + self.assertEqual(b.get(key), value, msg=f"{key} doesn't match") + + # nothing should be grouped + pl = frappe.get_doc(doctype="Pick List", group_same_items=True, locations=[ + _dict(item_code="A", warehouse="X", qty=1, picked_qty=2), + _dict(item_code="B", warehouse="X", qty=1, picked_qty=2), + _dict(item_code="A", warehouse="Y", qty=1, picked_qty=2), + _dict(item_code="B", warehouse="Y", qty=1, picked_qty=2), + ]) + pl.before_print() + self.assertEqual(len(pl.locations), 4) + + # grouping should halve the number of items + pl = frappe.get_doc(doctype="Pick List", group_same_items=True, locations=[ + _dict(item_code="A", warehouse="X", qty=5, picked_qty=1), + _dict(item_code="B", warehouse="Y", qty=4, picked_qty=2), + _dict(item_code="A", warehouse="X", qty=3, picked_qty=2), + _dict(item_code="B", warehouse="Y", qty=2, picked_qty=2), + ]) + pl.before_print() + self.assertEqual(len(pl.locations), 2) + + expected_items = [ + _dict(item_code="A", warehouse="X", qty=8, picked_qty=3), + _dict(item_code="B", warehouse="Y", qty=6, picked_qty=4), + ] + for expected_item, created_item in zip(expected_items, pl.locations): + _compare_dicts(expected_item, created_item) + # def test_pick_list_skips_items_in_expired_batch(self): # pass From 2920f2f61479448e6467c97b7ba696bb90d9c092 Mon Sep 17 00:00:00 2001 From: Dany Robert Date: Wed, 27 Oct 2021 11:17:48 +0530 Subject: [PATCH 079/200] fix: change modified timestamp to apply changes on migrate #28095 fix: change modified timestamp to apply changes on migrate --- .../expense_taxes_and_charges/expense_taxes_and_charges.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/hr/doctype/expense_taxes_and_charges/expense_taxes_and_charges.json b/erpnext/hr/doctype/expense_taxes_and_charges/expense_taxes_and_charges.json index 4a1064b66b7..2f7b8fcf679 100644 --- a/erpnext/hr/doctype/expense_taxes_and_charges/expense_taxes_and_charges.json +++ b/erpnext/hr/doctype/expense_taxes_and_charges/expense_taxes_and_charges.json @@ -100,7 +100,7 @@ ], "istable": 1, "links": [], - "modified": "2020-09-23 20:27:36.027728", + "modified": "2021-10-26 20:27:36.027728", "modified_by": "Administrator", "module": "HR", "name": "Expense Taxes and Charges", From 25d1c1ce86ec9d66b50bdf12d4954631d22d50c5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 27 Oct 2021 11:21:26 +0530 Subject: [PATCH 080/200] fix: add filter to query to avoid send reminder for zero years (#28092) (#28096) Co-authored-by: Rucha Mahabal (cherry picked from commit 8cad23b8fb4d830a5703e107c371ae9319bc003d) Co-authored-by: gsi-maruiz <62341390+gsi-maruiz@users.noreply.github.com> --- erpnext/hr/doctype/employee/employee_reminders.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/hr/doctype/employee/employee_reminders.py b/erpnext/hr/doctype/employee/employee_reminders.py index 216d8f6bb3a..559bd393e62 100644 --- a/erpnext/hr/doctype/employee/employee_reminders.py +++ b/erpnext/hr/doctype/employee/employee_reminders.py @@ -156,6 +156,8 @@ def get_employees_having_an_event_today(event_type): DAY({condition_column}) = DAY(%(today)s) AND MONTH({condition_column}) = MONTH(%(today)s) + AND + YEAR({condition_column}) < YEAR(%(today)s) AND `status` = 'Active' """, @@ -166,6 +168,8 @@ def get_employees_having_an_event_today(event_type): DATE_PART('day', {condition_column}) = date_part('day', %(today)s) AND DATE_PART('month', {condition_column}) = date_part('month', %(today)s) + AND + DATE_PART('year', {condition_column}) < date_part('year', %(today)s) AND "status" = 'Active' """, From 05831b18ad08ffcbc8a332ed74697efae1bd870a Mon Sep 17 00:00:00 2001 From: Alan <2.alan.tom@gmail.com> Date: Wed, 27 Oct 2021 11:36:37 +0530 Subject: [PATCH 081/200] fix: update production plan status #27567 fix: update production plan status --- .../production_plan/production_plan.py | 11 ++++++- erpnext/patches.txt | 1 + .../v12_0/update_production_plan_status.py | 31 +++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 erpnext/patches/v12_0/update_production_plan_status.py diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 7e6fc3c4a64..2424ef9a71c 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -311,7 +311,7 @@ class ProductionPlan(Document): if self.total_produced_qty > 0: self.status = "In Process" - if self.total_produced_qty >= self.total_planned_qty: + if self.check_have_work_orders_completed(): self.status = "Completed" if self.status != 'Completed': @@ -575,6 +575,15 @@ class ProductionPlan(Document): self.append("sub_assembly_items", data) + def check_have_work_orders_completed(self): + wo_status = frappe.db.get_list( + "Work Order", + filters={"production_plan": self.name}, + fields="status", + pluck="status" + ) + return all(s == "Completed" for s in wo_status) + @frappe.whitelist() def download_raw_materials(doc, warehouses=None): if isinstance(doc, str): diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 20e54e08e6e..1dac50c6e19 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -308,6 +308,7 @@ erpnext.patches.v13_0.set_status_in_maintenance_schedule_table erpnext.patches.v13_0.add_default_interview_notification_templates erpnext.patches.v13_0.enable_scheduler_job_for_item_reposting erpnext.patches.v13_0.requeue_failed_reposts +erpnext.patches.v12_0.update_production_plan_status erpnext.patches.v13_0.healthcare_deprecation_warning erpnext.patches.v14_0.delete_healthcare_doctypes erpnext.patches.v13_0.create_pan_field_for_india #2 diff --git a/erpnext/patches/v12_0/update_production_plan_status.py b/erpnext/patches/v12_0/update_production_plan_status.py new file mode 100644 index 00000000000..06fc503a33f --- /dev/null +++ b/erpnext/patches/v12_0/update_production_plan_status.py @@ -0,0 +1,31 @@ +# Copyright (c) 2021, Frappe and Contributors +# License: GNU General Public License v3. See license.txt + +import frappe + + +def execute(): + frappe.reload_doc("manufacturing", "doctype", "production_plan") + frappe.db.sql(""" + UPDATE `tabProduction Plan` ppl + SET status = "Completed" + WHERE ppl.name IN ( + SELECT ss.name FROM ( + SELECT + ( + count(wo.status = "Completed") = + count(pp.name) + ) = + ( + pp.status != "Completed" + AND pp.total_produced_qty >= pp.total_planned_qty + ) AS should_set, + pp.name AS name + FROM + `tabWork Order` wo INNER JOIN`tabProduction Plan` pp + ON wo.production_plan = pp.name + GROUP BY pp.name + HAVING should_set = 1 + ) ss + ) + """) From 0806e32049fee67b731cb8c742fc6654faae6143 Mon Sep 17 00:00:00 2001 From: Summayya Hashmani <58825865+sumaiya2908@users.noreply.github.com> Date: Wed, 27 Oct 2021 11:46:10 +0530 Subject: [PATCH 082/200] fix(ux): add naming series to ERPNext setting workspace (#28090) * fix(ux): add naming series to setting workspace * fix: doctype link to naming series Co-authored-by: Ankush Menat Co-authored-by: Summayya Co-authored-by: Ankush Menat --- .../workspace/erpnext_settings/erpnext_settings.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/erpnext/setup/workspace/erpnext_settings/erpnext_settings.json b/erpnext/setup/workspace/erpnext_settings/erpnext_settings.json index 320cb7ba847..1412acfcead 100644 --- a/erpnext/setup/workspace/erpnext_settings/erpnext_settings.json +++ b/erpnext/setup/workspace/erpnext_settings/erpnext_settings.json @@ -1,6 +1,6 @@ { "charts": [], - "content": "[{\"type\": \"header\", \"data\": {\"text\": \"Your Shortcuts\", \"level\": 4, \"col\": 12}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Projects Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Accounts Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Stock Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"HR Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Selling Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Buying Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Support Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Shopping Cart Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Portal Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Manufacturing Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Education Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Hotel Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Healthcare Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Domain Settings\", \"col\": 4}}, {\"type\": \"shortcut\", \"data\": {\"shortcut_name\": \"Products Settings\", \"col\": 4}}]", + "content": "[{\"type\":\"header\",\"data\":{\"text\":\"Your Shortcuts\\n\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\",\"level\":4,\"col\":12}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Projects Settings\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Accounts Settings\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Stock Settings\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"HR Settings\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Selling Settings\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Buying Settings\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Support Settings\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Shopping Cart Settings\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Portal Settings\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Domain Settings\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Products Settings\",\"col\":4}},{\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Naming Series\",\"col\":4}}]", "creation": "2020-03-12 14:47:51.166455", "docstatus": 0, "doctype": "Workspace", @@ -10,7 +10,7 @@ "idx": 0, "label": "ERPNext Settings", "links": [], - "modified": "2021-08-05 12:15:59.052328", + "modified": "2021-10-26 21:32:55.323591", "modified_by": "Administrator", "module": "Setup", "name": "ERPNext Settings", @@ -27,6 +27,14 @@ "link_to": "Projects Settings", "type": "DocType" }, + { + "color": "Grey", + "doc_view": "", + "icon": "dot-horizontal", + "label": "Naming Series", + "link_to": "Naming Series", + "type": "DocType" + }, { "icon": "accounting", "label": "Accounts Settings", From f24ed6723ebc16282b3968e9ef5d58e629f7deb1 Mon Sep 17 00:00:00 2001 From: hendrik Date: Wed, 27 Oct 2021 16:08:20 +0700 Subject: [PATCH 083/200] fix(general_ledger): Order by in case Group by Account (#28093) * Update general_ledger.py Fix order_by_statement if filter group by: Group by Account * chore: whitespace Co-authored-by: Ankush Menat Co-authored-by: Afshan <33727827+AfshanKhan@users.noreply.github.com> --- erpnext/accounts/report/general_ledger/general_ledger.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 0094bc2eebe..31416da4ac4 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -155,6 +155,8 @@ def get_gl_entries(filters, accounting_dimensions): if filters.get("group_by") == "Group by Voucher": order_by_statement = "order by posting_date, voucher_type, voucher_no" + if filters.get("group_by") == "Group by Account": + order_by_statement = "order by account, posting_date, creation" if filters.get("include_default_book_entries"): filters['company_fb'] = frappe.db.get_value("Company", From c9f3ea5fea6ee1d07897d8ae6496d9a26289f900 Mon Sep 17 00:00:00 2001 From: Ganga Manoj Date: Wed, 27 Oct 2021 15:16:38 +0530 Subject: [PATCH 084/200] fix: Remove pointless buttons from Payment Order fix: Remove pointless buttons from Payment Order --- erpnext/accounts/doctype/payment_order/payment_order.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/doctype/payment_order/payment_order.js b/erpnext/accounts/doctype/payment_order/payment_order.js index aa373bc2fcc..9074defa577 100644 --- a/erpnext/accounts/doctype/payment_order/payment_order.js +++ b/erpnext/accounts/doctype/payment_order/payment_order.js @@ -10,6 +10,9 @@ frappe.ui.form.on('Payment Order', { } } }); + + frm.set_df_property('references', 'cannot_add_rows', true); + frm.set_df_property('references', 'cannot_delete_rows', true); }, refresh: function(frm) { if (frm.doc.docstatus == 0) { From e0cf45e7ec60649a35c591e3da44df4b47fb0cdd Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 27 Oct 2021 15:27:33 +0530 Subject: [PATCH 085/200] fix(ux): misleading label for image fields (#28107) --- erpnext/manufacturing/doctype/bom/bom.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.json b/erpnext/manufacturing/doctype/bom/bom.json index 7e539183b0c..62187077f3d 100644 --- a/erpnext/manufacturing/doctype/bom/bom.json +++ b/erpnext/manufacturing/doctype/bom/bom.json @@ -436,7 +436,7 @@ "description": "Item Image (if not slideshow)", "fieldname": "website_image", "fieldtype": "Attach Image", - "label": "Image" + "label": "Website Image" }, { "allow_on_submit": 1, @@ -539,7 +539,7 @@ "image_field": "image", "is_submittable": 1, "links": [], - "modified": "2021-05-16 12:25:09.081968", + "modified": "2021-10-27 14:52:04.500251", "modified_by": "Administrator", "module": "Manufacturing", "name": "BOM", From a261d08dd868ff6c306a2c8392dddd73d006ab85 Mon Sep 17 00:00:00 2001 From: Saqib Date: Wed, 27 Oct 2021 18:30:37 +0530 Subject: [PATCH 086/200] fix: reset temporary flag after use --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 0ca11fd4511..cd204ba523b 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1048,6 +1048,7 @@ class SalesInvoice(SellingController): frappe.flags.is_reverse_depr_entry = True reverse_journal_entry.submit() + frappe.flags.is_reverse_depr_entry = False asset.flags.ignore_validate_update_after_submit = True schedule.journal_entry = None asset.save() From 3a6894fb9c2803cdd411a577f05f1cbf76ac2b06 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 27 Oct 2021 19:39:18 +0530 Subject: [PATCH 087/200] fix: Autoemail report not showing dynamic report filters --- erpnext/public/js/financial_statements.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/erpnext/public/js/financial_statements.js b/erpnext/public/js/financial_statements.js index 0d79b10c041..1a309ba0156 100644 --- a/erpnext/public/js/financial_statements.js +++ b/erpnext/public/js/financial_statements.js @@ -113,15 +113,15 @@ function get_filters() { "fieldname":"period_start_date", "label": __("Start Date"), "fieldtype": "Date", - "hidden": 1, - "reqd": 1 + "reqd": 1, + "depends_on": "eval:doc.filter_based_on == 'Date Range'" }, { "fieldname":"period_end_date", "label": __("End Date"), "fieldtype": "Date", - "hidden": 1, - "reqd": 1 + "reqd": 1, + "depends_on": "eval:doc.filter_based_on == 'Date Range'" }, { "fieldname":"from_fiscal_year", @@ -129,7 +129,8 @@ function get_filters() { "fieldtype": "Link", "options": "Fiscal Year", "default": frappe.defaults.get_user_default("fiscal_year"), - "reqd": 1 + "reqd": 1, + "depends_on": "eval:doc.filter_based_on == 'Fiscal Year'" }, { "fieldname":"to_fiscal_year", @@ -137,7 +138,8 @@ function get_filters() { "fieldtype": "Link", "options": "Fiscal Year", "default": frappe.defaults.get_user_default("fiscal_year"), - "reqd": 1 + "reqd": 1, + "depends_on": "eval:doc.filter_based_on == 'Fiscal Year'" }, { "fieldname": "periodicity", From 5f9bd9b8e9f0dca849f6ad78269cf4151181d5a5 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 27 Oct 2021 18:39:07 +0530 Subject: [PATCH 088/200] fix: remove bad hardcoded max value --- erpnext/manufacturing/doctype/work_order/work_order.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index e282dd3ecba..f881e1bf16a 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -685,9 +685,7 @@ class WorkOrder(Document): if not d.operation: d.operation = operation else: - # Attribute a big number (999) to idx for sorting putpose in case idx is NULL - # For instance in BOM Explosion Item child table, the items coming from sub assembly items - for item in sorted(item_dict.values(), key=lambda d: d['idx'] or 9999): + for item in sorted(item_dict.values(), key=lambda d: d['idx'] or float('inf')): self.append('required_items', { 'rate': item.rate, 'amount': item.rate * item.qty, From 5902762ec8e243c17116732d616426a17f49bc1c Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 27 Oct 2021 18:55:54 +0530 Subject: [PATCH 089/200] fix(ux): alternative item two way validation --- .../item_alternative/item_alternative.py | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/erpnext/stock/doctype/item_alternative/item_alternative.py b/erpnext/stock/doctype/item_alternative/item_alternative.py index 6080fb4a5fa..6f2a389b707 100644 --- a/erpnext/stock/doctype/item_alternative/item_alternative.py +++ b/erpnext/stock/doctype/item_alternative/item_alternative.py @@ -25,19 +25,29 @@ class ItemAlternative(Document): frappe.throw(_("Alternative item must not be same as item code")) item_meta = frappe.get_meta("Item") - fields = ["is_stock_item", "include_item_in_manufacturing","has_serial_no","has_batch_no"] - item_data = frappe.db.get_values("Item", self.item_code, fields, as_dict=1) - alternative_item_data = frappe.db.get_values("Item", self.alternative_item_code, fields, as_dict=1) + fields = ["is_stock_item", "include_item_in_manufacturing","has_serial_no", "has_batch_no", "allow_alternative_item"] + item_data = frappe.db.get_value("Item", self.item_code, fields, as_dict=1) + alternative_item_data = frappe.db.get_value("Item", self.alternative_item_code, fields, as_dict=1) for field in fields: - if item_data[0].get(field) != alternative_item_data[0].get(field): + if item_data.get(field) != alternative_item_data.get(field): raise_exception, alert = [1, False] if field == "is_stock_item" else [0, True] frappe.msgprint(_("The value of {0} differs between Items {1} and {2}") \ .format(frappe.bold(item_meta.get_label(field)), frappe.bold(self.alternative_item_code), frappe.bold(self.item_code)), - alert=alert, raise_exception=raise_exception) + alert=alert, raise_exception=raise_exception, indicator="Orange") + + alternate_item_check_msg = _("Allow Alternative Item must be checked on Item {}") + + if not item_data.allow_alternative_item: + frappe.throw(alternate_item_check_msg.format(self.item_code)) + if self.two_way and not alternative_item_data.allow_alternative_item: + frappe.throw(alternate_item_check_msg.format(self.item_code)) + + + def validate_duplicate(self): if frappe.db.get_value("Item Alternative", {'item_code': self.item_code, From 2221c9ed89467ee7db7289da7b15778aed0c68a0 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 27 Oct 2021 19:15:44 +0530 Subject: [PATCH 090/200] fix: don't show blocked supplier in autocomplete --- erpnext/controllers/queries.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index 7b4566a2fa6..eeb659dee58 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -132,7 +132,8 @@ def supplier_query(doctype, txt, searchfield, start, page_len, filters): return frappe.db.sql("""select {field} from `tabSupplier` where docstatus < 2 and ({key} like %(txt)s - or supplier_name like %(txt)s) and disabled=0 + or supplier_name like %(txt)s) and disabled=0 + and (on_hold = 0 or (on_hold = 1 and CURDATE() > release_date)) {mcond} order by if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999), From d81b87d9b3c83413adf4e1a87fccb95486b50931 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 27 Oct 2021 19:22:11 +0530 Subject: [PATCH 091/200] fix(ux): make qty 1 by default in WO --- erpnext/manufacturing/doctype/work_order/work_order.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.json b/erpnext/manufacturing/doctype/work_order/work_order.json index 913fc85af61..7f8e816a22a 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.json +++ b/erpnext/manufacturing/doctype/work_order/work_order.json @@ -182,6 +182,7 @@ "reqd": 1 }, { + "default": "1.0", "fieldname": "qty", "fieldtype": "Float", "label": "Qty To Manufacture", @@ -572,10 +573,11 @@ "image_field": "image", "is_submittable": 1, "links": [], - "modified": "2021-08-24 15:14:03.844937", + "modified": "2021-10-27 19:21:35.139888", "modified_by": "Administrator", "module": "Manufacturing", "name": "Work Order", + "naming_rule": "By \"Naming Series\" field", "nsm_parent_field": "parent_work_order", "owner": "Administrator", "permissions": [ From 4787a7520847456a510577b708acfc22b8e4840b Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Thu, 28 Oct 2021 11:13:11 +0530 Subject: [PATCH 092/200] fix: opportunity link is missign from customer (#28110) --- erpnext/crm/doctype/opportunity/opportunity.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index 55e0efaab15..0e469ac6421 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -314,6 +314,8 @@ def make_request_for_quotation(source_name, target_doc=None): @frappe.whitelist() def make_customer(source_name, target_doc=None): def set_missing_values(source, target): + target.opportunity_name = source.name + if source.opportunity_from == "Lead": target.lead_name = source.party_name From d786855d94a8d60be34ddd34e4b7a013bc7d4480 Mon Sep 17 00:00:00 2001 From: Subin Tom Date: Thu, 28 Oct 2021 13:19:19 +0530 Subject: [PATCH 093/200] fix: Consolidated Financial Report throws error for empty equity data list --- .../consolidated_financial_statement.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py index 0de2a9854d6..0475231a934 100644 --- a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py +++ b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py @@ -114,8 +114,9 @@ def prepare_companywise_opening_balance(asset_data, liability_data, equity_data, # opening_value = Aseet - liability - equity for data in [asset_data, liability_data, equity_data]: - account_name = get_root_account_name(data[0].root_type, company) - opening_value += (get_opening_balance(account_name, data, company) or 0.0) + if data: + account_name = get_root_account_name(data[0].root_type, company) + opening_value += (get_opening_balance(account_name, data, company) or 0.0) opening_balance[company] = opening_value From b01635e1da0353d554b0de39d48a0fc275efc7d7 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Thu, 28 Oct 2021 14:07:15 +0530 Subject: [PATCH 094/200] refactor!: remove hub #28117 refactor!: remove hub --- .../doctype/pos_settings/pos_settings.js | 4 +- erpnext/demo/data/drug_list.json | 63 --- erpnext/hub/__init__.py | 0 erpnext/hub_node/__init__.py | 19 - erpnext/hub_node/api.py | 233 ---------- .../company_to_hub_company.json | 50 --- .../hub_message_to_lead.json | 31 -- .../item_to_hub_item/item_to_hub_item.json | 55 --- .../hub_sync/hub_sync.json | 19 - erpnext/hub_node/doctype/__init__.py | 0 .../doctype/hub_tracked_item/__init__.py | 0 .../hub_tracked_item/hub_tracked_item.js | 8 - .../hub_tracked_item/hub_tracked_item.json | 210 --------- .../hub_tracked_item/hub_tracked_item.py | 11 - .../hub_tracked_item/test_hub_tracked_item.py | 10 - erpnext/hub_node/doctype/hub_user/__init__.py | 0 .../hub_node/doctype/hub_user/hub_user.json | 140 ------ erpnext/hub_node/doctype/hub_user/hub_user.py | 11 - .../hub_node/doctype/hub_users/__init__.py | 0 .../hub_node/doctype/hub_users/hub_users.json | 72 --- .../hub_node/doctype/hub_users/hub_users.py | 11 - .../doctype/marketplace_settings/__init__.py | 0 .../marketplace_settings.js | 8 - .../marketplace_settings.json | 410 ------------------ .../marketplace_settings.py | 93 ---- .../test_marketplace_settings.py | 10 - erpnext/hub_node/legacy.py | 148 ------- erpnext/modules.txt | 3 +- erpnext/patches.txt | 6 +- erpnext/patches/v10_0/delete_hub_documents.py | 19 - .../reset_publish_in_hub_for_all_items.py | 8 - erpnext/patches/v11_0/update_hub_url.py | 8 - .../set_published_in_hub_tracked_item.py | 14 - erpnext/patches/v14_0/delete_hub_doctypes.py | 10 + erpnext/public/build.json | 8 - erpnext/public/images/hub_logo.svg | 112 ----- erpnext/public/js/erpnext.bundle.js | 1 - erpnext/public/js/hub/PageContainer.vue | 119 ----- erpnext/public/js/hub/Sidebar.vue | 110 ----- .../public/js/hub/components/CommentInput.vue | 39 -- .../js/hub/components/DetailHeaderItem.vue | 26 -- .../public/js/hub/components/DetailView.vue | 86 ---- .../public/js/hub/components/EmptyState.vue | 50 --- erpnext/public/js/hub/components/Image.vue | 40 -- erpnext/public/js/hub/components/ItemCard.vue | 142 ------ .../js/hub/components/ItemCardsContainer.vue | 62 --- .../public/js/hub/components/ItemListCard.vue | 21 - .../js/hub/components/NotificationMessage.vue | 38 -- erpnext/public/js/hub/components/Rating.vue | 16 - .../public/js/hub/components/ReviewArea.vue | 140 ------ .../js/hub/components/ReviewTimelineItem.vue | 53 --- .../public/js/hub/components/SearchInput.vue | 26 -- .../js/hub/components/SectionHeader.vue | 3 - .../public/js/hub/components/TimelineItem.vue | 9 - .../js/hub/components/edit_details_dialog.js | 41 -- .../js/hub/components/item_publish_dialog.js | 39 -- .../js/hub/components/profile_dialog.js | 56 --- erpnext/public/js/hub/components/reviews.js | 80 ---- erpnext/public/js/hub/hub_call.js | 68 --- erpnext/public/js/hub/hub_factory.js | 34 -- erpnext/public/js/hub/marketplace.bundle.js | 225 ---------- erpnext/public/js/hub/pages/Buying.vue | 56 --- erpnext/public/js/hub/pages/Category.vue | 76 ---- erpnext/public/js/hub/pages/FeaturedItems.vue | 116 ----- erpnext/public/js/hub/pages/Home.vue | 114 ----- erpnext/public/js/hub/pages/Item.vue | 356 --------------- erpnext/public/js/hub/pages/Messages.vue | 104 ----- erpnext/public/js/hub/pages/NotFound.vue | 36 -- erpnext/public/js/hub/pages/Publish.vue | 212 --------- .../public/js/hub/pages/PublishedItems.vue | 74 ---- erpnext/public/js/hub/pages/SavedItems.vue | 116 ----- erpnext/public/js/hub/pages/Search.vue | 81 ---- erpnext/public/js/hub/pages/Seller.vue | 201 --------- erpnext/public/js/hub/pages/SellerItems.vue | 57 --- erpnext/public/js/hub/pages/Selling.vue | 66 --- erpnext/public/js/hub/vue-plugins.js | 58 --- .../operations/install_fixtures.py | 1 - erpnext/stock/doctype/item/item.json | 54 +-- erpnext/stock/doctype/item/item.py | 1 - 79 files changed, 17 insertions(+), 5090 deletions(-) delete mode 100644 erpnext/hub/__init__.py delete mode 100644 erpnext/hub_node/__init__.py delete mode 100644 erpnext/hub_node/api.py delete mode 100644 erpnext/hub_node/data_migration_mapping/company_to_hub_company/company_to_hub_company.json delete mode 100644 erpnext/hub_node/data_migration_mapping/hub_message_to_lead/hub_message_to_lead.json delete mode 100644 erpnext/hub_node/data_migration_mapping/item_to_hub_item/item_to_hub_item.json delete mode 100644 erpnext/hub_node/data_migration_plan/hub_sync/hub_sync.json delete mode 100644 erpnext/hub_node/doctype/__init__.py delete mode 100644 erpnext/hub_node/doctype/hub_tracked_item/__init__.py delete mode 100644 erpnext/hub_node/doctype/hub_tracked_item/hub_tracked_item.js delete mode 100644 erpnext/hub_node/doctype/hub_tracked_item/hub_tracked_item.json delete mode 100644 erpnext/hub_node/doctype/hub_tracked_item/hub_tracked_item.py delete mode 100644 erpnext/hub_node/doctype/hub_tracked_item/test_hub_tracked_item.py delete mode 100644 erpnext/hub_node/doctype/hub_user/__init__.py delete mode 100644 erpnext/hub_node/doctype/hub_user/hub_user.json delete mode 100644 erpnext/hub_node/doctype/hub_user/hub_user.py delete mode 100644 erpnext/hub_node/doctype/hub_users/__init__.py delete mode 100644 erpnext/hub_node/doctype/hub_users/hub_users.json delete mode 100644 erpnext/hub_node/doctype/hub_users/hub_users.py delete mode 100644 erpnext/hub_node/doctype/marketplace_settings/__init__.py delete mode 100644 erpnext/hub_node/doctype/marketplace_settings/marketplace_settings.js delete mode 100644 erpnext/hub_node/doctype/marketplace_settings/marketplace_settings.json delete mode 100644 erpnext/hub_node/doctype/marketplace_settings/marketplace_settings.py delete mode 100644 erpnext/hub_node/doctype/marketplace_settings/test_marketplace_settings.py delete mode 100644 erpnext/hub_node/legacy.py delete mode 100644 erpnext/patches/v10_0/delete_hub_documents.py delete mode 100644 erpnext/patches/v11_0/reset_publish_in_hub_for_all_items.py delete mode 100644 erpnext/patches/v11_0/update_hub_url.py delete mode 100644 erpnext/patches/v12_0/set_published_in_hub_tracked_item.py create mode 100644 erpnext/patches/v14_0/delete_hub_doctypes.py delete mode 100644 erpnext/public/images/hub_logo.svg delete mode 100644 erpnext/public/js/hub/PageContainer.vue delete mode 100644 erpnext/public/js/hub/Sidebar.vue delete mode 100644 erpnext/public/js/hub/components/CommentInput.vue delete mode 100644 erpnext/public/js/hub/components/DetailHeaderItem.vue delete mode 100644 erpnext/public/js/hub/components/DetailView.vue delete mode 100644 erpnext/public/js/hub/components/EmptyState.vue delete mode 100644 erpnext/public/js/hub/components/Image.vue delete mode 100644 erpnext/public/js/hub/components/ItemCard.vue delete mode 100644 erpnext/public/js/hub/components/ItemCardsContainer.vue delete mode 100644 erpnext/public/js/hub/components/ItemListCard.vue delete mode 100644 erpnext/public/js/hub/components/NotificationMessage.vue delete mode 100644 erpnext/public/js/hub/components/Rating.vue delete mode 100644 erpnext/public/js/hub/components/ReviewArea.vue delete mode 100644 erpnext/public/js/hub/components/ReviewTimelineItem.vue delete mode 100644 erpnext/public/js/hub/components/SearchInput.vue delete mode 100644 erpnext/public/js/hub/components/SectionHeader.vue delete mode 100644 erpnext/public/js/hub/components/TimelineItem.vue delete mode 100644 erpnext/public/js/hub/components/edit_details_dialog.js delete mode 100644 erpnext/public/js/hub/components/item_publish_dialog.js delete mode 100644 erpnext/public/js/hub/components/profile_dialog.js delete mode 100644 erpnext/public/js/hub/components/reviews.js delete mode 100644 erpnext/public/js/hub/hub_call.js delete mode 100644 erpnext/public/js/hub/hub_factory.js delete mode 100644 erpnext/public/js/hub/marketplace.bundle.js delete mode 100644 erpnext/public/js/hub/pages/Buying.vue delete mode 100644 erpnext/public/js/hub/pages/Category.vue delete mode 100644 erpnext/public/js/hub/pages/FeaturedItems.vue delete mode 100644 erpnext/public/js/hub/pages/Home.vue delete mode 100644 erpnext/public/js/hub/pages/Item.vue delete mode 100644 erpnext/public/js/hub/pages/Messages.vue delete mode 100644 erpnext/public/js/hub/pages/NotFound.vue delete mode 100644 erpnext/public/js/hub/pages/Publish.vue delete mode 100644 erpnext/public/js/hub/pages/PublishedItems.vue delete mode 100644 erpnext/public/js/hub/pages/SavedItems.vue delete mode 100644 erpnext/public/js/hub/pages/Search.vue delete mode 100644 erpnext/public/js/hub/pages/Seller.vue delete mode 100644 erpnext/public/js/hub/pages/SellerItems.vue delete mode 100644 erpnext/public/js/hub/pages/Selling.vue delete mode 100644 erpnext/public/js/hub/vue-plugins.js diff --git a/erpnext/accounts/doctype/pos_settings/pos_settings.js b/erpnext/accounts/doctype/pos_settings/pos_settings.js index 9003af56a5d..7d8f3562c8c 100644 --- a/erpnext/accounts/doctype/pos_settings/pos_settings.js +++ b/erpnext/accounts/doctype/pos_settings/pos_settings.js @@ -2,11 +2,11 @@ // For license information, please see license.txt let search_fields_datatypes = ['Data', 'Link', 'Dynamic Link', 'Long Text', 'Select', 'Small Text', 'Text', 'Text Editor']; -let do_not_include_fields = ["naming_series", "item_code", "item_name", "stock_uom", "hub_sync_id", "asset_naming_series", +let do_not_include_fields = ["naming_series", "item_code", "item_name", "stock_uom", "asset_naming_series", "default_material_request_type", "valuation_method", "warranty_period", "weight_uom", "batch_number_series", "serial_no_series", "purchase_uom", "customs_tariff_number", "sales_uom", "deferred_revenue_account", "deferred_expense_account", "quality_inspection_template", "route", "slideshow", "website_image_alt", "thumbnail", - "web_long_description", "hub_sync_id"] + "web_long_description"] frappe.ui.form.on('POS Settings', { onload: function(frm) { diff --git a/erpnext/demo/data/drug_list.json b/erpnext/demo/data/drug_list.json index e91c30d199a..3069042843a 100644 --- a/erpnext/demo/data/drug_list.json +++ b/erpnext/demo/data/drug_list.json @@ -60,7 +60,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -144,7 +143,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -226,7 +224,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -308,7 +305,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -390,7 +386,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -472,7 +467,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -554,7 +548,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -636,7 +629,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -718,7 +710,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -800,7 +791,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -882,7 +872,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -964,7 +953,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -1046,7 +1034,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -1128,7 +1115,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -1210,7 +1196,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -1292,7 +1277,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -1374,7 +1358,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -1456,7 +1439,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -1538,7 +1520,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -1620,7 +1601,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -1702,7 +1682,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -1784,7 +1763,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -1866,7 +1844,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -1948,7 +1925,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -2030,7 +2006,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -2112,7 +2087,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -2194,7 +2168,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -2276,7 +2249,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -2358,7 +2330,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -2440,7 +2411,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -2522,7 +2492,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -2604,7 +2573,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -2686,7 +2654,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -2768,7 +2735,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -2850,7 +2816,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -2932,7 +2897,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -3014,7 +2978,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -3098,7 +3061,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -3180,7 +3142,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -3262,7 +3223,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -3344,7 +3304,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -3426,7 +3385,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -3508,7 +3466,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -3590,7 +3547,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -3672,7 +3628,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -3754,7 +3709,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -3836,7 +3790,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -3918,7 +3871,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -4000,7 +3952,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -4082,7 +4033,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -4164,7 +4114,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -4246,7 +4195,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -4328,7 +4276,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -4410,7 +4357,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -4492,7 +4438,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -4574,7 +4519,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -4656,7 +4600,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -4738,7 +4681,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -4820,7 +4762,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -4902,7 +4843,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -4984,7 +4924,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -5066,7 +5005,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, @@ -5148,7 +5086,6 @@ "standard_rate": 0.0, "stock_uom": "Nos", "supplier_items": [], - "synced_with_hub": 0, "taxes": [], "thumbnail": null, "tolerance": 0.0, diff --git a/erpnext/hub/__init__.py b/erpnext/hub/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/erpnext/hub_node/__init__.py b/erpnext/hub_node/__init__.py deleted file mode 100644 index 6ac3255c12a..00000000000 --- a/erpnext/hub_node/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals - -import frappe - - -@frappe.whitelist() -def enable_hub(): - hub_settings = frappe.get_doc('Marketplace Settings') - hub_settings.register() - frappe.db.commit() - return hub_settings - -@frappe.whitelist() -def sync(): - hub_settings = frappe.get_doc('Marketplace Settings') - hub_settings.sync() diff --git a/erpnext/hub_node/api.py b/erpnext/hub_node/api.py deleted file mode 100644 index 55304917759..00000000000 --- a/erpnext/hub_node/api.py +++ /dev/null @@ -1,233 +0,0 @@ -from __future__ import unicode_literals - -import json - -import frappe -from frappe import _ -from frappe.desk.form.load import get_attachments -from frappe.frappeclient import FrappeClient -from six import string_types - -current_user = frappe.session.user - - -@frappe.whitelist() -def register_marketplace(company, company_description): - validate_registerer() - - settings = frappe.get_single('Marketplace Settings') - message = settings.register_seller(company, company_description) - - if message.get('hub_seller_name'): - settings.registered = 1 - settings.hub_seller_name = message.get('hub_seller_name') - settings.save() - - settings.add_hub_user(frappe.session.user) - - return { 'ok': 1 } - - -@frappe.whitelist() -def register_users(user_list): - user_list = json.loads(user_list) - - settings = frappe.get_single('Marketplace Settings') - - for user in user_list: - settings.add_hub_user(user) - - return user_list - - -def validate_registerer(): - if current_user == 'Administrator': - frappe.throw(_('Please login as another user to register on Marketplace')) - - valid_roles = ['System Manager', 'Item Manager'] - - if not frappe.utils.is_subset(valid_roles, frappe.get_roles()): - frappe.throw(_('Only users with {0} role can register on Marketplace').format(', '.join(valid_roles)), - frappe.PermissionError) - - -@frappe.whitelist() -def call_hub_method(method, params=None): - connection = get_hub_connection() - - if isinstance(params, string_types): - params = json.loads(params) - - params.update({ - 'cmd': 'hub.hub.api.' + method - }) - - response = connection.post_request(params) - return response - - -def map_fields(items): - field_mappings = get_field_mappings() - table_fields = [d.fieldname for d in frappe.get_meta('Item').get_table_fields()] - - hub_seller_name = frappe.db.get_value('Marketplace Settings', 'Marketplace Settings', 'hub_seller_name') - - for item in items: - for fieldname in table_fields: - item.pop(fieldname, None) - - for mapping in field_mappings: - local_fieldname = mapping.get('local_fieldname') - remote_fieldname = mapping.get('remote_fieldname') - - value = item.get(local_fieldname) - item.pop(local_fieldname, None) - item[remote_fieldname] = value - - item['doctype'] = 'Hub Item' - item['hub_seller'] = hub_seller_name - item.pop('attachments', None) - - return items - - -@frappe.whitelist() -def get_valid_items(search_value=''): - items = frappe.get_list( - 'Item', - fields=["*"], - filters={ - 'disabled': 0, - 'item_name': ['like', '%' + search_value + '%'], - 'publish_in_hub': 0 - }, - order_by="modified desc" - ) - - valid_items = filter(lambda x: x.image and x.description, items) - - def prepare_item(item): - item.source_type = "local" - item.attachments = get_attachments('Item', item.item_code) - return item - - valid_items = map(prepare_item, valid_items) - - return valid_items - -@frappe.whitelist() -def update_item(ref_doc, data): - data = json.loads(data) - - data.update(dict(doctype='Hub Item', name=ref_doc)) - try: - connection = get_hub_connection() - connection.update(data) - except Exception as e: - frappe.log_error(message=e, title='Hub Sync Error') - -@frappe.whitelist() -def publish_selected_items(items_to_publish): - items_to_publish = json.loads(items_to_publish) - items_to_update = [] - if not len(items_to_publish): - frappe.throw(_('No items to publish')) - - for item in items_to_publish: - item_code = item.get('item_code') - frappe.db.set_value('Item', item_code, 'publish_in_hub', 1) - - hub_dict = { - 'doctype': 'Hub Tracked Item', - 'item_code': item_code, - 'published': 1, - 'hub_category': item.get('hub_category'), - 'image_list': item.get('image_list') - } - frappe.get_doc(hub_dict).insert(ignore_if_duplicate=True) - - items = map_fields(items_to_publish) - - try: - item_sync_preprocess(len(items)) - convert_relative_image_urls_to_absolute(items) - - # TODO: Publish Progress - connection = get_hub_connection() - connection.insert_many(items) - - item_sync_postprocess() - except Exception as e: - frappe.log_error(message=e, title='Hub Sync Error') - -@frappe.whitelist() -def unpublish_item(item_code, hub_item_name): - ''' Remove item listing from the marketplace ''' - - response = call_hub_method('unpublish_item', { - 'hub_item_name': hub_item_name - }) - - if response: - frappe.db.set_value('Item', item_code, 'publish_in_hub', 0) - frappe.delete_doc('Hub Tracked Item', item_code) - else: - frappe.throw(_('Unable to update remote activity')) - -@frappe.whitelist() -def get_unregistered_users(): - settings = frappe.get_single('Marketplace Settings') - registered_users = [user.user for user in settings.users] + ['Administrator', 'Guest'] - all_users = [user.name for user in frappe.db.get_all('User', filters={'enabled': 1})] - unregistered_users = [user for user in all_users if user not in registered_users] - return unregistered_users - - -def item_sync_preprocess(intended_item_publish_count): - response = call_hub_method('pre_items_publish', { - 'intended_item_publish_count': intended_item_publish_count - }) - - if response: - frappe.db.set_value("Marketplace Settings", "Marketplace Settings", "sync_in_progress", 1) - return response - else: - frappe.throw(_('Unable to update remote activity')) - - -def item_sync_postprocess(): - response = call_hub_method('post_items_publish', {}) - if response: - frappe.db.set_value('Marketplace Settings', 'Marketplace Settings', 'last_sync_datetime', frappe.utils.now()) - else: - frappe.throw(_('Unable to update remote activity')) - - frappe.db.set_value('Marketplace Settings', 'Marketplace Settings', 'sync_in_progress', 0) - - -def convert_relative_image_urls_to_absolute(items): - from six.moves.urllib.parse import urljoin - - for item in items: - file_path = item['image'] - - if file_path.startswith('/files/'): - item['image'] = urljoin(frappe.utils.get_url(), file_path) - - -def get_hub_connection(): - settings = frappe.get_single('Marketplace Settings') - marketplace_url = settings.marketplace_url - hub_user = settings.get_hub_user(frappe.session.user) - - if hub_user: - password = hub_user.get_password() - hub_connection = FrappeClient(marketplace_url, hub_user.user, password) - return hub_connection - else: - read_only_hub_connection = FrappeClient(marketplace_url) - return read_only_hub_connection - - -def get_field_mappings(): - return [] diff --git a/erpnext/hub_node/data_migration_mapping/company_to_hub_company/company_to_hub_company.json b/erpnext/hub_node/data_migration_mapping/company_to_hub_company/company_to_hub_company.json deleted file mode 100644 index b1e421dada8..00000000000 --- a/erpnext/hub_node/data_migration_mapping/company_to_hub_company/company_to_hub_company.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "condition": "{'name': ('=', frappe.db.get_single_value('Hub Settings', 'company'))}", - "creation": "2017-09-07 11:38:43.169065", - "docstatus": 0, - "doctype": "Data Migration Mapping", - "fields": [ - { - "is_child_table": 0, - "local_fieldname": "name", - "remote_fieldname": "company_name" - }, - { - "is_child_table": 0, - "local_fieldname": "country", - "remote_fieldname": "country" - }, - { - "is_child_table": 0, - "local_fieldname": "\"city\"", - "remote_fieldname": "seller_city" - }, - { - "is_child_table": 0, - "local_fieldname": "eval:frappe.local.site", - "remote_fieldname": "site_name" - }, - { - "is_child_table": 0, - "local_fieldname": "eval:frappe.session.user", - "remote_fieldname": "user" - }, - { - "is_child_table": 0, - "local_fieldname": "company_logo", - "remote_fieldname": "company_logo" - } - ], - "idx": 2, - "local_doctype": "Company", - "mapping_name": "Company to Hub Company", - "mapping_type": "Push", - "migration_id_field": "hub_sync_id", - "modified": "2020-09-18 17:26:09.703215", - "modified_by": "Administrator", - "name": "Company to Hub Company", - "owner": "Administrator", - "page_length": 10, - "remote_objectname": "Hub Company", - "remote_primary_key": "name" -} \ No newline at end of file diff --git a/erpnext/hub_node/data_migration_mapping/hub_message_to_lead/hub_message_to_lead.json b/erpnext/hub_node/data_migration_mapping/hub_message_to_lead/hub_message_to_lead.json deleted file mode 100644 index d11abeb4b38..00000000000 --- a/erpnext/hub_node/data_migration_mapping/hub_message_to_lead/hub_message_to_lead.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "condition": "{'reference_doctype': 'Lead', 'user': frappe.db.get_single_value('Hub Settings', 'user'), 'status': 'Pending'}", - "creation": "2017-09-20 15:06:40.279930", - "docstatus": 0, - "doctype": "Data Migration Mapping", - "fields": [ - { - "is_child_table": 0, - "local_fieldname": "email_id", - "remote_fieldname": "email_id" - }, - { - "is_child_table": 0, - "local_fieldname": "lead_name", - "remote_fieldname": "lead_name" - } - ], - "idx": 0, - "local_doctype": "Lead", - "local_primary_key": "email_id", - "mapping_name": "Hub Message to Lead", - "mapping_type": "Pull", - "migration_id_field": "hub_sync_id", - "modified": "2020-09-18 17:26:09.703215", - "modified_by": "Administrator", - "name": "Hub Message to Lead", - "owner": "Administrator", - "page_length": 10, - "remote_objectname": "Hub Message", - "remote_primary_key": "name" -} \ No newline at end of file diff --git a/erpnext/hub_node/data_migration_mapping/item_to_hub_item/item_to_hub_item.json b/erpnext/hub_node/data_migration_mapping/item_to_hub_item/item_to_hub_item.json deleted file mode 100644 index bcece69b38c..00000000000 --- a/erpnext/hub_node/data_migration_mapping/item_to_hub_item/item_to_hub_item.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "condition": "{\"publish_in_hub\": 1}", - "creation": "2017-09-07 13:27:52.726350", - "docstatus": 0, - "doctype": "Data Migration Mapping", - "fields": [ - { - "is_child_table": 0, - "local_fieldname": "item_code", - "remote_fieldname": "item_code" - }, - { - "is_child_table": 0, - "local_fieldname": "item_name", - "remote_fieldname": "item_name" - }, - { - "is_child_table": 0, - "local_fieldname": "eval:frappe.db.get_value('Hub Settings' , 'Hub Settings', 'company_email')", - "remote_fieldname": "hub_seller" - }, - { - "is_child_table": 0, - "local_fieldname": "image", - "remote_fieldname": "image" - }, - { - "is_child_table": 0, - "local_fieldname": "image_list", - "remote_fieldname": "image_list" - }, - { - "is_child_table": 0, - "local_fieldname": "item_group", - "remote_fieldname": "item_group" - }, - { - "is_child_table": 0, - "local_fieldname": "hub_category", - "remote_fieldname": "hub_category" - } - ], - "idx": 1, - "local_doctype": "Item", - "mapping_name": "Item to Hub Item", - "mapping_type": "Push", - "migration_id_field": "hub_sync_id", - "modified": "2018-08-19 22:20:25.727581", - "modified_by": "Administrator", - "name": "Item to Hub Item", - "owner": "Administrator", - "page_length": 10, - "remote_objectname": "Hub Item", - "remote_primary_key": "item_code" -} \ No newline at end of file diff --git a/erpnext/hub_node/data_migration_plan/hub_sync/hub_sync.json b/erpnext/hub_node/data_migration_plan/hub_sync/hub_sync.json deleted file mode 100644 index e90b1dd1e8d..00000000000 --- a/erpnext/hub_node/data_migration_plan/hub_sync/hub_sync.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "creation": "2017-09-07 11:39:38.445902", - "docstatus": 0, - "doctype": "Data Migration Plan", - "idx": 1, - "mappings": [ - { - "enabled": 1, - "mapping": "Item to Hub Item" - } - ], - "modified": "2018-08-19 22:20:25.644602", - "modified_by": "Administrator", - "module": "Hub Node", - "name": "Hub Sync", - "owner": "Administrator", - "plan_name": "Hub Sync", - "postprocess_method": "erpnext.hub_node.api.item_sync_postprocess" -} \ No newline at end of file diff --git a/erpnext/hub_node/doctype/__init__.py b/erpnext/hub_node/doctype/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/erpnext/hub_node/doctype/hub_tracked_item/__init__.py b/erpnext/hub_node/doctype/hub_tracked_item/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/erpnext/hub_node/doctype/hub_tracked_item/hub_tracked_item.js b/erpnext/hub_node/doctype/hub_tracked_item/hub_tracked_item.js deleted file mode 100644 index 660532d13df..00000000000 --- a/erpnext/hub_node/doctype/hub_tracked_item/hub_tracked_item.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Hub Tracked Item', { - refresh: function(frm) { - - } -}); diff --git a/erpnext/hub_node/doctype/hub_tracked_item/hub_tracked_item.json b/erpnext/hub_node/doctype/hub_tracked_item/hub_tracked_item.json deleted file mode 100644 index 7d07ba40938..00000000000 --- a/erpnext/hub_node/doctype/hub_tracked_item/hub_tracked_item.json +++ /dev/null @@ -1,210 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "field:item_code", - "beta": 0, - "creation": "2018-03-18 09:33:50.267762", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "item_code", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Item Code", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 1 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "hub_category", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Hub Category", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "published", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Published", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "image_list", - "fieldtype": "Long Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Image List", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2019-12-10 11:37:35.951019", - "modified_by": "Administrator", - "module": "Hub Node", - "name": "Hub Tracked Item", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - }, - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "Item Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 1 - } - ], - "quick_entry": 1, - "read_only": 1, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/hub_node/doctype/hub_tracked_item/hub_tracked_item.py b/erpnext/hub_node/doctype/hub_tracked_item/hub_tracked_item.py deleted file mode 100644 index 823c79eb72b..00000000000 --- a/erpnext/hub_node/doctype/hub_tracked_item/hub_tracked_item.py +++ /dev/null @@ -1,11 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals - -from frappe.model.document import Document - - -class HubTrackedItem(Document): - pass diff --git a/erpnext/hub_node/doctype/hub_tracked_item/test_hub_tracked_item.py b/erpnext/hub_node/doctype/hub_tracked_item/test_hub_tracked_item.py deleted file mode 100644 index c403f902a2c..00000000000 --- a/erpnext/hub_node/doctype/hub_tracked_item/test_hub_tracked_item.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt -from __future__ import unicode_literals - -import unittest - - -class TestHubTrackedItem(unittest.TestCase): - pass diff --git a/erpnext/hub_node/doctype/hub_user/__init__.py b/erpnext/hub_node/doctype/hub_user/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/erpnext/hub_node/doctype/hub_user/hub_user.json b/erpnext/hub_node/doctype/hub_user/hub_user.json deleted file mode 100644 index f51ffb4387d..00000000000 --- a/erpnext/hub_node/doctype/hub_user/hub_user.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "", - "beta": 0, - "creation": "2018-08-31 12:36:45.627531", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "user", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "User", - "length": 0, - "no_copy": 0, - "options": "User", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 1 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "hub_user_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Hub User", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "password", - "fieldtype": "Password", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Hub Password", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2020-09-18 17:26:09.703215", - "modified_by": "Administrator", - "module": "Hub Node", - "name": "Hub User", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/hub_node/doctype/hub_user/hub_user.py b/erpnext/hub_node/doctype/hub_user/hub_user.py deleted file mode 100644 index 1f7c8fc3f20..00000000000 --- a/erpnext/hub_node/doctype/hub_user/hub_user.py +++ /dev/null @@ -1,11 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals - -from frappe.model.document import Document - - -class HubUser(Document): - pass diff --git a/erpnext/hub_node/doctype/hub_users/__init__.py b/erpnext/hub_node/doctype/hub_users/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/erpnext/hub_node/doctype/hub_users/hub_users.json b/erpnext/hub_node/doctype/hub_users/hub_users.json deleted file mode 100644 index d42f3fdf1b7..00000000000 --- a/erpnext/hub_node/doctype/hub_users/hub_users.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2018-03-06 04:38:49.891787", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "user", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "User", - "length": 0, - "no_copy": 0, - "options": "User", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2020-09-18 17:26:09.703215", - "modified_by": "Administrator", - "module": "Hub Node", - "name": "Hub Users", - "name_case": "", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0 -} \ No newline at end of file diff --git a/erpnext/hub_node/doctype/hub_users/hub_users.py b/erpnext/hub_node/doctype/hub_users/hub_users.py deleted file mode 100644 index e08ed68ed8f..00000000000 --- a/erpnext/hub_node/doctype/hub_users/hub_users.py +++ /dev/null @@ -1,11 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals - -from frappe.model.document import Document - - -class HubUsers(Document): - pass diff --git a/erpnext/hub_node/doctype/marketplace_settings/__init__.py b/erpnext/hub_node/doctype/marketplace_settings/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/erpnext/hub_node/doctype/marketplace_settings/marketplace_settings.js b/erpnext/hub_node/doctype/marketplace_settings/marketplace_settings.js deleted file mode 100644 index 36da832c7c0..00000000000 --- a/erpnext/hub_node/doctype/marketplace_settings/marketplace_settings.js +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors -// For license information, please see license.txt - -frappe.ui.form.on('Marketplace Settings', { - refresh: function(frm) { - $('#toolbar-user .marketplace-link').toggle(!frm.doc.disable_marketplace); - }, -}); diff --git a/erpnext/hub_node/doctype/marketplace_settings/marketplace_settings.json b/erpnext/hub_node/doctype/marketplace_settings/marketplace_settings.json deleted file mode 100644 index e784f68fcf3..00000000000 --- a/erpnext/hub_node/doctype/marketplace_settings/marketplace_settings.json +++ /dev/null @@ -1,410 +0,0 @@ -{ - "allow_copy": 0, - "allow_events_in_timeline": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 1, - "creation": "2018-08-31 15:54:38.795263", - "custom": 0, - "description": "", - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 0, - "engine": "InnoDB", - "fields": [ - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "disable_marketplace", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Disable Marketplace", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "eval:!doc.disable_marketplace", - "fieldname": "marketplace_settings_section", - "fieldtype": "Section Break", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Marketplace Settings", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "https://hubmarket.org", - "fieldname": "marketplace_url", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Marketplace URL (to hide and update label)", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "registered", - "fieldtype": "Check", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Registered", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "sync_in_progress", - "fieldtype": "Check", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Sync in Progress", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "company", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Company", - "length": 0, - "no_copy": 0, - "options": "Company", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "hub_seller_name", - "fieldtype": "Data", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Hub Seller Name", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "users", - "fieldtype": "Table", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Users", - "length": 0, - "no_copy": 0, - "options": "Hub User", - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "depends_on": "", - "fieldname": "last_sync_datetime", - "fieldtype": "Datetime", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Last Sync On", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, - { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "", - "depends_on": "eval:1", - "fieldname": "custom_data", - "fieldtype": "Code", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Custom Data", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 1, - "istable": 0, - "max_attachments": 0, - "modified": "2020-09-18 17:26:09.703215", - "modified_by": "Administrator", - "module": "Hub Node", - "name": "Marketplace Settings", - "name_case": "", - "owner": "Administrator", - "permissions": [ - { - "amend": 0, - "cancel": 0, - "create": 1, - "delete": 0, - "email": 0, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 0, - "read": 1, - "report": 0, - "role": "System Manager", - "set_user_permissions": 0, - "share": 0, - "submit": 0, - "write": 1 - }, - { - "amend": 0, - "cancel": 0, - "create": 0, - "delete": 0, - "email": 1, - "export": 0, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 0, - "role": "All", - "set_user_permissions": 0, - "share": 1, - "submit": 0, - "write": 0 - } - ], - "quick_entry": 0, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} \ No newline at end of file diff --git a/erpnext/hub_node/doctype/marketplace_settings/marketplace_settings.py b/erpnext/hub_node/doctype/marketplace_settings/marketplace_settings.py deleted file mode 100644 index 33d23f6eae4..00000000000 --- a/erpnext/hub_node/doctype/marketplace_settings/marketplace_settings.py +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors and contributors -# For license information, please see license.txt - -from __future__ import unicode_literals - -import json - -import frappe -from frappe.frappeclient import FrappeClient -from frappe.model.document import Document -from frappe.utils import cint - - -class MarketplaceSettings(Document): - - def register_seller(self, company, company_description): - - country, currency, company_logo = frappe.db.get_value('Company', company, - ['country', 'default_currency', 'company_logo']) - - company_details = { - 'company': company, - 'country': country, - 'currency': currency, - 'company_description': company_description, - 'company_logo': company_logo, - 'site_name': frappe.utils.get_url() - } - - hub_connection = self.get_connection() - - response = hub_connection.post_request({ - 'cmd': 'hub.hub.api.add_hub_seller', - 'company_details': json.dumps(company_details) - }) - - return response - - - def add_hub_user(self, user_email): - '''Create a Hub User and User record on hub server - and if successfull append it to Hub User table - ''' - - if not self.registered: - return - - hub_connection = self.get_connection() - - first_name, last_name = frappe.db.get_value('User', user_email, ['first_name', 'last_name']) - - hub_user = hub_connection.post_request({ - 'cmd': 'hub.hub.api.add_hub_user', - 'user_email': user_email, - 'first_name': first_name, - 'last_name': last_name, - 'hub_seller': self.hub_seller_name - }) - - self.append('users', { - 'user': hub_user.get('user_email'), - 'hub_user_name': hub_user.get('hub_user_name'), - 'password': hub_user.get('password') - }) - - self.save() - - def get_hub_user(self, user): - '''Return the Hub User doc from the `users` table if password is set''' - - filtered_users = list(filter( - lambda x: x.user == user and x.password, - self.users - )) - - if filtered_users: - return filtered_users[0] - - - def get_connection(self): - return FrappeClient(self.marketplace_url) - - - def unregister(self): - """Disable the User on hubmarket.org""" - -@frappe.whitelist() -def is_marketplace_enabled(): - if not hasattr(frappe.local, 'is_marketplace_enabled'): - frappe.local.is_marketplace_enabled = cint(frappe.db.get_single_value('Marketplace Settings', - 'disable_marketplace')) - - return frappe.local.is_marketplace_enabled diff --git a/erpnext/hub_node/doctype/marketplace_settings/test_marketplace_settings.py b/erpnext/hub_node/doctype/marketplace_settings/test_marketplace_settings.py deleted file mode 100644 index 7922f45ab59..00000000000 --- a/erpnext/hub_node/doctype/marketplace_settings/test_marketplace_settings.py +++ /dev/null @@ -1,10 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors -# See license.txt -from __future__ import unicode_literals - -import unittest - - -class TestMarketplaceSettings(unittest.TestCase): - pass diff --git a/erpnext/hub_node/legacy.py b/erpnext/hub_node/legacy.py deleted file mode 100644 index 2e4c2668436..00000000000 --- a/erpnext/hub_node/legacy.py +++ /dev/null @@ -1,148 +0,0 @@ -from __future__ import unicode_literals - -import json - -import frappe -from frappe.contacts.doctype.contact.contact import get_default_contact -from frappe.frappeclient import FrappeClient -from frappe.utils import nowdate -from frappe.utils.nestedset import get_root_of - - -def get_list(doctype, start, limit, fields, filters, order_by): - pass - -def get_hub_connection(): - if frappe.db.exists('Data Migration Connector', 'Hub Connector'): - hub_connector = frappe.get_doc('Data Migration Connector', 'Hub Connector') - hub_connection = hub_connector.get_connection() - return hub_connection.connection - - # read-only connection - hub_connection = FrappeClient(frappe.conf.hub_url) - return hub_connection - -def make_opportunity(buyer_name, email_id): - buyer_name = "HUB-" + buyer_name - - if not frappe.db.exists('Lead', {'email_id': email_id}): - lead = frappe.new_doc("Lead") - lead.lead_name = buyer_name - lead.email_id = email_id - lead.save(ignore_permissions=True) - - o = frappe.new_doc("Opportunity") - o.opportunity_from = "Lead" - o.lead = frappe.get_all("Lead", filters={"email_id": email_id}, fields = ["name"])[0]["name"] - o.save(ignore_permissions=True) - -@frappe.whitelist() -def make_rfq_and_send_opportunity(item, supplier): - supplier = make_supplier(supplier) - contact = make_contact(supplier) - item = make_item(item) - rfq = make_rfq(item, supplier, contact) - status = send_opportunity(contact) - - return { - 'rfq': rfq, - 'hub_document_created': status - } - -def make_supplier(supplier): - # make supplier if not already exists - supplier = frappe._dict(json.loads(supplier)) - - if not frappe.db.exists('Supplier', {'supplier_name': supplier.supplier_name}): - supplier_doc = frappe.get_doc({ - 'doctype': 'Supplier', - 'supplier_name': supplier.supplier_name, - 'supplier_group': supplier.supplier_group, - 'supplier_email': supplier.supplier_email - }).insert() - else: - supplier_doc = frappe.get_doc('Supplier', supplier.supplier_name) - - return supplier_doc - -def make_contact(supplier): - contact_name = get_default_contact('Supplier', supplier.supplier_name) - # make contact if not already exists - if not contact_name: - contact = frappe.get_doc({ - 'doctype': 'Contact', - 'first_name': supplier.supplier_name, - 'is_primary_contact': 1, - 'links': [ - {'link_doctype': 'Supplier', 'link_name': supplier.supplier_name} - ] - }) - contact.add_email(supplier.supplier_email, is_primary=True) - contact.insert() - else: - contact = frappe.get_doc('Contact', contact_name) - - return contact - -def make_item(item): - # make item if not already exists - item = frappe._dict(json.loads(item)) - - if not frappe.db.exists('Item', {'item_code': item.item_code}): - item_doc = frappe.get_doc({ - 'doctype': 'Item', - 'item_code': item.item_code, - 'item_group': item.item_group, - 'is_item_from_hub': 1 - }).insert() - else: - item_doc = frappe.get_doc('Item', item.item_code) - - return item_doc - -def make_rfq(item, supplier, contact): - # make rfq - rfq = frappe.get_doc({ - 'doctype': 'Request for Quotation', - 'transaction_date': nowdate(), - 'status': 'Draft', - 'company': frappe.db.get_single_value('Marketplace Settings', 'company'), - 'message_for_supplier': 'Please supply the specified items at the best possible rates', - 'suppliers': [ - { 'supplier': supplier.name, 'contact': contact.name } - ], - 'items': [ - { - 'item_code': item.item_code, - 'qty': 1, - 'schedule_date': nowdate(), - 'warehouse': item.default_warehouse or get_root_of("Warehouse"), - 'description': item.description, - 'uom': item.stock_uom - } - ] - }).insert() - - rfq.save() - rfq.submit() - return rfq - -def send_opportunity(contact): - # Make Hub Message on Hub with lead data - doc = { - 'doctype': 'Lead', - 'lead_name': frappe.db.get_single_value('Marketplace Settings', 'company'), - 'email_id': frappe.db.get_single_value('Marketplace Settings', 'user') - } - - args = frappe._dict(dict( - doctype='Hub Message', - reference_doctype='Lead', - data=json.dumps(doc), - user=contact.email_id - )) - - connection = get_hub_connection() - response = connection.insert('Hub Message', args) - - return response.ok diff --git a/erpnext/modules.txt b/erpnext/modules.txt index a9f94ce1335..15a24a746f7 100644 --- a/erpnext/modules.txt +++ b/erpnext/modules.txt @@ -20,9 +20,8 @@ Agriculture ERPNext Integrations Non Profit Hotels -Hub Node Quality Management Communication Loan Management Payroll -Telephony +Telephony \ No newline at end of file diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 1dac50c6e19..c533d480f82 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -58,11 +58,7 @@ erpnext.patches.v11_0.set_department_for_doctypes erpnext.patches.v11_0.update_allow_transfer_for_manufacture erpnext.patches.v11_0.add_item_group_defaults erpnext.patches.v11_0.add_expense_claim_default_account -execute:frappe.delete_doc("Page", "hub") -erpnext.patches.v11_0.reset_publish_in_hub_for_all_items -erpnext.patches.v11_0.update_hub_url # 2018-08-31 # 2018-09-03 erpnext.patches.v11_0.make_job_card -erpnext.patches.v10_0.delete_hub_documents # 12-08-2018 erpnext.patches.v11_0.add_default_dispatch_notification_template erpnext.patches.v11_0.add_market_segments erpnext.patches.v11_0.add_sales_stages @@ -153,7 +149,6 @@ erpnext.patches.v12_0.set_cost_center_in_child_table_of_expense_claim erpnext.patches.v12_0.add_eway_bill_in_delivery_note erpnext.patches.v12_0.set_lead_title_field erpnext.patches.v12_0.set_permission_einvoicing -erpnext.patches.v12_0.set_published_in_hub_tracked_item erpnext.patches.v12_0.set_job_offer_applicant_email erpnext.patches.v12_0.create_irs_1099_field_united_states erpnext.patches.v12_0.move_bank_account_swift_number_to_bank @@ -312,3 +307,4 @@ erpnext.patches.v12_0.update_production_plan_status erpnext.patches.v13_0.healthcare_deprecation_warning erpnext.patches.v14_0.delete_healthcare_doctypes erpnext.patches.v13_0.create_pan_field_for_india #2 +erpnext.patches.v14_0.delete_hub_doctypes diff --git a/erpnext/patches/v10_0/delete_hub_documents.py b/erpnext/patches/v10_0/delete_hub_documents.py deleted file mode 100644 index 16c7abfc978..00000000000 --- a/erpnext/patches/v10_0/delete_hub_documents.py +++ /dev/null @@ -1,19 +0,0 @@ -from __future__ import unicode_literals - -import frappe - - -def execute(): - for dt, dn in (("Page", "Hub"), ("DocType", "Hub Settings"), ("DocType", "Hub Category")): - frappe.delete_doc(dt, dn, ignore_missing=True) - - if frappe.db.exists("DocType", "Data Migration Plan"): - data_migration_plans = frappe.get_all("Data Migration Plan", filters={"module": 'Hub Node'}) - for plan in data_migration_plans: - plan_doc = frappe.get_doc("Data Migration Plan", plan.name) - for m in plan_doc.get("mappings"): - frappe.delete_doc("Data Migration Mapping", m.mapping, force=True) - docs = frappe.get_all("Data Migration Run", filters={"data_migration_plan": plan.name}) - for doc in docs: - frappe.delete_doc("Data Migration Run", doc.name) - frappe.delete_doc("Data Migration Plan", plan.name) diff --git a/erpnext/patches/v11_0/reset_publish_in_hub_for_all_items.py b/erpnext/patches/v11_0/reset_publish_in_hub_for_all_items.py deleted file mode 100644 index a664baf6dd6..00000000000 --- a/erpnext/patches/v11_0/reset_publish_in_hub_for_all_items.py +++ /dev/null @@ -1,8 +0,0 @@ -from __future__ import unicode_literals - -import frappe - - -def execute(): - frappe.reload_doc('stock', 'doctype', 'item') - frappe.db.sql("""update `tabItem` set publish_in_hub = 0""") diff --git a/erpnext/patches/v11_0/update_hub_url.py b/erpnext/patches/v11_0/update_hub_url.py deleted file mode 100644 index c89b9b50607..00000000000 --- a/erpnext/patches/v11_0/update_hub_url.py +++ /dev/null @@ -1,8 +0,0 @@ -from __future__ import unicode_literals - -import frappe - - -def execute(): - frappe.reload_doc('hub_node', 'doctype', 'Marketplace Settings') - frappe.db.set_value('Marketplace Settings', 'Marketplace Settings', 'marketplace_url', 'https://hubmarket.org') diff --git a/erpnext/patches/v12_0/set_published_in_hub_tracked_item.py b/erpnext/patches/v12_0/set_published_in_hub_tracked_item.py deleted file mode 100644 index 73c6ce8220e..00000000000 --- a/erpnext/patches/v12_0/set_published_in_hub_tracked_item.py +++ /dev/null @@ -1,14 +0,0 @@ -from __future__ import unicode_literals - -import frappe - - -def execute(): - frappe.reload_doc("Hub Node", "doctype", "Hub Tracked Item") - if not frappe.db.a_row_exists("Hub Tracked Item"): - return - - frappe.db.sql(''' - Update `tabHub Tracked Item` - SET published = 1 - ''') diff --git a/erpnext/patches/v14_0/delete_hub_doctypes.py b/erpnext/patches/v14_0/delete_hub_doctypes.py new file mode 100644 index 00000000000..d1e9e31f0c2 --- /dev/null +++ b/erpnext/patches/v14_0/delete_hub_doctypes.py @@ -0,0 +1,10 @@ +import frappe + + +def execute(): + + doctypes = frappe.get_all("DocType", {"module": "Hub Node", "custom": 0}, pluck='name') + for doctype in doctypes: + frappe.delete_doc("DocType", doctype, ignore_missing=True) + + frappe.delete_doc("Module Def", "Hub Node", ignore_missing=True, force=True) diff --git a/erpnext/public/build.json b/erpnext/public/build.json index 6b70dab8037..f8e817770d5 100644 --- a/erpnext/public/build.json +++ b/erpnext/public/build.json @@ -1,14 +1,10 @@ { "css/erpnext.css": [ "public/less/erpnext.less", - "public/less/hub.less", "public/scss/call_popup.scss", "public/scss/point-of-sale.scss", "public/scss/hierarchy_chart.scss" ], - "css/marketplace.css": [ - "public/less/hub.less" - ], "js/erpnext-web.min.js": [ "public/js/website_utils.js", "public/js/shopping_cart.js" @@ -17,9 +13,6 @@ "public/scss/website.scss", "public/scss/shopping_cart.scss" ], - "js/marketplace.min.js": [ - "public/js/hub/marketplace.js" - ], "js/erpnext.min.js": [ "public/js/conf.js", "public/js/utils.js", @@ -41,7 +34,6 @@ "public/js/utils/supplier_quick_entry.js", "public/js/education/student_button.html", "public/js/education/assessment_result_tool.html", - "public/js/hub/hub_factory.js", "public/js/call_popup/call_popup.js", "public/js/utils/dimension_tree_filter.js", "public/js/telephony.js", diff --git a/erpnext/public/images/hub_logo.svg b/erpnext/public/images/hub_logo.svg deleted file mode 100644 index 4af482176ea..00000000000 --- a/erpnext/public/images/hub_logo.svg +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/erpnext/public/js/erpnext.bundle.js b/erpnext/public/js/erpnext.bundle.js index febdb24da34..5259bdcc765 100644 --- a/erpnext/public/js/erpnext.bundle.js +++ b/erpnext/public/js/erpnext.bundle.js @@ -18,7 +18,6 @@ import "./utils/customer_quick_entry"; import "./utils/supplier_quick_entry"; import "./education/student_button.html"; import "./education/assessment_result_tool.html"; -import "./hub/hub_factory"; import "./call_popup/call_popup"; import "./utils/dimension_tree_filter"; import "./telephony"; diff --git a/erpnext/public/js/hub/PageContainer.vue b/erpnext/public/js/hub/PageContainer.vue deleted file mode 100644 index 54c359766d3..00000000000 --- a/erpnext/public/js/hub/PageContainer.vue +++ /dev/null @@ -1,119 +0,0 @@ - - - diff --git a/erpnext/public/js/hub/Sidebar.vue b/erpnext/public/js/hub/Sidebar.vue deleted file mode 100644 index 66c291ec52f..00000000000 --- a/erpnext/public/js/hub/Sidebar.vue +++ /dev/null @@ -1,110 +0,0 @@ - - diff --git a/erpnext/public/js/hub/components/CommentInput.vue b/erpnext/public/js/hub/components/CommentInput.vue deleted file mode 100644 index 31562c7a284..00000000000 --- a/erpnext/public/js/hub/components/CommentInput.vue +++ /dev/null @@ -1,39 +0,0 @@ - - diff --git a/erpnext/public/js/hub/components/DetailHeaderItem.vue b/erpnext/public/js/hub/components/DetailHeaderItem.vue deleted file mode 100644 index a6c5f066f28..00000000000 --- a/erpnext/public/js/hub/components/DetailHeaderItem.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - diff --git a/erpnext/public/js/hub/components/DetailView.vue b/erpnext/public/js/hub/components/DetailView.vue deleted file mode 100644 index 942c1ebdb34..00000000000 --- a/erpnext/public/js/hub/components/DetailView.vue +++ /dev/null @@ -1,86 +0,0 @@ - - - - - diff --git a/erpnext/public/js/hub/components/EmptyState.vue b/erpnext/public/js/hub/components/EmptyState.vue deleted file mode 100644 index e3a33a08306..00000000000 --- a/erpnext/public/js/hub/components/EmptyState.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - - - diff --git a/erpnext/public/js/hub/components/Image.vue b/erpnext/public/js/hub/components/Image.vue deleted file mode 100644 index 9acf4210322..00000000000 --- a/erpnext/public/js/hub/components/Image.vue +++ /dev/null @@ -1,40 +0,0 @@ - - diff --git a/erpnext/public/js/hub/components/ItemCard.vue b/erpnext/public/js/hub/components/ItemCard.vue deleted file mode 100644 index 675ad86645b..00000000000 --- a/erpnext/public/js/hub/components/ItemCard.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - - diff --git a/erpnext/public/js/hub/components/ItemCardsContainer.vue b/erpnext/public/js/hub/components/ItemCardsContainer.vue deleted file mode 100644 index 0a20bcdc636..00000000000 --- a/erpnext/public/js/hub/components/ItemCardsContainer.vue +++ /dev/null @@ -1,62 +0,0 @@ - - - - - diff --git a/erpnext/public/js/hub/components/ItemListCard.vue b/erpnext/public/js/hub/components/ItemListCard.vue deleted file mode 100644 index 7f6fb77d76e..00000000000 --- a/erpnext/public/js/hub/components/ItemListCard.vue +++ /dev/null @@ -1,21 +0,0 @@ - - diff --git a/erpnext/public/js/hub/components/NotificationMessage.vue b/erpnext/public/js/hub/components/NotificationMessage.vue deleted file mode 100644 index c26672635c3..00000000000 --- a/erpnext/public/js/hub/components/NotificationMessage.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - - diff --git a/erpnext/public/js/hub/components/Rating.vue b/erpnext/public/js/hub/components/Rating.vue deleted file mode 100644 index 33290b8e202..00000000000 --- a/erpnext/public/js/hub/components/Rating.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - diff --git a/erpnext/public/js/hub/components/ReviewArea.vue b/erpnext/public/js/hub/components/ReviewArea.vue deleted file mode 100644 index aa83bb0e465..00000000000 --- a/erpnext/public/js/hub/components/ReviewArea.vue +++ /dev/null @@ -1,140 +0,0 @@ - - diff --git a/erpnext/public/js/hub/components/ReviewTimelineItem.vue b/erpnext/public/js/hub/components/ReviewTimelineItem.vue deleted file mode 100644 index d0e83f3b1cd..00000000000 --- a/erpnext/public/js/hub/components/ReviewTimelineItem.vue +++ /dev/null @@ -1,53 +0,0 @@ - - - diff --git a/erpnext/public/js/hub/components/SearchInput.vue b/erpnext/public/js/hub/components/SearchInput.vue deleted file mode 100644 index 4b1ce6e4ef9..00000000000 --- a/erpnext/public/js/hub/components/SearchInput.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - diff --git a/erpnext/public/js/hub/components/SectionHeader.vue b/erpnext/public/js/hub/components/SectionHeader.vue deleted file mode 100644 index 05a2f838a0a..00000000000 --- a/erpnext/public/js/hub/components/SectionHeader.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/erpnext/public/js/hub/components/TimelineItem.vue b/erpnext/public/js/hub/components/TimelineItem.vue deleted file mode 100644 index d13c842beb8..00000000000 --- a/erpnext/public/js/hub/components/TimelineItem.vue +++ /dev/null @@ -1,9 +0,0 @@ -/* Saving this for later */ - diff --git a/erpnext/public/js/hub/components/edit_details_dialog.js b/erpnext/public/js/hub/components/edit_details_dialog.js deleted file mode 100644 index 97c5f83a13a..00000000000 --- a/erpnext/public/js/hub/components/edit_details_dialog.js +++ /dev/null @@ -1,41 +0,0 @@ -function edit_details_dialog(params) { - let dialog = new frappe.ui.Dialog({ - title: __('Update Details'), - fields: [ - { - label: 'Item Name', - fieldname: 'item_name', - fieldtype: 'Data', - default: params.defaults.item_name, - reqd: 1 - }, - { - label: 'Hub Category', - fieldname: 'hub_category', - fieldtype: 'Autocomplete', - default: params.defaults.hub_category, - options: [], - reqd: 1 - }, - { - label: 'Description', - fieldname: 'description', - fieldtype: 'Text', - default: params.defaults.description, - options: [], - reqd: 1 - } - ], - primary_action_label: params.primary_action.label || __('Update Details'), - primary_action: params.primary_action.fn - }); - - hub.call('get_categories').then(categories => { - categories = categories.map(d => d.name); - dialog.fields_dict.hub_category.set_data(categories); - }); - - return dialog; -} - -export { edit_details_dialog }; diff --git a/erpnext/public/js/hub/components/item_publish_dialog.js b/erpnext/public/js/hub/components/item_publish_dialog.js deleted file mode 100644 index 08de5b30b6c..00000000000 --- a/erpnext/public/js/hub/components/item_publish_dialog.js +++ /dev/null @@ -1,39 +0,0 @@ -function ItemPublishDialog(primary_action, secondary_action) { - let dialog = new frappe.ui.Dialog({ - title: __('Edit Publishing Details'), - fields: [ - { - label: __('Item Code'), - fieldname: 'item_code', - fieldtype: 'Data', - read_only: 1 - }, - { - label: __('Hub Category'), - fieldname: 'hub_category', - fieldtype: 'Autocomplete', - options: [], - reqd: 1 - }, - { - label: __('Images'), - fieldname: 'image_list', - fieldtype: 'MultiSelect', - options: [], - reqd: 1 - } - ], - primary_action_label: primary_action.label || __('Set Details'), - primary_action: primary_action.fn, - secondary_action: secondary_action.fn - }); - - hub.call('get_categories').then(categories => { - categories = categories.map(d => d.name); - dialog.fields_dict.hub_category.set_data(categories); - }); - - return dialog; -} - -export { ItemPublishDialog }; diff --git a/erpnext/public/js/hub/components/profile_dialog.js b/erpnext/public/js/hub/components/profile_dialog.js deleted file mode 100644 index 8e3abc37eb8..00000000000 --- a/erpnext/public/js/hub/components/profile_dialog.js +++ /dev/null @@ -1,56 +0,0 @@ -const ProfileDialog = (title = __('Edit Profile'), action={}) => { - const fields = [ - { - fieldtype: 'Link', - fieldname: 'company', - label: __('Company'), - options: 'Company' - }, - { - fieldtype: 'Read Only', - fieldname: 'email', - label: __('Email') - }, - { - label: __('About your company'), - fieldname: 'company_description', - fieldtype: 'Text' - } - ]; - - let dialog = new frappe.ui.Dialog({ - title: title, - fields: fields, - primary_action_label: action.label || __('Update'), - primary_action: () => { - const form_values = dialog.get_values(); - let values_filled = true; - - // TODO: Say "we notice that the company description and logo isn't set. Please set them in master." - // Only then allow to register - - const mandatory_fields = ['company', 'company_description']; - mandatory_fields.forEach(field => { - const value = form_values[field]; - if (!value) { - dialog.set_df_property(field, 'reqd', 1); - values_filled = false; - } - }); - if (!values_filled) return; - - action.on_submit(form_values); - } - }); - - // Post create - const default_company = frappe.defaults.get_default('company'); - dialog.set_value('company', default_company); - dialog.set_value('email', frappe.session.user); - - return dialog; -} - -export { - ProfileDialog -} diff --git a/erpnext/public/js/hub/components/reviews.js b/erpnext/public/js/hub/components/reviews.js deleted file mode 100644 index e34d68038f7..00000000000 --- a/erpnext/public/js/hub/components/reviews.js +++ /dev/null @@ -1,80 +0,0 @@ -function get_review_html(review) { - let username = review.username || review.user || __("Anonymous"); - - let image_html = review.user_image - ? `
` - : `
${frappe.get_abbr(username)}
` - - let edit_html = review.own - ? ` -
- - ${'data.edit'} - -
` - : ''; - - let rating_html = get_rating_html(review.rating); - - return get_timeline_item(review, image_html, edit_html, rating_html); -} - -function get_timeline_item(data, image_html, edit_html, rating_html) { - return `
- -
-
-
${edit_html}
- -
- - ${image_html} - - -
- - - ${data.username} - - - - - -
-
-
-
-

- ${rating_html} -

-
${data.subject}
-

- ${data.content} -

-
-
-
-
-
`; -} - -function get_rating_html(rating) { - let rating_html = ``; - for (var i = 0; i < 5; i++) { - let star_class = 'fa-star'; - if (i >= rating) star_class = 'fa-star-o'; - rating_html += ``; - } - return rating_html; -} - -export { - get_review_html, - get_rating_html -} diff --git a/erpnext/public/js/hub/hub_call.js b/erpnext/public/js/hub/hub_call.js deleted file mode 100644 index 5545a4935b3..00000000000 --- a/erpnext/public/js/hub/hub_call.js +++ /dev/null @@ -1,68 +0,0 @@ -frappe.provide('hub'); -frappe.provide('erpnext.hub'); - -erpnext.hub.cache = {}; -hub.call = function call_hub_method(method, args={}, clear_cache_on_event) { // eslint-disable-line - return new Promise((resolve, reject) => { - - // cache - const key = method + JSON.stringify(args); - if (erpnext.hub.cache[key]) { - resolve(erpnext.hub.cache[key]); - } - - // cache invalidation - const clear_cache = () => delete erpnext.hub.cache[key]; - - if (!clear_cache_on_event) { - invalidate_after_5_mins(clear_cache); - } else { - erpnext.hub.on(clear_cache_on_event, () => { - clear_cache(key); - }); - } - - let res; - if (hub.is_server) { - res = frappe.call({ - method: 'hub.hub.api.' + method, - args - }); - } else { - res = frappe.call({ - method: 'erpnext.hub_node.api.call_hub_method', - args: { - method, - params: args - } - }); - } - - res.then(r => { - if (r.message) { - const response = r.message; - if (response.error) { - frappe.throw({ - title: __('Marketplace Error'), - message: response.error - }); - } - - erpnext.hub.cache[key] = response; - erpnext.hub.trigger(`response:${key}`, { response }); - resolve(response); - } - reject(r); - - }).fail(reject); - }); -}; - -function invalidate_after_5_mins(clear_cache) { - // cache invalidation after 5 minutes - const timeout = 5 * 60 * 1000; - - setTimeout(() => { - clear_cache(); - }, timeout); -} diff --git a/erpnext/public/js/hub/hub_factory.js b/erpnext/public/js/hub/hub_factory.js deleted file mode 100644 index 9c67c1cf9f0..00000000000 --- a/erpnext/public/js/hub/hub_factory.js +++ /dev/null @@ -1,34 +0,0 @@ -frappe.provide('erpnext.hub'); - -frappe.views.MarketplaceFactory = class MarketplaceFactory extends frappe.views.Factory { - show() { - is_marketplace_disabled() - .then(disabled => { - if (disabled) { - frappe.show_not_found('Marketplace'); - return; - } - - if (frappe.pages.marketplace) { - frappe.container.change_to('marketplace'); - erpnext.hub.marketplace.refresh(); - } else { - this.make('marketplace'); - } - }); - } - - make(page_name) { - frappe.require('marketplace.bundle.js', () => { - erpnext.hub.marketplace = new erpnext.hub.Marketplace({ - parent: this.make_page(true, page_name) - }); - }); - } -}; - -function is_marketplace_disabled() { - return frappe.call({ - method: "erpnext.hub_node.doctype.marketplace_settings.marketplace_settings.is_marketplace_enabled" - }).then(r => r.message) -} diff --git a/erpnext/public/js/hub/marketplace.bundle.js b/erpnext/public/js/hub/marketplace.bundle.js deleted file mode 100644 index a1596e0043b..00000000000 --- a/erpnext/public/js/hub/marketplace.bundle.js +++ /dev/null @@ -1,225 +0,0 @@ -import Vue from 'vue/dist/vue.js'; -import './vue-plugins'; - -// components -import PageContainer from './PageContainer.vue'; -import Sidebar from './Sidebar.vue'; -import { ProfileDialog } from './components/profile_dialog'; - -// helpers -import './hub_call'; - -frappe.provide('hub'); -frappe.provide('erpnext.hub'); -frappe.provide('frappe.route'); - -frappe.utils.make_event_emitter(frappe.route); -frappe.utils.make_event_emitter(erpnext.hub); - -erpnext.hub.Marketplace = class Marketplace { - constructor({ parent }) { - this.$parent = $(parent); - this.page = parent.page; - - this.update_hub_settings().then(() => { - - this.setup_header(); - this.make_sidebar(); - this.make_body(); - this.setup_events(); - this.refresh(); - - if (!hub.is_server) { - if (!hub.is_seller_registered()) { - this.page.set_primary_action('Become a Seller', this.show_register_dialog.bind(this)) - } else { - this.page.set_secondary_action('Add Users', this.show_add_user_dialog.bind(this)); - } - } - }); - } - - setup_header() { - if (hub.is_server) return; - this.page.set_title(__('Marketplace')); - } - - setup_events() { - this.$parent.on('click', '[data-route]', (e) => { - const $target = $(e.currentTarget); - const route = $target.data().route; - frappe.set_route(route); - }); - - // generic action handler - this.$parent.on('click', '[data-action]', e => { - const $target = $(e.currentTarget); - const action = $target.data().action; - - if (action && this[action]) { - this[action].apply(this, $target); - } - }) - } - - make_sidebar() { - this.$sidebar = this.$parent.find('.layout-side-section').addClass('hidden-xs'); - - new Vue({ - el: $('
').appendTo(this.$sidebar)[0], - render: h => h(Sidebar) - }); - } - - make_body() { - this.$body = this.$parent.find('.layout-main-section'); - this.$page_container = $('
').appendTo(this.$body); - - new Vue({ - el: '.hub-page-container', - render: h => h(PageContainer) - }); - - if (!hub.is_server) { - erpnext.hub.on('seller-registered', () => { - this.page.clear_primary_action(); - }); - } - } - - refresh() { - - } - - show_register_dialog() { - if(frappe.session.user === 'Administrator') { - frappe.msgprint(__('You need to be a user other than Administrator with System Manager and Item Manager roles to register on Marketplace.')); - return; - } - - if (!is_subset(['System Manager', 'Item Manager'], frappe.user_roles)) { - frappe.msgprint(__('You need to be a user with System Manager and Item Manager roles to register on Marketplace.')); - return; - } - - this.register_dialog = ProfileDialog( - __('Become a Seller'), - { - label: __('Register'), - on_submit: this.register_marketplace.bind(this) - } - ); - - this.register_dialog.show(); - } - - register_marketplace({company, company_description}) { - frappe.call({ - method: 'erpnext.hub_node.api.register_marketplace', - args: { - company, - company_description - } - }).then((r) => { - if (r.message && r.message.ok) { - this.register_dialog.hide(); - - this.update_hub_settings() - .then(() => { - frappe.set_route('marketplace', 'publish'); - erpnext.hub.trigger('seller-registered'); - }); - } - }); - } - - show_add_user_dialog() { - if (!is_subset(['System Manager', 'Item Manager'], frappe.user_roles)) { - frappe.msgprint(__('You need to be a user with System Manager and Item Manager roles to add users to Marketplace.')); - return; - } - - this.get_unregistered_users() - .then(r => { - const user_list = r.message; - - const d = new frappe.ui.Dialog({ - title: __('Add Users to Marketplace'), - fields: [ - { - label: __('Users'), - fieldname: 'users', - fieldtype: 'MultiSelect', - reqd: 1, - get_data() { - return user_list; - } - } - ], - primary_action({ users }) { - const selected_users = users.split(',').map(d => d.trim()).filter(Boolean); - - if (!selected_users.every(user => user_list.includes(user))) { - d.set_df_property('users', 'description', __('Some emails are invalid')); - return; - } else { - d.set_df_property('users', 'description', ''); - } - - frappe.call('erpnext.hub_node.api.register_users', { - user_list: selected_users - }) - .then(r => { - d.hide(); - - if (r.message && r.message.length) { - frappe.show_alert(__('Added {0} users', [r.message.length])); - } - }); - } - }); - - d.show(); - }); - } - - get_unregistered_users() { - return frappe.call('erpnext.hub_node.api.get_unregistered_users') - } - - update_hub_settings() { - return hub.get_settings().then(doc => { - hub.settings = doc; - }); - } -} - -Object.assign(hub, { - is_seller_registered() { - return hub.settings.registered; - }, - - is_user_registered() { - return this.is_seller_registered() && hub.settings.users - .filter(hub_user => hub_user.user === frappe.session.user) - .length === 1; - }, - - get_settings() { - if (frappe.session.user === 'Guest') { - return Promise.resolve({ - registered: 0 - }); - } - return frappe.db.get_doc('Marketplace Settings'); - } -}); - -/** - * Returns true if list_a is subset of list_b - * @param {Array} list_a - * @param {Array} list_b - */ -function is_subset(list_a, list_b) { - return list_a.every(item => list_b.includes(item)); -} diff --git a/erpnext/public/js/hub/pages/Buying.vue b/erpnext/public/js/hub/pages/Buying.vue deleted file mode 100644 index ebf593aca4d..00000000000 --- a/erpnext/public/js/hub/pages/Buying.vue +++ /dev/null @@ -1,56 +0,0 @@ - - diff --git a/erpnext/public/js/hub/pages/Category.vue b/erpnext/public/js/hub/pages/Category.vue deleted file mode 100644 index 16d06018ff0..00000000000 --- a/erpnext/public/js/hub/pages/Category.vue +++ /dev/null @@ -1,76 +0,0 @@ - - - - - diff --git a/erpnext/public/js/hub/pages/FeaturedItems.vue b/erpnext/public/js/hub/pages/FeaturedItems.vue deleted file mode 100644 index 8380b2b2c0b..00000000000 --- a/erpnext/public/js/hub/pages/FeaturedItems.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - diff --git a/erpnext/public/js/hub/pages/Home.vue b/erpnext/public/js/hub/pages/Home.vue deleted file mode 100644 index 8fe824566db..00000000000 --- a/erpnext/public/js/hub/pages/Home.vue +++ /dev/null @@ -1,114 +0,0 @@ - - - - - diff --git a/erpnext/public/js/hub/pages/Item.vue b/erpnext/public/js/hub/pages/Item.vue deleted file mode 100644 index 93002a7b27a..00000000000 --- a/erpnext/public/js/hub/pages/Item.vue +++ /dev/null @@ -1,356 +0,0 @@ - - - - - diff --git a/erpnext/public/js/hub/pages/Messages.vue b/erpnext/public/js/hub/pages/Messages.vue deleted file mode 100644 index 73506e99266..00000000000 --- a/erpnext/public/js/hub/pages/Messages.vue +++ /dev/null @@ -1,104 +0,0 @@ - - diff --git a/erpnext/public/js/hub/pages/NotFound.vue b/erpnext/public/js/hub/pages/NotFound.vue deleted file mode 100644 index 8901b97802d..00000000000 --- a/erpnext/public/js/hub/pages/NotFound.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - - - diff --git a/erpnext/public/js/hub/pages/Publish.vue b/erpnext/public/js/hub/pages/Publish.vue deleted file mode 100644 index ecba4b1e5a8..00000000000 --- a/erpnext/public/js/hub/pages/Publish.vue +++ /dev/null @@ -1,212 +0,0 @@ - - - - - diff --git a/erpnext/public/js/hub/pages/PublishedItems.vue b/erpnext/public/js/hub/pages/PublishedItems.vue deleted file mode 100644 index cbb22164e6e..00000000000 --- a/erpnext/public/js/hub/pages/PublishedItems.vue +++ /dev/null @@ -1,74 +0,0 @@ - - - - - diff --git a/erpnext/public/js/hub/pages/SavedItems.vue b/erpnext/public/js/hub/pages/SavedItems.vue deleted file mode 100644 index 7007ddcf8e7..00000000000 --- a/erpnext/public/js/hub/pages/SavedItems.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - diff --git a/erpnext/public/js/hub/pages/Search.vue b/erpnext/public/js/hub/pages/Search.vue deleted file mode 100644 index c10841e9848..00000000000 --- a/erpnext/public/js/hub/pages/Search.vue +++ /dev/null @@ -1,81 +0,0 @@ - - - - - diff --git a/erpnext/public/js/hub/pages/Seller.vue b/erpnext/public/js/hub/pages/Seller.vue deleted file mode 100644 index 3c9b800f4a0..00000000000 --- a/erpnext/public/js/hub/pages/Seller.vue +++ /dev/null @@ -1,201 +0,0 @@ - - - - - diff --git a/erpnext/public/js/hub/pages/SellerItems.vue b/erpnext/public/js/hub/pages/SellerItems.vue deleted file mode 100644 index 852fbaee3ff..00000000000 --- a/erpnext/public/js/hub/pages/SellerItems.vue +++ /dev/null @@ -1,57 +0,0 @@ - - - - - diff --git a/erpnext/public/js/hub/pages/Selling.vue b/erpnext/public/js/hub/pages/Selling.vue deleted file mode 100644 index 8743027885d..00000000000 --- a/erpnext/public/js/hub/pages/Selling.vue +++ /dev/null @@ -1,66 +0,0 @@ - - diff --git a/erpnext/public/js/hub/vue-plugins.js b/erpnext/public/js/hub/vue-plugins.js deleted file mode 100644 index 4912d684991..00000000000 --- a/erpnext/public/js/hub/vue-plugins.js +++ /dev/null @@ -1,58 +0,0 @@ -import Vue from 'vue/dist/vue.js'; - -// Global components -import ItemCardsContainer from './components/ItemCardsContainer.vue'; -import SectionHeader from './components/SectionHeader.vue'; -import SearchInput from './components/SearchInput.vue'; -import DetailView from './components/DetailView.vue'; -import DetailHeaderItem from './components/DetailHeaderItem.vue'; -import EmptyState from './components/EmptyState.vue'; -import Image from './components/Image.vue'; - -Vue.prototype.__ = window.__; -Vue.prototype.frappe = window.frappe; - -Vue.component('item-cards-container', ItemCardsContainer); -Vue.component('section-header', SectionHeader); -Vue.component('search-input', SearchInput); -Vue.component('detail-view', DetailView); -Vue.component('detail-header-item', DetailHeaderItem); -Vue.component('empty-state', EmptyState); -Vue.component('base-image', Image); - -Vue.directive('route', { - bind(el, binding) { - const route = binding.value; - if (!route) return; - el.classList.add('cursor-pointer'); - el.dataset.route = route; - el.addEventListener('click', () => frappe.set_route(route)); - }, - unbind(el) { - el.classList.remove('cursor-pointer'); - } -}); - -const handleImage = (el, src) => { - let img = new Image(); - // add loading class - el.src = ''; - el.classList.add('img-loading'); - - img.onload = () => { - // image loaded, remove loading class - el.classList.remove('img-loading'); - // set src - el.src = src; - } - img.onerror = () => { - el.classList.remove('img-loading'); - el.classList.add('no-image'); - el.src = null; - } - img.src = src; -} - -Vue.filter('striphtml', function (text) { - return strip_html(text || ''); -}); diff --git a/erpnext/setup/setup_wizard/operations/install_fixtures.py b/erpnext/setup/setup_wizard/operations/install_fixtures.py index c473395a9aa..d61d94c3c69 100644 --- a/erpnext/setup/setup_wizard/operations/install_fixtures.py +++ b/erpnext/setup/setup_wizard/operations/install_fixtures.py @@ -202,7 +202,6 @@ def install(country=None): {'doctype': "Party Type", "party_type": "Student", "account_type": "Receivable"}, {'doctype': "Party Type", "party_type": "Donor", "account_type": "Receivable"}, - {'doctype': "Opportunity Type", "name": "Hub"}, {'doctype': "Opportunity Type", "name": _("Sales")}, {'doctype': "Opportunity Type", "name": _("Support")}, {'doctype': "Opportunity Type", "name": _("Maintenance")}, diff --git a/erpnext/stock/doctype/item/item.json b/erpnext/stock/doctype/item/item.json index db5caf91645..4b314a00a42 100644 --- a/erpnext/stock/doctype/item/item.json +++ b/erpnext/stock/doctype/item/item.json @@ -17,7 +17,6 @@ "variant_of", "item_name", "item_group", - "is_item_from_hub", "stock_uom", "column_break0", "disabled", @@ -134,12 +133,7 @@ "website_specifications", "web_long_description", "website_content", - "total_projected_qty", - "hub_publishing_sb", - "publish_in_hub", - "hub_category_to_publish", - "hub_warehouse", - "synced_with_hub" + "total_projected_qty" ], "fields": [ { @@ -202,14 +196,6 @@ "reqd": 1, "search_index": 1 }, - { - "default": "0", - "depends_on": "eval:!doc.is_fixed_asset", - "fieldname": "is_item_from_hub", - "fieldtype": "Check", - "label": "Is Item from Hub", - "read_only": 1 - }, { "fieldname": "stock_uom", "fieldtype": "Link", @@ -996,41 +982,6 @@ "print_hide": 1, "read_only": 1 }, - { - "collapsible": 1, - "depends_on": "eval:(!doc.is_item_from_hub && !doc.is_fixed_asset)", - "fieldname": "hub_publishing_sb", - "fieldtype": "Section Break", - "label": "Hub Publishing Details" - }, - { - "default": "0", - "description": "Publish Item to hub.erpnext.com", - "fieldname": "publish_in_hub", - "fieldtype": "Check", - "label": "Publish in Hub" - }, - { - "fieldname": "hub_category_to_publish", - "fieldtype": "Data", - "label": "Hub Category to Publish", - "read_only": 1 - }, - { - "description": "Publish \"In Stock\" or \"Not in Stock\" on Hub based on stock available in this warehouse.", - "fieldname": "hub_warehouse", - "fieldtype": "Link", - "ignore_user_permissions": 1, - "label": "Hub Warehouse", - "options": "Warehouse" - }, - { - "default": "0", - "fieldname": "synced_with_hub", - "fieldtype": "Check", - "label": "Synced With Hub", - "read_only": 1 - }, { "depends_on": "eval:!doc.__islocal && !doc.is_fixed_asset", "fieldname": "over_delivery_receipt_allowance", @@ -1078,10 +1029,11 @@ "index_web_pages_for_search": 1, "links": [], "max_attachments": 1, - "modified": "2021-08-26 12:23:07.277077", + "modified": "2021-10-27 21:04:00.324786", "modified_by": "Administrator", "module": "Stock", "name": "Item", + "naming_rule": "By fieldname", "owner": "Administrator", "permissions": [ { diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 8cc9f74a42a..04e4653d93c 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -123,7 +123,6 @@ class Item(WebsiteGenerator): self.validate_barcode() self.validate_warehouse_for_reorder() self.update_bom_item_desc() - self.synced_with_hub = 0 self.validate_has_variants() self.validate_attributes_in_variants() From 09a5616e2dce7d0d9962326781cd7c0a4bcaebbc Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 28 Oct 2021 19:01:24 +0530 Subject: [PATCH 095/200] fix: Rewrite patch using query builder --- .../update_category_in_ltds_certificate.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/erpnext/patches/v13_0/update_category_in_ltds_certificate.py b/erpnext/patches/v13_0/update_category_in_ltds_certificate.py index f8a0646fcbb..4d4645269cb 100644 --- a/erpnext/patches/v13_0/update_category_in_ltds_certificate.py +++ b/erpnext/patches/v13_0/update_category_in_ltds_certificate.py @@ -2,9 +2,17 @@ import frappe def execute(): + company = frappe.get_all('Company', filters = {'country': 'India'}) + if not company: + return - frappe.db.sql(""" - UPDATE `tabLower Deduction Certificate` l, `tabSupplier` s - SET l.tax_withholding_category = s.tax_withholding_category - WHERE l.supplier = s.name - """) \ No newline at end of file + ldc = frappe.qb.DocType("Lower Deduction Certificate").as_("ldc") + supplier = frappe.qb.DocType("Supplier") + + frappe.qb.update(ldc).inner_join(supplier).on( + ldc.supplier == supplier.name + ).set( + ldc.tax_withholding_category, supplier.tax_withholding_category + ).where( + ldc.tax_withholding_category.isnull() + ).run() \ No newline at end of file From 8844fdbf230ef167c0051935a8f922c5c6bb13de Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 28 Oct 2021 19:25:55 +0530 Subject: [PATCH 096/200] fix: Remove print statements --- erpnext/controllers/accounts_controller.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index bfbbf4d140b..9267eb5b8e6 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -820,14 +820,10 @@ class AccountsController(TransactionBase): self.unlink_ref_doc_from_po() def unlink_ref_doc_from_po(self): - print("\n"*5, "*"*50, "\n"*5) - so_items = [] for item in self.items: so_items.append(item.name) - print("SO Items: ", so_items) - linked_po = frappe.get_all( 'Purchase Order Item', filters = { @@ -838,8 +834,6 @@ class AccountsController(TransactionBase): pluck='parent' ) - print("Before unlinking: ", linked_po) - if linked_po: frappe.db.set_value( 'Purchase Order Item', { @@ -854,19 +848,6 @@ class AccountsController(TransactionBase): frappe.msgprint(_("Purchase Orders {0} are un-linked").format("\n".join(linked_po))) - linked_po = frappe.get_all( - 'Purchase Order Item', - filters = { - 'sales_order': self.name, - 'sales_order_item': ['in', so_items], - 'docstatus': ['<', 2] - }, - pluck='parent' - ) - print("After unlinking: ", linked_po) - - print("\n"*5, "*"*50, "\n"*5) - def get_tax_map(self): tax_map = {} for tax in self.get('taxes'): From 1a9d2684e2c8e9f89ea82dbade5cbe9b72f9e364 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 28 Oct 2021 19:27:45 +0530 Subject: [PATCH 097/200] fix: Remove debugger --- erpnext/selling/doctype/sales_order/sales_order.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index c9490fcae44..dcf478bda6e 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -207,12 +207,6 @@ class SalesOrder(SellingController): from erpnext.accounts.doctype.pricing_rule.utils import update_coupon_code_count update_coupon_code_count(self.coupon_code,'cancelled') - def cancel(self): - import pdb - - pdb.set_trace() - super(SalesOrder, self).cancel() - def update_project(self): if frappe.db.get_single_value('Selling Settings', 'sales_update_frequency') != "Each Transaction": return From d24cfff3886b8502c8f98cb4421c5e37a46ec3f2 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Thu, 28 Oct 2021 20:06:48 +0530 Subject: [PATCH 098/200] fix: Remove unused imports --- erpnext/controllers/accounts_controller.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 9267eb5b8e6..14ad4228c42 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -19,8 +19,7 @@ from frappe.utils import ( get_link_to_form, getdate, nowdate, - now, - today + today, ) from six import text_type From 051aaa708d7ab8a0019e19c9c8b8371afa03abc6 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 29 Oct 2021 11:35:34 +0530 Subject: [PATCH 099/200] fix: Ignore PO on So cancel --- erpnext/controllers/accounts_controller.py | 4 ++-- erpnext/selling/doctype/sales_order/sales_order.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 14ad4228c42..37b8f9d6d30 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -823,7 +823,7 @@ class AccountsController(TransactionBase): for item in self.items: so_items.append(item.name) - linked_po = frappe.get_all( + linked_po = list(set(frappe.get_all( 'Purchase Order Item', filters = { 'sales_order': self.name, @@ -831,7 +831,7 @@ class AccountsController(TransactionBase): 'docstatus': ['<', 2] }, pluck='parent' - ) + ))) if linked_po: frappe.db.set_value( diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index f6926906b82..d46c46f90e6 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -78,6 +78,8 @@ frappe.ui.form.on("Sales Order", { }); erpnext.queries.setup_warehouse_query(frm); + + frm.ignore_doctypes_on_cancel_all = ['Purchase Order']; }, delivery_date: function(frm) { From aa9e78bed19b72584a5248afd83ca82011727e13 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 29 Oct 2021 12:45:19 +0530 Subject: [PATCH 100/200] fix: Accounting Dimension filters not honouring user permissions --- erpnext/controllers/queries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index eeb659dee58..05ece4defee 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -566,7 +566,7 @@ def get_filtered_dimensions(doctype, txt, searchfield, start, page_len, filters) query_filters.append(['name', query_selector, dimensions]) - output = frappe.get_all(doctype, filters=query_filters) + output = frappe.get_list(doctype, filters=query_filters) result = [d.name for d in output] return [(d,) for d in set(result)] From afe09d4e80c3000ce866f0b43ecced878f715273 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 29 Oct 2021 13:45:07 +0530 Subject: [PATCH 101/200] test: remove unnecessary creation of new company (#28137) --- erpnext/tests/test_woocommerce.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/erpnext/tests/test_woocommerce.py b/erpnext/tests/test_woocommerce.py index 881f286baeb..3ce68d89bcd 100644 --- a/erpnext/tests/test_woocommerce.py +++ b/erpnext/tests/test_woocommerce.py @@ -12,12 +12,6 @@ from erpnext.erpnext_integrations.connectors.woocommerce_connection import order class TestWoocommerce(unittest.TestCase): def setUp(self): - if not frappe.db.exists('Company', 'Woocommerce'): - company = frappe.new_doc("Company") - company.company_name = "Woocommerce" - company.abbr = "W" - company.default_currency = "INR" - company.save() woo_settings = frappe.get_doc("Woocommerce Settings") if not woo_settings.secret: @@ -26,14 +20,14 @@ class TestWoocommerce(unittest.TestCase): woo_settings.api_consumer_key = "ck_fd43ff5756a6abafd95fadb6677100ce95a758a1" woo_settings.api_consumer_secret = "cs_94360a1ad7bef7fa420a40cf284f7b3e0788454e" woo_settings.enable_sync = 1 - woo_settings.company = "Woocommerce" - woo_settings.tax_account = "Sales Expenses - W" - woo_settings.f_n_f_account = "Expenses - W" + woo_settings.company = "_Test Company" + woo_settings.tax_account = "Sales Expenses - _TC" + woo_settings.f_n_f_account = "Expenses - _TC" woo_settings.creation_user = "Administrator" woo_settings.save(ignore_permissions=True) def test_sales_order_for_woocommerce(self): - frappe.flags.woocomm_test_order_data = {"id":75,"parent_id":0,"number":"74","order_key":"wc_order_5aa1281c2dacb","created_via":"checkout","version":"3.3.3","status":"processing","currency":"INR","date_created":"2018-03-08T12:10:04","date_created_gmt":"2018-03-08T12:10:04","date_modified":"2018-03-08T12:10:04","date_modified_gmt":"2018-03-08T12:10:04","discount_total":"0.00","discount_tax":"0.00","shipping_total":"150.00","shipping_tax":"0.00","cart_tax":"0.00","total":"649.00","total_tax":"0.00","prices_include_tax":False,"customer_id":12,"customer_ip_address":"103.54.99.5","customer_user_agent":"mozilla\\/5.0 (x11; linux x86_64) applewebkit\\/537.36 (khtml, like gecko) chrome\\/64.0.3282.186 safari\\/537.36","customer_note":"","billing":{"first_name":"Tony","last_name":"Stark","company":"Woocommerce","address_1":"Mumbai","address_2":"","city":"Dadar","state":"MH","postcode":"123","country":"IN","email":"tony@gmail.com","phone":"123457890"},"shipping":{"first_name":"Tony","last_name":"Stark","company":"","address_1":"Mumbai","address_2":"","city":"Dadar","state":"MH","postcode":"123","country":"IN"},"payment_method":"cod","payment_method_title":"Cash on delivery","transaction_id":"","date_paid":"","date_paid_gmt":"","date_completed":"","date_completed_gmt":"","cart_hash":"8e76b020d5790066496f244860c4703f","meta_data":[],"line_items":[{"id":80,"name":"Marvel","product_id":56,"variation_id":0,"quantity":1,"tax_class":"","subtotal":"499.00","subtotal_tax":"0.00","total":"499.00","total_tax":"0.00","taxes":[],"meta_data":[],"sku":"","price":499}],"tax_lines":[],"shipping_lines":[{"id":81,"method_title":"Flat rate","method_id":"flat_rate:1","total":"150.00","total_tax":"0.00","taxes":[],"meta_data":[{"id":623,"key":"Items","value":"Marvel × 1"}]}],"fee_lines":[],"coupon_lines":[],"refunds":[]} + frappe.flags.woocomm_test_order_data = {"id":75,"parent_id":0,"number":"74","order_key":"wc_order_5aa1281c2dacb","created_via":"checkout","version":"3.3.3","status":"processing","currency":"INR","date_created":"2018-03-08T12:10:04","date_created_gmt":"2018-03-08T12:10:04","date_modified":"2018-03-08T12:10:04","date_modified_gmt":"2018-03-08T12:10:04","discount_total":"0.00","discount_tax":"0.00","shipping_total":"150.00","shipping_tax":"0.00","cart_tax":"0.00","total":"649.00","total_tax":"0.00","prices_include_tax":False,"customer_id":12,"customer_ip_address":"103.54.99.5","customer_user_agent":"mozilla\\/5.0 (x11; linux x86_64) applewebkit\\/537.36 (khtml, like gecko) chrome\\/64.0.3282.186 safari\\/537.36","customer_note":"","billing":{"first_name":"Tony","last_name":"Stark","company":"_Test Company","address_1":"Mumbai","address_2":"","city":"Dadar","state":"MH","postcode":"123","country":"IN","email":"tony@gmail.com","phone":"123457890"},"shipping":{"first_name":"Tony","last_name":"Stark","company":"","address_1":"Mumbai","address_2":"","city":"Dadar","state":"MH","postcode":"123","country":"IN"},"payment_method":"cod","payment_method_title":"Cash on delivery","transaction_id":"","date_paid":"","date_paid_gmt":"","date_completed":"","date_completed_gmt":"","cart_hash":"8e76b020d5790066496f244860c4703f","meta_data":[],"line_items":[{"id":80,"name":"Marvel","product_id":56,"variation_id":0,"quantity":1,"tax_class":"","subtotal":"499.00","subtotal_tax":"0.00","total":"499.00","total_tax":"0.00","taxes":[],"meta_data":[],"sku":"","price":499}],"tax_lines":[],"shipping_lines":[{"id":81,"method_title":"Flat rate","method_id":"flat_rate:1","total":"150.00","total_tax":"0.00","taxes":[],"meta_data":[{"id":623,"key":"Items","value":"Marvel × 1"}]}],"fee_lines":[],"coupon_lines":[],"refunds":[]} order() self.assertTrue(frappe.get_value("Customer",{"woocommerce_email":"tony@gmail.com"})) From 292419bc9ebc405ef8a4861125070abb0d321db1 Mon Sep 17 00:00:00 2001 From: Marica Date: Fri, 29 Oct 2021 13:49:27 +0530 Subject: [PATCH 102/200] fix: Skip empty rows while updating unsaved BOM cost (#28136) - Dont try to get valuation rate if row has no item code - Dont try to add exploded items if row has no item code --- erpnext/manufacturing/doctype/bom/bom.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 232e3a0b0ff..2cd8f8c15af 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -307,6 +307,9 @@ class BOM(WebsiteGenerator): existing_bom_cost = self.total_cost for d in self.get("items"): + if not d.item_code: + continue + rate = self.get_rm_rate({ "company": self.company, "item_code": d.item_code, @@ -599,7 +602,7 @@ class BOM(WebsiteGenerator): for d in self.get('items'): if d.bom_no: self.get_child_exploded_items(d.bom_no, d.stock_qty) - else: + elif d.item_code: self.add_to_cur_exploded_items(frappe._dict({ 'item_code' : d.item_code, 'item_name' : d.item_name, From 8ccd3fee9e7092d6bb7d81e8ef6d59e25c13a29d Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 29 Oct 2021 16:08:52 +0530 Subject: [PATCH 103/200] fix: COA importer importing all accounts as group --- .../doctype/account/chart_of_accounts/chart_of_accounts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py index 05caafe1c47..3596c340175 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py @@ -81,7 +81,7 @@ def add_suffix_if_duplicate(account_name, account_number, accounts): def identify_is_group(child): if child.get("is_group"): is_group = child.get("is_group") - elif len(set(child.keys()) - set(["account_type", "root_type", "is_group", "tax_rate", "account_number"])): + elif len(set(child.keys()) - set(["account_name", "account_type", "root_type", "is_group", "tax_rate", "account_number"])): is_group = 1 else: is_group = 0 From 75a76e634d17507a568ff007d20226ffa8f7dff3 Mon Sep 17 00:00:00 2001 From: Subin Tom <36098155+nemesis189@users.noreply.github.com> Date: Fri, 29 Oct 2021 16:45:04 +0530 Subject: [PATCH 104/200] fix: POS consolidated invoice rounded total issue (#28006) --- .../pos_invoice_merge_log.py | 11 +++++ erpnext/controllers/taxes_and_totals.py | 40 ++++++++++++------- 2 files changed, 36 insertions(+), 15 deletions(-) diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py index 4f26ed43db7..28bd10283e7 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py @@ -114,6 +114,8 @@ class POSInvoiceMergeLog(Document): def merge_pos_invoice_into(self, invoice, data): items, payments, taxes = [], [], [] loyalty_amount_sum, loyalty_points_sum = 0, 0 + rounding_adjustment, base_rounding_adjustment = 0, 0 + rounded_total, base_rounded_total = 0, 0 for doc in data: map_doc(doc, invoice, table_map={ "doctype": invoice.doctype }) @@ -162,6 +164,11 @@ class POSInvoiceMergeLog(Document): found = True if not found: payments.append(payment) + rounding_adjustment += doc.rounding_adjustment + rounded_total += doc.rounded_total + base_rounding_adjustment += doc.rounding_adjustment + base_rounded_total += doc.rounded_total + if loyalty_points_sum: invoice.redeem_loyalty_points = 1 @@ -171,6 +178,10 @@ class POSInvoiceMergeLog(Document): invoice.set('items', items) invoice.set('payments', payments) invoice.set('taxes', taxes) + invoice.set('rounding_adjustment',rounding_adjustment) + invoice.set('rounding_adjustment',base_rounding_adjustment) + invoice.set('base_rounded_total',base_rounded_total) + invoice.set('rounded_total',rounded_total) invoice.additional_discount_percentage = 0 invoice.discount_amount = 0.0 invoice.taxes_and_charges = None diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 70cc8a58bfe..7e7f598bc43 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -260,7 +260,9 @@ class calculate_taxes_and_totals(object): self.doc.round_floats_in(self.doc, ["total", "base_total", "net_total", "base_net_total"]) def calculate_taxes(self): - self.doc.rounding_adjustment = 0 + if not self.doc.get('is_consolidated'): + self.doc.rounding_adjustment = 0 + # maintain actual tax rate based on idx actual_tax_dict = dict([[tax.idx, flt(tax.tax_amount, tax.precision("tax_amount"))] for tax in self.doc.get("taxes") if tax.charge_type == "Actual"]) @@ -312,7 +314,9 @@ class calculate_taxes_and_totals(object): # adjust Discount Amount loss in last tax iteration if i == (len(self.doc.get("taxes")) - 1) and self.discount_amount_applied \ - and self.doc.discount_amount and self.doc.apply_discount_on == "Grand Total": + and self.doc.discount_amount \ + and self.doc.apply_discount_on == "Grand Total" \ + and not self.doc.get('is_consolidated'): self.doc.rounding_adjustment = flt(self.doc.grand_total - flt(self.doc.discount_amount) - tax.total, self.doc.precision("rounding_adjustment")) @@ -405,11 +409,16 @@ class calculate_taxes_and_totals(object): self.doc.rounding_adjustment = diff def calculate_totals(self): - self.doc.grand_total = flt(self.doc.get("taxes")[-1].total) + flt(self.doc.rounding_adjustment) \ - if self.doc.get("taxes") else flt(self.doc.net_total) + if self.doc.get("taxes"): + self.doc.grand_total = flt(self.doc.get("taxes")[-1].total) + flt(self.doc.rounding_adjustment) + else: + self.doc.grand_total = flt(self.doc.net_total) - self.doc.total_taxes_and_charges = flt(self.doc.grand_total - self.doc.net_total + if self.doc.get("taxes"): + self.doc.total_taxes_and_charges = flt(self.doc.grand_total - self.doc.net_total - flt(self.doc.rounding_adjustment), self.doc.precision("total_taxes_and_charges")) + else: + self.doc.total_taxes_and_charges = 0.0 self._set_in_company_currency(self.doc, ["total_taxes_and_charges", "rounding_adjustment"]) @@ -446,19 +455,20 @@ class calculate_taxes_and_totals(object): self.doc.total_net_weight += d.total_weight def set_rounded_total(self): - if self.doc.meta.get_field("rounded_total"): - if self.doc.is_rounded_total_disabled(): - self.doc.rounded_total = self.doc.base_rounded_total = 0 - return + if not self.doc.get('is_consolidated'): + if self.doc.meta.get_field("rounded_total"): + if self.doc.is_rounded_total_disabled(): + self.doc.rounded_total = self.doc.base_rounded_total = 0 + return - self.doc.rounded_total = round_based_on_smallest_currency_fraction(self.doc.grand_total, - self.doc.currency, self.doc.precision("rounded_total")) + self.doc.rounded_total = round_based_on_smallest_currency_fraction(self.doc.grand_total, + self.doc.currency, self.doc.precision("rounded_total")) - #if print_in_rate is set, we would have already calculated rounding adjustment - self.doc.rounding_adjustment += flt(self.doc.rounded_total - self.doc.grand_total, - self.doc.precision("rounding_adjustment")) + #if print_in_rate is set, we would have already calculated rounding adjustment + self.doc.rounding_adjustment += flt(self.doc.rounded_total - self.doc.grand_total, + self.doc.precision("rounding_adjustment")) - self._set_in_company_currency(self.doc, ["rounding_adjustment", "rounded_total"]) + self._set_in_company_currency(self.doc, ["rounding_adjustment", "rounded_total"]) def _cleanup(self): if not self.doc.get('is_consolidated'): From b44945380dd0af192b12cdf96df7ac23b77a79c3 Mon Sep 17 00:00:00 2001 From: Noah Jacob Date: Wed, 20 Oct 2021 17:37:52 +0530 Subject: [PATCH 105/200] fix: incorrect amount of serial_nos fetched --- erpnext/stock/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py index c4a0497b744..b131125c670 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -104,7 +104,7 @@ def get_stock_balance(item_code, warehouse, posting_date=None, posting_time=None serial_nos = last_entry.get("serial_no") if (serial_nos and - len(get_serial_nos_data(serial_nos)) < last_entry.qty_after_transaction): + len(get_serial_nos_data(serial_nos)) <= last_entry.qty_after_transaction): serial_nos = get_serial_nos_data_after_transactions(args) return ((last_entry.qty_after_transaction, last_entry.valuation_rate, serial_nos) @@ -121,6 +121,7 @@ def get_serial_nos_data_after_transactions(args): WHERE item_code = %(item_code)s and warehouse = %(warehouse)s and timestamp(posting_date, posting_time) < timestamp(%(posting_date)s, %(posting_time)s) + and is_cancelled = 0 order by posting_date, posting_time asc """, args, as_dict=1) for d in data: From deb6b38fab47339098c903b253a5e478a2a63b65 Mon Sep 17 00:00:00 2001 From: Noah Jacob Date: Thu, 21 Oct 2021 17:17:11 +0530 Subject: [PATCH 106/200] refactor: replaced db.sql with qb --- erpnext/stock/utils.py | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py index b131125c670..518bdf11e3c 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -115,14 +115,25 @@ def get_stock_balance(item_code, warehouse, posting_date=None, posting_time=None return last_entry.qty_after_transaction if last_entry else 0.0 def get_serial_nos_data_after_transactions(args): + from pypika import CustomFunction + serial_nos = [] - data = frappe.db.sql(""" SELECT serial_no, actual_qty - FROM `tabStock Ledger Entry` - WHERE - item_code = %(item_code)s and warehouse = %(warehouse)s - and timestamp(posting_date, posting_time) < timestamp(%(posting_date)s, %(posting_time)s) - and is_cancelled = 0 - order by posting_date, posting_time asc """, args, as_dict=1) + args = frappe._dict(args) + sle = frappe.qb.DocType('Stock Ledger Entry') + Timestamp = CustomFunction('timestamp', ['date', 'time']) + + data = frappe.qb.from_( + sle + ).select( + 'serial_no','actual_qty' + ).where( + (sle.item_code == args.item_code) + & (sle.warehouse == args.warehouse) + & (Timestamp(sle.posting_date, sle.posting_time) < Timestamp(args.posting_date, args.posting_time)) + & (sle.is_cancelled == 0) + ).orderby( + sle.posting_date, sle.posting_time + ).run(as_dict=1) for d in data: if d.actual_qty > 0: From 2aa019ae4c148a01ed57b8cffb461cb90748791a Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 29 Oct 2021 14:32:13 +0530 Subject: [PATCH 107/200] fix: fetch serial nos from ledger unconditionally --- erpnext/stock/utils.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py index 518bdf11e3c..463b314291a 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -101,11 +101,7 @@ def get_stock_balance(item_code, warehouse, posting_date=None, posting_time=None if with_valuation_rate: if with_serial_no: - serial_nos = last_entry.get("serial_no") - - if (serial_nos and - len(get_serial_nos_data(serial_nos)) <= last_entry.qty_after_transaction): - serial_nos = get_serial_nos_data_after_transactions(args) + serial_nos = get_serial_nos_data_after_transactions(args) return ((last_entry.qty_after_transaction, last_entry.valuation_rate, serial_nos) if last_entry else (0.0, 0.0, 0.0)) From f4b60a48f5bb8b8b9e8446aa0ab441f84b321e55 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 29 Oct 2021 14:56:54 +0530 Subject: [PATCH 108/200] refactor: simplify sr no fetching --- erpnext/stock/utils.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py index 463b314291a..38ca25ee547 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -113,12 +113,12 @@ def get_stock_balance(item_code, warehouse, posting_date=None, posting_time=None def get_serial_nos_data_after_transactions(args): from pypika import CustomFunction - serial_nos = [] + serial_nos = set() args = frappe._dict(args) sle = frappe.qb.DocType('Stock Ledger Entry') Timestamp = CustomFunction('timestamp', ['date', 'time']) - data = frappe.qb.from_( + stock_ledger_entries = frappe.qb.from_( sle ).select( 'serial_no','actual_qty' @@ -131,11 +131,12 @@ def get_serial_nos_data_after_transactions(args): sle.posting_date, sle.posting_time ).run(as_dict=1) - for d in data: - if d.actual_qty > 0: - serial_nos.extend(get_serial_nos_data(d.serial_no)) + for stock_ledger_entry in stock_ledger_entries: + changed_serial_no = get_serial_nos_data(stock_ledger_entry.serial_no) + if stock_ledger_entry.actual_qty > 0: + serial_nos.update(changed_serial_no) else: - serial_nos = list(set(serial_nos) - set(get_serial_nos_data(d.serial_no))) + serial_nos.difference_update(changed_serial_no) return '\n'.join(serial_nos) From ff9cfe0d14849d2103700ce84244c25b22075581 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 29 Oct 2021 16:30:12 +0530 Subject: [PATCH 109/200] fix: sort by creation to break tie --- erpnext/stock/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py index 38ca25ee547..e1d5a89082e 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -128,7 +128,7 @@ def get_serial_nos_data_after_transactions(args): & (Timestamp(sle.posting_date, sle.posting_time) < Timestamp(args.posting_date, args.posting_time)) & (sle.is_cancelled == 0) ).orderby( - sle.posting_date, sle.posting_time + sle.posting_date, sle.posting_time, sle.creation ).run(as_dict=1) for stock_ledger_entry in stock_ledger_entries: From 23af036894ef61f590278fa7e84402f0be3ff50d Mon Sep 17 00:00:00 2001 From: Anupam Date: Fri, 29 Oct 2021 17:27:17 +0530 Subject: [PATCH 110/200] feat: provision to close the Work Order --- .../doctype/work_order/work_order.js | 48 +++++++++++-------- .../doctype/work_order/work_order.json | 5 +- .../doctype/work_order/work_order.py | 31 +++++++++++- 3 files changed, 60 insertions(+), 24 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js index 51c46f63ab7..d4235731ae1 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.js +++ b/erpnext/manufacturing/doctype/work_order/work_order.js @@ -135,24 +135,26 @@ frappe.ui.form.on("Work Order", { frm.set_intro(__("Submit this Work Order for further processing.")); } - if (frm.doc.docstatus===1) { - frm.trigger('show_progress_for_items'); - frm.trigger('show_progress_for_operations'); - } + if (frm.doc.status != "Closed") { + if (frm.doc.docstatus===1) { + frm.trigger('show_progress_for_items'); + frm.trigger('show_progress_for_operations'); + } - if (frm.doc.docstatus === 1 - && frm.doc.operations && frm.doc.operations.length) { + if (frm.doc.docstatus === 1 + && frm.doc.operations && frm.doc.operations.length) { - const not_completed = frm.doc.operations.filter(d => { - if(d.status != 'Completed') { - return true; + const not_completed = frm.doc.operations.filter(d => { + if(d.status != 'Completed') { + return true; + } + }); + + if(not_completed && not_completed.length) { + frm.add_custom_button(__('Create Job Card'), () => { + frm.trigger("make_job_card"); + }).addClass('btn-primary'); } - }); - - if(not_completed && not_completed.length) { - frm.add_custom_button(__('Create Job Card'), () => { - frm.trigger("make_job_card"); - }).addClass('btn-primary'); } } @@ -517,14 +519,19 @@ frappe.ui.form.on("Work Order Operation", { erpnext.work_order = { set_custom_buttons: function(frm) { var doc = frm.doc; - if (doc.docstatus === 1) { + if (doc.docstatus === 1 && doc.status != "Closed") { + console.log("check"); + frm.add_custom_button(__('Close'), function() { + erpnext.work_order.change_work_order_status(frm, "Closed"); + }, __("Status")); + if (doc.status != 'Stopped' && doc.status != 'Completed') { frm.add_custom_button(__('Stop'), function() { - erpnext.work_order.stop_work_order(frm, "Stopped"); + erpnext.work_order.change_work_order_status(frm, "Stopped"); }, __("Status")); } else if (doc.status == 'Stopped') { frm.add_custom_button(__('Re-open'), function() { - erpnext.work_order.stop_work_order(frm, "Resumed"); + erpnext.work_order.change_work_order_status(frm, "Resumed"); }, __("Status")); } @@ -713,9 +720,10 @@ erpnext.work_order = { }); }, - stop_work_order: function(frm, status) { + change_work_order_status: function(frm, status) { + let method_name = status=="Closed" ? "close_work_order" : "stop_unstop"; frappe.call({ - method: "erpnext.manufacturing.doctype.work_order.work_order.stop_unstop", + method: `erpnext.manufacturing.doctype.work_order.work_order.${method_name}`, freeze: true, freeze_message: __("Updating Work Order status"), args: { diff --git a/erpnext/manufacturing/doctype/work_order/work_order.json b/erpnext/manufacturing/doctype/work_order/work_order.json index 7f8e816a22a..df7ee53b92d 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.json +++ b/erpnext/manufacturing/doctype/work_order/work_order.json @@ -99,7 +99,7 @@ "no_copy": 1, "oldfieldname": "status", "oldfieldtype": "Select", - "options": "\nDraft\nSubmitted\nNot Started\nIn Process\nCompleted\nStopped\nCancelled", + "options": "\nDraft\nSubmitted\nNot Started\nIn Process\nCompleted\nStopped\nClosed\nCancelled", "read_only": 1, "reqd": 1, "search_index": 1 @@ -573,7 +573,8 @@ "image_field": "image", "is_submittable": 1, "links": [], - "modified": "2021-10-27 19:21:35.139888", + "migration_hash": "a18118963f4fcdb7f9d326de5f4063ba", + "modified": "2021-10-29 15:12:32.203605", "modified_by": "Administrator", "module": "Manufacturing", "name": "Work Order", diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index f881e1bf16a..6901d71ad4a 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -175,7 +175,7 @@ class WorkOrder(Document): def update_status(self, status=None): '''Update status of work order if unknown''' - if status != "Stopped": + if status != "Stopped" and status != "Closed": status = self.get_status(status) if status != self.status: @@ -624,7 +624,6 @@ class WorkOrder(Document): def validate_operation_time(self): for d in self.operations: if not d.time_in_mins > 0: - print(self.bom_no, self.production_item) frappe.throw(_("Operation Time must be greater than 0 for Operation {0}").format(d.operation)) def update_required_items(self): @@ -967,6 +966,10 @@ def stop_unstop(work_order, status): frappe.throw(_("Not permitted"), frappe.PermissionError) pro_order = frappe.get_doc("Work Order", work_order) + + if pro_order.status == "Closed": + frappe.throw(_("Closed Work Order can not be stopped or Re-opened")) + pro_order.update_status(status) pro_order.update_planned_qty() frappe.msgprint(_("Work Order has been {0}").format(status)) @@ -1001,6 +1004,30 @@ def make_job_card(work_order, operations): if row.job_card_qty > 0: create_job_card(work_order, row, auto_create=True) +@frappe.whitelist() +def close_work_order(work_order, status): + if not frappe.has_permission("Work Order", "write"): + frappe.throw(_("Not permitted"), frappe.PermissionError) + + work_order = frappe.get_doc("Work Order", work_order) + if work_order.get("operations"): + job_cards = frappe.get_list("Job Card", + filters={ + "work_order": work_order.name, + "status": "Work In Progress" + }, + pluck='name') + + if job_cards: + job_cards = ", ".join(job_cards) + frappe.throw(_("Can not close Work Order. Since {0} Job Cards are in Work In Progress state.").format(job_cards)) + + work_order.update_status(status) + work_order.update_planned_qty() + frappe.msgprint(_("Work Order has been {0}").format(status)) + work_order.notify_update() + return work_order.status + def split_qty_based_on_batch_size(wo_doc, row, qty): if not cint(frappe.db.get_value("Operation", row.operation, "create_job_card_based_on_batch_size")): From 15e9b5170d9c17e25d96ba142ca3be3bb7f68156 Mon Sep 17 00:00:00 2001 From: Ganga Manoj Date: Fri, 29 Oct 2021 18:07:11 +0530 Subject: [PATCH 111/200] fix: Make status filter optional (#28126) --- .../fixed_asset_register/fixed_asset_register.js | 5 ++--- .../fixed_asset_register/fixed_asset_register.py | 11 ++++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/erpnext/assets/report/fixed_asset_register/fixed_asset_register.js b/erpnext/assets/report/fixed_asset_register/fixed_asset_register.js index 75f42a9f783..06989a95da7 100644 --- a/erpnext/assets/report/fixed_asset_register/fixed_asset_register.js +++ b/erpnext/assets/report/fixed_asset_register/fixed_asset_register.js @@ -16,9 +16,8 @@ frappe.query_reports["Fixed Asset Register"] = { fieldname:"status", label: __("Status"), fieldtype: "Select", - options: "In Location\nDisposed", - default: 'In Location', - reqd: 1 + options: "\nIn Location\nDisposed", + default: 'In Location' }, { "fieldname":"filter_based_on", diff --git a/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py b/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py index e370b9d0cb3..63685fef465 100644 --- a/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py +++ b/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py @@ -45,12 +45,13 @@ def get_conditions(filters): if filters.get('cost_center'): conditions["cost_center"] = filters.get('cost_center') - # In Store assets are those that are not sold or scrapped - operand = 'not in' - if status not in 'In Location': - operand = 'in' + if status: + # In Store assets are those that are not sold or scrapped + operand = 'not in' + if status not in 'In Location': + operand = 'in' - conditions['status'] = (operand, ['Sold', 'Scrapped']) + conditions['status'] = (operand, ['Sold', 'Scrapped']) return conditions From 1a6e98ed488e5ed2e55f14b9f1d5166abfecb0f4 Mon Sep 17 00:00:00 2001 From: Anuja Pawar <60467153+Anuja-pawar@users.noreply.github.com> Date: Fri, 29 Oct 2021 20:52:47 +0530 Subject: [PATCH 112/200] fix(Payment Reconciliation): clear child tables on company/party change (#28008) --- .../payment_reconciliation.js | 132 +++++++++--------- erpnext/accounts/utils.py | 3 +- 2 files changed, 70 insertions(+), 65 deletions(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js index 412833bd192..ad5a84094ea 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.js @@ -4,9 +4,14 @@ frappe.provide("erpnext.accounts"); erpnext.accounts.PaymentReconciliationController = class PaymentReconciliationController extends frappe.ui.form.Controller { onload() { - var me = this; + const default_company = frappe.defaults.get_default('company'); + this.frm.set_value('company', default_company); - this.frm.set_query("party_type", function() { + this.frm.set_value('party_type', ''); + this.frm.set_value('party', ''); + this.frm.set_value('receivable_payable_account', ''); + + this.frm.set_query("party_type", () => { return { "filters": { "name": ["in", Object.keys(frappe.boot.party_account_types)], @@ -14,44 +19,30 @@ erpnext.accounts.PaymentReconciliationController = class PaymentReconciliationCo } }); - this.frm.set_query('receivable_payable_account', function() { - check_mandatory(me.frm); + this.frm.set_query('receivable_payable_account', () => { return { filters: { - "company": me.frm.doc.company, + "company": this.frm.doc.company, "is_group": 0, - "account_type": frappe.boot.party_account_types[me.frm.doc.party_type] + "account_type": frappe.boot.party_account_types[this.frm.doc.party_type] } }; }); - this.frm.set_query('bank_cash_account', function() { - check_mandatory(me.frm, true); + this.frm.set_query('bank_cash_account', () => { return { filters:[ - ['Account', 'company', '=', me.frm.doc.company], + ['Account', 'company', '=', this.frm.doc.company], ['Account', 'is_group', '=', 0], ['Account', 'account_type', 'in', ['Bank', 'Cash']] ] }; }); - - this.frm.set_value('party_type', ''); - this.frm.set_value('party', ''); - this.frm.set_value('receivable_payable_account', ''); - - var check_mandatory = (frm, only_company=false) => { - var title = __("Mandatory"); - if (only_company && !frm.doc.company) { - frappe.throw({message: __("Please Select a Company First"), title: title}); - } else if (!frm.doc.company || !frm.doc.party_type) { - frappe.throw({message: __("Please Select Both Company and Party Type First"), title: title}); - } - }; } refresh() { this.frm.disable_save(); + this.frm.set_df_property('invoices', 'cannot_delete_rows', true); this.frm.set_df_property('payments', 'cannot_delete_rows', true); this.frm.set_df_property('allocation', 'cannot_delete_rows', true); @@ -85,76 +76,92 @@ erpnext.accounts.PaymentReconciliationController = class PaymentReconciliationCo } company() { - var me = this; + this.frm.set_value('party', ''); this.frm.set_value('receivable_payable_account', ''); - me.frm.clear_table("allocation"); - me.frm.clear_table("invoices"); - me.frm.clear_table("payments"); - me.frm.refresh_fields(); - me.frm.trigger('party'); + } + + party_type() { + this.frm.set_value('party', ''); } party() { - var me = this; - if (!me.frm.doc.receivable_payable_account && me.frm.doc.party_type && me.frm.doc.party) { + this.frm.set_value('receivable_payable_account', ''); + this.frm.trigger("clear_child_tables"); + + if (!this.frm.doc.receivable_payable_account && this.frm.doc.party_type && this.frm.doc.party) { return frappe.call({ method: "erpnext.accounts.party.get_party_account", args: { - company: me.frm.doc.company, - party_type: me.frm.doc.party_type, - party: me.frm.doc.party + company: this.frm.doc.company, + party_type: this.frm.doc.party_type, + party: this.frm.doc.party }, - callback: function(r) { + callback: (r) => { if (!r.exc && r.message) { - me.frm.set_value("receivable_payable_account", r.message); + this.frm.set_value("receivable_payable_account", r.message); } - me.frm.refresh(); + this.frm.refresh(); + } }); } } + receivable_payable_account() { + this.frm.trigger("clear_child_tables"); + this.frm.refresh(); + } + + clear_child_tables() { + this.frm.clear_table("invoices"); + this.frm.clear_table("payments"); + this.frm.clear_table("allocation"); + this.frm.refresh_fields(); + } + get_unreconciled_entries() { - var me = this; + this.frm.clear_table("allocation"); return this.frm.call({ - doc: me.frm.doc, + doc: this.frm.doc, method: 'get_unreconciled_entries', - callback: function(r, rt) { - if (!(me.frm.doc.payments.length || me.frm.doc.invoices.length)) { - frappe.throw({message: __("No invoice and payment records found for this party")}); + callback: () => { + if (!(this.frm.doc.payments.length || this.frm.doc.invoices.length)) { + frappe.throw({message: __("No Unreconciled Invoices and Payments found for this party and account")}); + } else if (!(this.frm.doc.invoices.length)) { + frappe.throw({message: __("No Outstanding Invoices found for this party")}); + } else if (!(this.frm.doc.payments.length)) { + frappe.throw({message: __("No Unreconciled Payments found for this party")}); } - me.frm.refresh(); + this.frm.refresh(); } }); } allocate() { - var me = this; - let payments = me.frm.fields_dict.payments.grid.get_selected_children(); + let payments = this.frm.fields_dict.payments.grid.get_selected_children(); if (!(payments.length)) { - payments = me.frm.doc.payments; + payments = this.frm.doc.payments; } - let invoices = me.frm.fields_dict.invoices.grid.get_selected_children(); + let invoices = this.frm.fields_dict.invoices.grid.get_selected_children(); if (!(invoices.length)) { - invoices = me.frm.doc.invoices; + invoices = this.frm.doc.invoices; } - return me.frm.call({ - doc: me.frm.doc, + return this.frm.call({ + doc: this.frm.doc, method: 'allocate_entries', args: { payments: payments, invoices: invoices }, - callback: function() { - me.frm.refresh(); + callback: () => { + this.frm.refresh(); } }); } reconcile() { - var me = this; - var show_dialog = me.frm.doc.allocation.filter(d => d.difference_amount && !d.difference_account); + var show_dialog = this.frm.doc.allocation.filter(d => d.difference_amount && !d.difference_account); if (show_dialog && show_dialog.length) { @@ -186,10 +193,10 @@ erpnext.accounts.PaymentReconciliationController = class PaymentReconciliationCo label: __("Difference Account"), fieldname: 'difference_account', reqd: 1, - get_query: function() { + get_query: () => { return { filters: { - company: me.frm.doc.company, + company: this.frm.doc.company, is_group: 0 } } @@ -203,7 +210,7 @@ erpnext.accounts.PaymentReconciliationController = class PaymentReconciliationCo }] }, ], - primary_action: function() { + primary_action: () => { const args = dialog.get_values()["allocation"]; args.forEach(d => { @@ -211,7 +218,7 @@ erpnext.accounts.PaymentReconciliationController = class PaymentReconciliationCo "difference_account", d.difference_account); }); - me.reconcile_payment_entries(); + this.reconcile_payment_entries(); dialog.hide(); }, primary_action_label: __('Reconcile Entries') @@ -237,15 +244,12 @@ erpnext.accounts.PaymentReconciliationController = class PaymentReconciliationCo } reconcile_payment_entries() { - var me = this; - return this.frm.call({ - doc: me.frm.doc, + doc: this.frm.doc, method: 'reconcile', - callback: function(r, rt) { - me.frm.clear_table("allocation"); - me.frm.refresh_fields(); - me.frm.refresh(); + callback: () => { + this.frm.clear_table("allocation"); + this.frm.refresh(); } }); } diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index fdd8d092ebb..fb23d6fc499 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -450,7 +450,8 @@ def update_reference_in_journal_entry(d, journal_entry, do_not_save=False): # new row with references new_row = journal_entry.append("accounts") - new_row.update(jv_detail.as_dict().copy()) + + new_row.update((frappe.copy_doc(jv_detail)).as_dict()) new_row.set(d["dr_or_cr"], d["allocated_amount"]) new_row.set('debit' if d['dr_or_cr'] == 'debit_in_account_currency' else 'credit', From bc1e7bc15fd9e21ed6d4f0438ca649944316bfdc Mon Sep 17 00:00:00 2001 From: Anuja Pawar Date: Fri, 29 Oct 2021 21:32:20 +0530 Subject: [PATCH 113/200] fix: re-writing sql query with ORM methods --- erpnext/regional/india/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 5dc683ce219..753faab9047 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -81,9 +81,9 @@ def update_gst_category(doc, method): for link in doc.links: if link.link_doctype in ['Customer', 'Supplier']: if doc.get('gstin'): - frappe.db.sql(""" - UPDATE `tab{0}` SET gst_category = %s WHERE name = %s AND gst_category = 'Unregistered' """ - .format(link.link_doctype), ("Registered Regular", link.link_name)) #nosec + gst_category = frappe.db.get_value(link.link_doctype, link.link_name, 'gst_category') + if gst_category == 'Unregistered': + frappe.db.set_value(link.link_doctype, link.link_name, 'gst_category', 'Registered Regular') def set_gst_state_and_state_number(doc): if not doc.gst_state: From ad5cf467c03b695fe3f12a98ab05367189db969e Mon Sep 17 00:00:00 2001 From: Kenneth Sequeira Date: Sat, 30 Oct 2021 13:07:36 +0530 Subject: [PATCH 114/200] fix: update tax template name for 18% GST --- erpnext/setup/setup_wizard/data/country_wise_tax.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/setup/setup_wizard/data/country_wise_tax.json b/erpnext/setup/setup_wizard/data/country_wise_tax.json index b7e895db363..8a1338583ba 100644 --- a/erpnext/setup/setup_wizard/data/country_wise_tax.json +++ b/erpnext/setup/setup_wizard/data/country_wise_tax.json @@ -1195,7 +1195,7 @@ "*": { "item_tax_templates": [ { - "title": "GST 9%", + "title": "GST 18%", "taxes": [ { "tax_type": { From 541c892f9757f01a4ce7b72e5bc537260e65a3f8 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sat, 30 Oct 2021 18:22:46 +0530 Subject: [PATCH 115/200] fix: Error for missing PAN no field --- .../tax_withholding_category.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index c36f3cb201b..6ab0f9618aa 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -58,15 +58,24 @@ def get_party_tax_withholding_details(inv, tax_withholding_category=None): pan_no = '' parties = [] party_type, party = get_party_details(inv) + has_pan_field = frappe.get_meta(party_type).has_field("pan") if not tax_withholding_category: - tax_withholding_category, pan_no = frappe.db.get_value(party_type, party, ['tax_withholding_category', 'pan']) + if has_pan_field: + fields = ['tax_withholding_category', 'pan'] + else: + fields = ['tax_withholding_category'] + + tax_withholding_details = frappe.db.get_value(party_type, party, fields, as_dict=1) + + tax_withholding_category = tax_withholding_details.get('tax_withholding_category') + pan_no = tax_withholding_details.get('pan') if not tax_withholding_category: return # if tax_withholding_category passed as an argument but not pan_no - if not pan_no: + if not pan_no and has_pan_field: pan_no = frappe.db.get_value(party_type, party, 'pan') # Get others suppliers with the same PAN No From 2a5beec885a40c6dd210ad11280ac46bc1867feb Mon Sep 17 00:00:00 2001 From: ahmadpak Date: Sat, 30 Oct 2021 17:18:45 +0300 Subject: [PATCH 116/200] new (Print Format): KSA VAT Invoice --- .../print_format/ksa_vat_invoice/__init__.py | 0 .../ksa_vat_invoice/ksa_vat_invoice.json | 32 +++++++++++++++++++ erpnext/regional/saudi_arabia/setup.py | 32 ++++++++++++++++--- 3 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 erpnext/regional/print_format/ksa_vat_invoice/__init__.py create mode 100644 erpnext/regional/print_format/ksa_vat_invoice/ksa_vat_invoice.json diff --git a/erpnext/regional/print_format/ksa_vat_invoice/__init__.py b/erpnext/regional/print_format/ksa_vat_invoice/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/regional/print_format/ksa_vat_invoice/ksa_vat_invoice.json b/erpnext/regional/print_format/ksa_vat_invoice/ksa_vat_invoice.json new file mode 100644 index 00000000000..edb107adef4 --- /dev/null +++ b/erpnext/regional/print_format/ksa_vat_invoice/ksa_vat_invoice.json @@ -0,0 +1,32 @@ +{ + "absolute_value": 0, + "align_labels_right": 0, + "creation": "2021-10-29 22:46:26.039023", + "css": ".qr-code{\n float:right;\n}\n\n.invoice-heading {\n margin: 0;\n}\n\n.ksa-invoice-table {\n border: 1px solid #888a8e;\n border-collapse: collapse;\n width: 100%;\n margin: 20px 0;\n color: #888a8e;\n font-size: 16px;\n}\n\n.ksa-invoice-table.two-columns td:nth-child(2) {\n direction: rtl;\n}\n\n.ksa-invoice-table th {\n border: 1px solid #888a8e;\n max-width: 50%;\n background-color: #265e4a !important;\n color: #fff;\n padding: 8px;\n}\n\n.ksa-invoice-table td {\n padding: 5px;\n border: 1px solid #888a8e;\n max-width: 50%;\n}\n\n.ksa-invoice-table thead,\n.ksa-invoice-table tfoot {\n text-transform: uppercase;\n}\n\n.qr-rtl {\n direction: rtl;\n}\n\n.qr-flex{\n display: flex;\n justify-content: space-between;\n}", + "custom_format": 1, + "default_print_language": "en", + "disabled": 0, + "doc_type": "Sales Invoice", + "docstatus": 0, + "doctype": "Print Format", + "font_size": 14, + "html": "
\n
\n
\n

TAX INVOICE

\n

\u0641\u0627\u062a\u0648\u0631\u0629 \u0636\u0631\u064a\u0628\u064a\u0629

\n
\n \n \n
\n {% set company = frappe.get_doc(\"Company\", doc.company)%}\n {% if (doc.company_address) %}\n {% set supplier_address_doc = frappe.get_doc('Address', doc.company_address) %}\n {% endif %}\n \n {% if(doc.customer_address) %}\n {% set customer_address = frappe.get_doc('Address', doc.customer_address ) %}\n {% endif %}\n \n {% if(doc.shipping_address_name) %}\n {% set customer_shipping_address = frappe.get_doc('Address', doc.shipping_address_name ) %}\n {% endif %} \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {% if(supplier_address_doc) %}\n \n \n \n \n \n \n \n \n \n \n \n \n {% endif %}\n \n {% if (company.tax_id) %}\n \n \n \n \n \n \n \n \n {% endif %}\n \n \n \n \n \n \n \n \n \n \n \n {% if(customer_address) %}\n \n \n \n \n {% endif %}\n \n {% if(customer_shipping_address) %}\n \n \n \n \n \n \n \n \n \n {% endif %}\n \n \n \n \n \n \n {% if(doc.po_no) %}\n \n \n \n \n {% endif %}\n \n \n \n \n \n \n
{{ company.name }}{{ company.company_name_in_arabic }}
Invoice#: {{doc.name}}\u0631\u0642\u0645 \u0627\u0644\u0641\u0627\u062a\u0648\u0631\u0629: {{doc.name}}
Invoice Date: {{doc.posting_date}}\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u0641\u0627\u062a\u0648\u0631\u0629: {{doc.posting_date}}
Date of Supply:{{doc.posting_date}}\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u062a\u0648\u0631\u064a\u062f: {{doc.posting_date}}
Supplier:\u0627\u0644\u0645\u0648\u0631\u062f:
{{ company.name }}{{ company.company_name_in_arabic }}
{{ supplier_address_doc.address_line1}} {{ supplier_address_doc.address_in_arabic}}
Phone: {{ supplier_address_doc.phone }}\u0647\u0627\u062a\u0641: {{ supplier_address_doc.phone }}
Email: {{ supplier_address_doc.email_id }}\u0628\u0631\u064a\u062f \u0627\u0644\u0643\u062a\u0631\u0648\u0646\u064a: {{ supplier_address_doc.email_id }}
Supplier Tax Identification Number:\u0631\u0642\u0645 \u0627\u0644\u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0636\u0631\u064a\u0628\u064a \u0644\u0644\u0645\u0648\u0631\u062f:
{{ company.tax_id }}{{ company.tax_id }}
CUSTOMER:\u0639\u0645\u064a\u0644:
{{ doc.customer }} {{ doc.customer_name_in_arabic }}
{{ customer_address.address_line1}} {{ customer_address.address_in_arabic}}
SHIPPING ADDRESS:\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0634\u062d\u0646:
{{ customer_shipping_address.address_line1}} {{ customer_shipping_address.address_in_arabic}}
OTHER INFORMATION\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0623\u062e\u0631\u0649
Purchase Order Number: {{ doc.po_no }}\u0631\u0642\u0645 \u0623\u0645\u0631 \u0627\u0644\u0634\u0631\u0627\u0621: {{ doc.po_no }}
Payment Due Date: {{ doc.due_date}} \u062a\u0627\u0631\u064a\u062e \u0627\u0633\u062a\u062d\u0642\u0627\u0642 \u0627\u0644\u062f\u0641\u0639: {{ doc.due_date}}
\n\n \n {% set col = namespace(one = 2, two = 1) %}\n {% set length = doc.taxes | length %}\n {% set length = length / 2 | round %}\n {% set col.one = col.one + length %}\n {% set col.two = col.two + length %}\n \n {%- if(doc.taxes | length % 2 > 0 ) -%}\n {% set col.two = col.two + 1 %}\n {% endif %}\n \n \n {% set total = namespace(amount = 0) %}\n \n \n \n \n \n \n \n \n {% for row in doc.taxes %}\n \n {% endfor %}\n \n \n \n \n \n {%- for item in doc.items -%}\n {% set total.amount = item.amount %}\n \n \n \n \n \n {% for row in doc.taxes %}\n {% set data_object = json.loads(row.item_wise_tax_detail) %}\n \n {% endfor %}\n \n \n {%- endfor -%}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Nature of goods or services
\u0637\u0628\u064a\u0639\u0629 \u0627\u0644\u0633\u0644\u0639 \u0623\u0648 \u0627\u0644\u062e\u062f\u0645\u0627\u062a
\n Unit price
\n \u0633\u0639\u0631 \u0627\u0644\u0648\u062d\u062f\u0629\n
\n Quantity
\n \u0627\u0644\u0643\u0645\u064a\u0629\n
\n Taxable Amount
\n \u0627\u0644\u0645\u0628\u0644\u063a \u0627\u0644\u062e\u0627\u0636\u0639 \u0644\u0644\u0636\u0631\u064a\u0628\u0629\n
{{row.description}}\n Total
\n \u0627\u0644\u0645\u062c\u0645\u0648\u0639\n
{{ item.item_code }}{{ item.get_formatted(\"rate\") }}{{ item.qty }}{{ item.get_formatted(\"amount\") }}\n
\n {%- if(data_object[item.item_code][0])-%}\n {{ frappe.format(data_object[item.item_code][0], {'fieldtype': 'Percent'}) }}\n {%- endif -%}\n \n {%- if(data_object[item.item_code][1])-%}\n {{ frappe.format(data_object[item.item_code][1], {'fieldtype': 'Currency'}) }}\n {% set total.amount = total.amount + data_object[item.item_code][1] %}\n {%- endif -%}\n
\n
{{ frappe.format(total.amount, {'fieldtype': 'Currency'}) }}
\n {{ doc.get_formatted(\"total\") }}
\n {{ doc.get_formatted(\"total_taxes_and_charges\") }}\n
\n \u0627\u0644\u0625\u062c\u0645\u0627\u0644\u064a \u0628\u0627\u0633\u062a\u062b\u0646\u0627\u0621 \u0636\u0631\u064a\u0628\u0629 \u0627\u0644\u0642\u064a\u0645\u0629 \u0627\u0644\u0645\u0636\u0627\u0641\u0629\n
\n \u0625\u062c\u0645\u0627\u0644\u064a \u0636\u0631\u064a\u0628\u0629 \u0627\u0644\u0642\u064a\u0645\u0629 \u0627\u0644\u0645\u0636\u0627\u0641\u0629\n
\n Total (Excluding VAT)\n
\n Total VAT\n
\n {{ doc.get_formatted(\"total\") }}
\n {{ doc.get_formatted(\"total_taxes_and_charges\") }}\n
{{ doc.get_formatted(\"grand_total\") }}\n \u0625\u062c\u0645\u0627\u0644\u064a \u0627\u0644\u0645\u0628\u0644\u063a \u0627\u0644\u0645\u0633\u062a\u062d\u0642Total Amount Due{{ doc.get_formatted(\"grand_total\") }}
\n\n\t{%- if doc.terms -%}\n

\n {{doc.terms}}\n

\n\t{%- endif -%}\n
\n", + "idx": 0, + "line_breaks": 0, + "margin_bottom": 15.0, + "margin_left": 15.0, + "margin_right": 15.0, + "margin_top": 15.0, + "modified": "2021-10-30 17:12:49.496507", + "modified_by": "Administrator", + "module": "Regional", + "name": "KSA VAT Invoice", + "owner": "Administrator", + "page_number": "Hide", + "print_format_builder": 0, + "print_format_builder_beta": 0, + "print_format_type": "Jinja", + "raw_printing": 0, + "show_section_headings": 0, + "standard": "Yes" +} \ No newline at end of file diff --git a/erpnext/regional/saudi_arabia/setup.py b/erpnext/regional/saudi_arabia/setup.py index 6113f48d3f1..2e139e6eb86 100644 --- a/erpnext/regional/saudi_arabia/setup.py +++ b/erpnext/regional/saudi_arabia/setup.py @@ -13,7 +13,7 @@ def setup(company=None, patch=True): add_print_formats() add_permissions() create_ksa_vat_setting(company) - make_qrcode_field() + make_custom_fields() def add_permissions(): """Add Permissions for KSA VAT Setting.""" @@ -26,12 +26,34 @@ def add_permissions(): """Enable KSA VAT Report""" frappe.db.set_value('Report', 'KSA VAT', 'disabled', 0) -def make_qrcode_field(): - """Created QR code Image file""" - qr_code_field = dict( +def make_custom_fields(): + """Create Custom fields + - QR code Image file + - Company Name in Arabic + - Address in Arabic + """ + qr_code = dict( fieldname='qr_code', label='QR Code', fieldtype='Attach Image', read_only=1, no_copy=1, hidden=1) - create_custom_field('Sales Invoice', qr_code_field) + create_custom_field('Sales Invoice', qr_code) + + company_name_in_arabic = dict( + fieldname='company_name_in_arabic', + label='Company Name In Arabic', + fieldtype='Data', + insert_after='company_name' + ) + + create_custom_field('Company', company_name_in_arabic) + + address_in_arabic = dict( + fieldname='address_in_arabic', + label='Address in Arabic', + fieldtype='Data', + insert_after='address_line2' + ) + + create_custom_field('Address', address_in_arabic) From cae29b71d863daf102fd002b7f32592817633026 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sun, 31 Oct 2021 09:24:07 +0530 Subject: [PATCH 117/200] fix: patch update_category_in_ltds_certificate --- erpnext/patches/v13_0/update_category_in_ltds_certificate.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/patches/v13_0/update_category_in_ltds_certificate.py b/erpnext/patches/v13_0/update_category_in_ltds_certificate.py index 4d4645269cb..a5f5a23449a 100644 --- a/erpnext/patches/v13_0/update_category_in_ltds_certificate.py +++ b/erpnext/patches/v13_0/update_category_in_ltds_certificate.py @@ -6,6 +6,8 @@ def execute(): if not company: return + frappe.reload_doc('regional', 'doctype', 'lower_deduction_certificate') + ldc = frappe.qb.DocType("Lower Deduction Certificate").as_("ldc") supplier = frappe.qb.DocType("Supplier") From 5d4c5652aff59d6f051adf34dd60094cce96af07 Mon Sep 17 00:00:00 2001 From: Anupam Date: Sun, 31 Oct 2021 14:20:03 +0530 Subject: [PATCH 118/200] feat: added confirm dialog on closing of workorder --- erpnext/manufacturing/doctype/work_order/work_order.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js index d4235731ae1..9ab81619f99 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.js +++ b/erpnext/manufacturing/doctype/work_order/work_order.js @@ -520,9 +520,12 @@ erpnext.work_order = { set_custom_buttons: function(frm) { var doc = frm.doc; if (doc.docstatus === 1 && doc.status != "Closed") { - console.log("check"); frm.add_custom_button(__('Close'), function() { - erpnext.work_order.change_work_order_status(frm, "Closed"); + frappe.confirm(__("Once the Work Order is Closed. It can't be resumed."), + () => { + erpnext.work_order.change_work_order_status(frm, "Closed"); + } + ); }, __("Status")); if (doc.status != 'Stopped' && doc.status != 'Completed') { From e290fe0721a2db994171e0be5a98d7fce272a3c7 Mon Sep 17 00:00:00 2001 From: Anupam Date: Sun, 31 Oct 2021 14:42:10 +0530 Subject: [PATCH 119/200] fix: sider issue --- erpnext/manufacturing/doctype/work_order/work_order.js | 4 ++-- erpnext/manufacturing/doctype/work_order/work_order.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.js b/erpnext/manufacturing/doctype/work_order/work_order.js index 9ab81619f99..bfce1b8cbec 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.js +++ b/erpnext/manufacturing/doctype/work_order/work_order.js @@ -145,12 +145,12 @@ frappe.ui.form.on("Work Order", { && frm.doc.operations && frm.doc.operations.length) { const not_completed = frm.doc.operations.filter(d => { - if(d.status != 'Completed') { + if (d.status != 'Completed') { return true; } }); - if(not_completed && not_completed.length) { + if (not_completed && not_completed.length) { frm.add_custom_button(__('Create Job Card'), () => { frm.trigger("make_job_card"); }).addClass('btn-primary'); diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 6901d71ad4a..af80c4ef0be 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1015,8 +1015,7 @@ def close_work_order(work_order, status): filters={ "work_order": work_order.name, "status": "Work In Progress" - }, - pluck='name') + }, pluck='name') if job_cards: job_cards = ", ".join(job_cards) From 55e97dce8a7cffd12180b36586ee277b3188cda5 Mon Sep 17 00:00:00 2001 From: Anupam Date: Sun, 31 Oct 2021 14:45:36 +0530 Subject: [PATCH 120/200] fix: sider issue --- erpnext/manufacturing/doctype/work_order/work_order.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index af80c4ef0be..117e2a227a8 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1012,10 +1012,10 @@ def close_work_order(work_order, status): work_order = frappe.get_doc("Work Order", work_order) if work_order.get("operations"): job_cards = frappe.get_list("Job Card", - filters={ - "work_order": work_order.name, - "status": "Work In Progress" - }, pluck='name') + filters={ + "work_order": work_order.name, + "status": "Work In Progress" + }, pluck='name') if job_cards: job_cards = ", ".join(job_cards) From 264b0df9ffe5074542c28b46c6ead2c3436e27ed Mon Sep 17 00:00:00 2001 From: Anupam Date: Sun, 31 Oct 2021 16:11:11 +0530 Subject: [PATCH 121/200] fix: sider issue --- erpnext/manufacturing/doctype/work_order/work_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 117e2a227a8..48703bc621b 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1015,7 +1015,7 @@ def close_work_order(work_order, status): filters={ "work_order": work_order.name, "status": "Work In Progress" - }, pluck='name') + }, pluck='name') if job_cards: job_cards = ", ".join(job_cards) From dd3cadd46b28d980154b0f6ccc1204fd5ce4fa66 Mon Sep 17 00:00:00 2001 From: Anuja Pawar Date: Mon, 1 Nov 2021 11:38:02 +0530 Subject: [PATCH 122/200] fix: update set_value query --- erpnext/regional/india/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 753faab9047..99ea53d9430 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -81,9 +81,7 @@ def update_gst_category(doc, method): for link in doc.links: if link.link_doctype in ['Customer', 'Supplier']: if doc.get('gstin'): - gst_category = frappe.db.get_value(link.link_doctype, link.link_name, 'gst_category') - if gst_category == 'Unregistered': - frappe.db.set_value(link.link_doctype, link.link_name, 'gst_category', 'Registered Regular') + frappe.db.set_value(link.link_doctype, { 'name': link.link_name, 'gst_category': 'Unregistered' }, 'gst_category', 'Registered Regular') def set_gst_state_and_state_number(doc): if not doc.gst_state: From 623776dd48325399441175ed04c2fd2a1d3f34c1 Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Mon, 1 Nov 2021 13:37:31 +0530 Subject: [PATCH 123/200] feat: added company field in prospect (#28139) * feat: added company field in prospect * fix: review changes --- erpnext/crm/doctype/prospect/prospect.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/erpnext/crm/doctype/prospect/prospect.json b/erpnext/crm/doctype/prospect/prospect.json index 3d6fba5123a..0e872ace043 100644 --- a/erpnext/crm/doctype/prospect/prospect.json +++ b/erpnext/crm/doctype/prospect/prospect.json @@ -20,6 +20,7 @@ "website", "column_break_13", "prospect_owner", + "company", "leads_section", "prospect_lead", "address_and_contact_section", @@ -153,14 +154,23 @@ "fieldname": "address_and_contact_section", "fieldtype": "Section Break", "label": "Address and Contact" + }, + { + "fieldname": "company", + "fieldtype": "Link", + "label": "Company", + "options": "Company", + "reqd": 1 } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2021-08-27 16:24:42.961967", + "migration_hash": "f39fb8f4e18a0e7fd391f0b4b52d8375", + "modified": "2021-11-01 13:10:36.759249", "modified_by": "Administrator", "module": "CRM", "name": "Prospect", + "naming_rule": "By fieldname", "owner": "Administrator", "permissions": [ { From a0727b2e824e5299a893197624872122e3d6eb74 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 1 Nov 2021 13:17:40 +0530 Subject: [PATCH 124/200] fix: pass company while fetching valuation rate If company is not supplied and valuation rate is 0, then default company is used for checking if perpetual inventory is enabled or not. This makes little sense as different companies can have different setting for perpetual inventory. --- erpnext/stock/stock_ledger.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index bdbec52f7e4..ce82f089d29 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -600,7 +600,7 @@ class update_entries_after(object): if not allow_zero_rate: self.wh_data.valuation_rate = get_valuation_rate(sle.item_code, sle.warehouse, sle.voucher_type, sle.voucher_no, self.allow_zero_rate, - currency=erpnext.get_company_currency(sle.company)) + currency=erpnext.get_company_currency(sle.company), company=sle.company) def get_incoming_value_for_serial_nos(self, sle, serial_nos): # get rate from serial nos within same company @@ -667,7 +667,7 @@ class update_entries_after(object): if not allow_zero_valuation_rate: self.wh_data.valuation_rate = get_valuation_rate(sle.item_code, sle.warehouse, sle.voucher_type, sle.voucher_no, self.allow_zero_rate, - currency=erpnext.get_company_currency(sle.company)) + currency=erpnext.get_company_currency(sle.company), company=sle.company) def get_fifo_values(self, sle): incoming_rate = flt(sle.incoming_rate) @@ -700,7 +700,7 @@ class update_entries_after(object): if not allow_zero_valuation_rate: _rate = get_valuation_rate(sle.item_code, sle.warehouse, sle.voucher_type, sle.voucher_no, self.allow_zero_rate, - currency=erpnext.get_company_currency(sle.company)) + currency=erpnext.get_company_currency(sle.company), company=sle.company) else: _rate = 0 From f7ffe04a4b0a65b02f20f6ca180a86c1d5a3874f Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 1 Nov 2021 13:21:14 +0530 Subject: [PATCH 125/200] fix: use warehouse to find company --- erpnext/stock/stock_ledger.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index ce82f089d29..70f4bcaef79 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -911,10 +911,11 @@ def get_sle_by_voucher_detail_no(voucher_detail_no, excluded_sle=None): def get_valuation_rate(item_code, warehouse, voucher_type, voucher_no, allow_zero_rate=False, currency=None, company=None, raise_error_if_no_rate=True): - # Get valuation rate from last sle for the same item and warehouse - if not company: - company = erpnext.get_default_company() + if not company: + company = frappe.get_cached_value("Warehouse", warehouse, "company") + + # Get valuation rate from last sle for the same item and warehouse last_valuation_rate = frappe.db.sql("""select valuation_rate from `tabStock Ledger Entry` force index (item_warehouse) where From 1eab3a44f6721dbbc0d8213147a57c0da68acf47 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 1 Nov 2021 14:16:57 +0530 Subject: [PATCH 126/200] fix(ux): stock levels take time after item merge Item merge creates a repost and depending on number of entries it can take from 1 to n hours for it to finish. (depending upon queued up reposts) Added message so users don't feel confused till this operation is finished. --- erpnext/stock/doctype/item/item.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index 04e4653d93c..fa42c7d934b 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -676,6 +676,8 @@ class Item(WebsiteGenerator): def after_rename(self, old_name, new_name, merge): if merge: self.validate_duplicate_item_in_stock_reconciliation(old_name, new_name) + frappe.msgprint(_("It can take upto few hours for accurate stock values to be visible after merging items."), + indicator="orange", title="Note") if self.route: invalidate_cache_for_item(self) From e2d866d6a2299aecac91ac49e4db8bb568c6d093 Mon Sep 17 00:00:00 2001 From: Smit Vora Date: Mon, 1 Nov 2021 15:55:19 +0530 Subject: [PATCH 127/200] fix: regional(India) `totalValue` for ewaybill --- erpnext/regional/india/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 1733220c0ac..dcb6481f9bd 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -446,7 +446,7 @@ def get_ewb_data(dt, dn): data = get_address_details(data, doc, company_address, billing_address, dispatch_address) data.itemList = [] - data.totalValue = doc.total + data.totalValue = doc.net_total data = get_item_list(data, doc, hsn_wise=True) From 27cbeb920e90f976145e8ca5c696dbd49bd7ec0d Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Sun, 26 Sep 2021 14:10:52 +0530 Subject: [PATCH 128/200] test(patch): run patch tests for major releases Run patch tests one at a time v10 db -> v12-> v13 -> .... -> frappe:corresponding base branch and PR. --- .github/workflows/patch.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index 92a19621d15..f8abb6c7741 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -86,4 +86,27 @@ jobs: cd ~/frappe-bench/ wget https://erpnext.com/files/v10-erpnext.sql.gz bench --site test_site --force restore ~/frappe-bench/v10-erpnext.sql.gz + + git -C "apps/frappe" remote set-url upstream https://github.com/frappe/frappe.git + git -C "apps/erpnext" remote set-url upstream https://github.com/frappe/erpnext.git + + for version in $(seq 12 13) + do + echo "Updating to v$version" + branch_name="version-$version" + + git -C "apps/frappe" fetch --depth 1 upstream $branch_name:$branch_name + git -C "apps/erpnext" fetch --depth 1 upstream $branch_name:$branch_name + + git -C "apps/frappe" checkout -q -f $branch_name + git -C "apps/erpnext" checkout -q -f $branch_name + + bench setup requirements --python + bench --site test_site migrate + done + + + echo "Updating to latest version" + git -C "apps/frappe" checkout -q -f "${GITHUB_BASE_REF:-${GITHUB_REF##*/}}" + git -C "apps/erpnext" checkout -q -f "$GITHUB_SHA" bench --site test_site migrate From c587f18735336e93edee1e4e1cd85413a74cb82a Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Tue, 2 Nov 2021 12:09:41 +0530 Subject: [PATCH 129/200] chore: migrate docker to github actions --- .github/workflows/docker-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 4b1147e79f9..21ba981df44 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -11,4 +11,4 @@ jobs: - name: curl run: | apk add curl bash - curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "Travis-API-Version: 3" -H "Authorization: token ${{ secrets.TRAVIS_CI_TOKEN }}" -d '{"request":{"branch":"master"}}' https://api.travis-ci.com/repo/frappe%2Ffrappe_docker/requests + curl -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${{ secrets.GITHUB_PAT }}" https://api.github.com/repos/frappe/frappe_docker/actions/workflows/build_stable.yml/dispatches -d '{"ref":"main"}' From 530a0f481e8901d2b525a54c663251a477cc3758 Mon Sep 17 00:00:00 2001 From: Anupam Date: Tue, 2 Nov 2021 12:39:13 +0530 Subject: [PATCH 130/200] fix: added testcase --- erpnext/manufacturing/doctype/work_order/test_work_order.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index 85b5bfb9bfc..dc817296816 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -14,6 +14,7 @@ from erpnext.manufacturing.doctype.work_order.work_order import ( StockOverProductionError, make_stock_entry, stop_unstop, + close_work_order, ) from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order from erpnext.stock.doctype.item.test_item import create_item, make_item @@ -800,6 +801,10 @@ class TestWorkOrder(unittest.TestCase): if row.is_scrap_item: self.assertEqual(row.qty, 1) + def test_close_work_order(self): + close_work_order(self.wo_order.name, "Stopped") + self.assertEqual(self.wo_order.status, "Closed") + def update_job_card(job_card): job_card_doc = frappe.get_doc('Job Card', job_card) job_card_doc.set('scrap_items', [ From 59e4fd980c1c411f82df1f588bc2c80e17d8e317 Mon Sep 17 00:00:00 2001 From: Anupam Date: Tue, 2 Nov 2021 12:46:00 +0530 Subject: [PATCH 131/200] fix: linter issues --- erpnext/manufacturing/doctype/work_order/test_work_order.py | 2 +- erpnext/manufacturing/doctype/work_order/work_order.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index dc817296816..f5851dae36c 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -12,9 +12,9 @@ from erpnext.manufacturing.doctype.work_order.work_order import ( ItemHasVariantError, OverProductionError, StockOverProductionError, + close_work_order, make_stock_entry, stop_unstop, - close_work_order, ) from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order from erpnext.stock.doctype.item.test_item import create_item, make_item diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 48703bc621b..36dae99a691 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1011,6 +1011,7 @@ def close_work_order(work_order, status): work_order = frappe.get_doc("Work Order", work_order) if work_order.get("operations"): + job_cards = frappe.get_list("Job Card", filters={ "work_order": work_order.name, From e36da4d13749afd0fb0e1523aa6d2ecc33ab730c Mon Sep 17 00:00:00 2001 From: Anupam Date: Tue, 2 Nov 2021 12:53:00 +0530 Subject: [PATCH 132/200] fix: linter issues --- erpnext/manufacturing/doctype/work_order/work_order.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 36dae99a691..0090f4d04ee 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -1011,8 +1011,7 @@ def close_work_order(work_order, status): work_order = frappe.get_doc("Work Order", work_order) if work_order.get("operations"): - - job_cards = frappe.get_list("Job Card", + job_cards = frappe.get_list("Job Card", filters={ "work_order": work_order.name, "status": "Work In Progress" From 048210a8f67fe0544216361d7342619581318570 Mon Sep 17 00:00:00 2001 From: marination Date: Tue, 2 Nov 2021 15:49:58 +0530 Subject: [PATCH 133/200] fix: Remove warehouse filter on Batch field for Material Receipt --- erpnext/stock/doctype/stock_entry/stock_entry.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index ac8303eda3d..80203a9ef47 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -88,7 +88,9 @@ frappe.ui.form.on('Stock Entry', { } } - filters["warehouse"] = item.s_warehouse || item.t_warehouse; + if (frm.doc.purpose != "Material Receipt") { + filters["warehouse"] = item.s_warehouse || item.t_warehouse; + } return { query : "erpnext.controllers.queries.get_batch_no", From 48886ee70524132d1f4cf6751b56ccbc96d765a5 Mon Sep 17 00:00:00 2001 From: marination Date: Tue, 2 Nov 2021 15:57:41 +0530 Subject: [PATCH 134/200] chore: Add comment above fix for future reference --- erpnext/stock/doctype/stock_entry/stock_entry.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 80203a9ef47..c4b8131305e 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -88,6 +88,8 @@ frappe.ui.form.on('Stock Entry', { } } + // User could want to select a manually created empty batch (no warehouse) + // or a pre-existing batch if (frm.doc.purpose != "Material Receipt") { filters["warehouse"] = item.s_warehouse || item.t_warehouse; } From d72709dd817b879fa3bac2387689e0a9d4728e8f Mon Sep 17 00:00:00 2001 From: Anuja Pawar <60467153+Anuja-pawar@users.noreply.github.com> Date: Tue, 2 Nov 2021 16:28:46 +0530 Subject: [PATCH 135/200] fix(Payment Entry): splitting outstanding rows as per payment terms (#27946) --- .../doctype/payment_entry/payment_entry.py | 44 +++++++++++-------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 9b4a91d4e96..8bbe3db914f 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -389,7 +389,7 @@ class PaymentEntry(AccountsController): invoice_paid_amount_map[invoice_key]['outstanding'] = term.outstanding invoice_paid_amount_map[invoice_key]['discounted_amt'] = ref.total_amount * (term.discount / 100) - for key, allocated_amount in iteritems(invoice_payment_amount_map): + for idx, (key, allocated_amount) in enumerate(iteritems(invoice_payment_amount_map), 1): if not invoice_paid_amount_map.get(key): frappe.throw(_('Payment term {0} not used in {1}').format(key[0], key[1])) @@ -407,7 +407,7 @@ class PaymentEntry(AccountsController): (allocated_amount - discounted_amt, discounted_amt, allocated_amount, key[1], key[0])) else: if allocated_amount > outstanding: - frappe.throw(_('Cannot allocate more than {0} against payment term {1}').format(outstanding, key[0])) + frappe.throw(_('Row #{0}: Cannot allocate more than {1} against payment term {2}').format(idx, outstanding, key[0])) if allocated_amount and outstanding: frappe.db.sql(""" @@ -1053,12 +1053,6 @@ def get_outstanding_reference_documents(args): party_account_currency = get_account_currency(args.get("party_account")) company_currency = frappe.get_cached_value('Company', args.get("company"), "default_currency") - # Get negative outstanding sales /purchase invoices - negative_outstanding_invoices = [] - if args.get("party_type") not in ["Student", "Employee"] and not args.get("voucher_no"): - negative_outstanding_invoices = get_negative_outstanding_invoices(args.get("party_type"), args.get("party"), - args.get("party_account"), args.get("company"), party_account_currency, company_currency) - # Get positive outstanding sales /purchase invoices/ Fees condition = "" if args.get("voucher_type") and args.get("voucher_no"): @@ -1105,6 +1099,12 @@ def get_outstanding_reference_documents(args): orders_to_be_billed = get_orders_to_be_billed(args.get("posting_date"),args.get("party_type"), args.get("party"), args.get("company"), party_account_currency, company_currency, filters=args) + # Get negative outstanding sales /purchase invoices + negative_outstanding_invoices = [] + if args.get("party_type") not in ["Student", "Employee"] and not args.get("voucher_no"): + negative_outstanding_invoices = get_negative_outstanding_invoices(args.get("party_type"), args.get("party"), + args.get("party_account"), party_account_currency, company_currency, condition=condition) + data = negative_outstanding_invoices + outstanding_invoices + orders_to_be_billed if not data: @@ -1137,22 +1137,26 @@ def split_invoices_based_on_payment_terms(outstanding_invoices): 'invoice_amount': flt(d.invoice_amount), 'outstanding_amount': flt(d.outstanding_amount), 'payment_amount': payment_term.payment_amount, - 'payment_term': payment_term.payment_term, - 'allocated_amount': payment_term.outstanding + 'payment_term': payment_term.payment_term })) + outstanding_invoices_after_split = [] if invoice_ref_based_on_payment_terms: for idx, ref in invoice_ref_based_on_payment_terms.items(): - voucher_no = outstanding_invoices[idx]['voucher_no'] - voucher_type = outstanding_invoices[idx]['voucher_type'] + voucher_no = ref[0]['voucher_no'] + voucher_type = ref[0]['voucher_type'] - frappe.msgprint(_("Spliting {} {} into {} rows as per payment terms").format( + frappe.msgprint(_("Spliting {} {} into {} row(s) as per Payment Terms").format( voucher_type, voucher_no, len(ref)), alert=True) - outstanding_invoices.pop(idx - 1) - outstanding_invoices += invoice_ref_based_on_payment_terms[idx] + outstanding_invoices_after_split += invoice_ref_based_on_payment_terms[idx] - return outstanding_invoices + existing_row = list(filter(lambda x: x.get('voucher_no') == voucher_no, outstanding_invoices)) + index = outstanding_invoices.index(existing_row[0]) + outstanding_invoices.pop(index) + + outstanding_invoices_after_split += outstanding_invoices + return outstanding_invoices_after_split def get_orders_to_be_billed(posting_date, party_type, party, company, party_account_currency, company_currency, cost_center=None, filters=None): @@ -1219,7 +1223,7 @@ def get_orders_to_be_billed(posting_date, party_type, party, return order_list def get_negative_outstanding_invoices(party_type, party, party_account, - company, party_account_currency, company_currency, cost_center=None): + party_account_currency, company_currency, cost_center=None, condition=None): voucher_type = "Sales Invoice" if party_type == "Customer" else "Purchase Invoice" supplier_condition = "" if voucher_type == "Purchase Invoice": @@ -1241,19 +1245,21 @@ def get_negative_outstanding_invoices(party_type, party, party_account, `tab{voucher_type}` where {party_type} = %s and {party_account} = %s and docstatus = 1 and - company = %s and outstanding_amount < 0 + outstanding_amount < 0 {supplier_condition} + {condition} order by posting_date, name """.format(**{ "supplier_condition": supplier_condition, + "condition": condition, "rounded_total_field": rounded_total_field, "grand_total_field": grand_total_field, "voucher_type": voucher_type, "party_type": scrub(party_type), "party_account": "debit_to" if party_type == "Customer" else "credit_to", "cost_center": cost_center - }), (party, party_account, company), as_dict=True) + }), (party, party_account), as_dict=True) @frappe.whitelist() From f047c6ffc80775789be50707d9a1c0320c87a4fe Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Tue, 2 Nov 2021 16:43:31 +0530 Subject: [PATCH 136/200] fix: Test for WDV --- erpnext/assets/doctype/asset/test_asset.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 81c679f851b..170122527a5 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -563,10 +563,16 @@ class TestDepreciationMethods(AssetSetup): company_flag = frappe.flags.company frappe.flags.company = "_Test Company" + finance_book = frappe.new_doc("Finance Book") + finance_book.finance_book_name = "Income Tax" + finance_book.for_income_tax = 1 + finance_book.insert(ignore_if_duplicate = True) + asset = create_asset( calculate_depreciation = 1, available_for_use_date = "2030-07-12", purchase_date = "2030-01-01", + finance_book = finance_book.name, depreciation_method = "Written Down Value", expected_value_after_useful_life = 12500, depreciation_start_date = "2030-12-31", From 890a7868584db345028420c4148e41dc0f33cbe3 Mon Sep 17 00:00:00 2001 From: hrwx Date: Mon, 1 Nov 2021 14:16:51 +0000 Subject: [PATCH 137/200] fix: do not generate multiple invoices --- .../doctype/subscription/subscription.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/subscription/subscription.py b/erpnext/accounts/doctype/subscription/subscription.py index de9550233f9..b75530c4b01 100644 --- a/erpnext/accounts/doctype/subscription/subscription.py +++ b/erpnext/accounts/doctype/subscription/subscription.py @@ -502,9 +502,11 @@ class Subscription(Document): # Check invoice dates and make sure it doesn't have outstanding invoices return getdate() >= getdate(self.current_invoice_start) - def is_current_invoice_generated(self): + def is_current_invoice_generated(self, _current_start_date=None, _current_end_date=None): invoice = self.get_current_invoice() - _current_start_date, _current_end_date = self.update_subscription_period(date=add_days(self.current_invoice_end, 1), return_date=True) + + if not (_current_start_date and _current_end_date): + _current_start_date, _current_end_date = self.update_subscription_period(date=add_days(self.current_invoice_end, 1), return_date=True) if invoice and getdate(_current_start_date) <= getdate(invoice.posting_date) <= getdate(_current_end_date): return True @@ -523,7 +525,9 @@ class Subscription(Document): if getdate() > getdate(self.current_invoice_end) and self.is_prepaid_to_invoice(): self.update_subscription_period(add_days(self.current_invoice_end, 1)) - if not self.is_current_invoice_generated() and (self.is_postpaid_to_invoice() or self.is_prepaid_to_invoice()): + if not self.is_current_invoice_generated(self.current_invoice_start, self.current_invoice_end) \ + and (self.is_postpaid_to_invoice() or self.is_prepaid_to_invoice()): + prorate = frappe.db.get_single_value('Subscription Settings', 'prorate') self.generate_invoice(prorate) @@ -560,8 +564,10 @@ class Subscription(Document): self.set_status_grace_period() # Generate invoices periodically even if current invoice are unpaid - if self.generate_new_invoices_past_due_date and not self.is_current_invoice_generated() and (self.is_postpaid_to_invoice() - or self.is_prepaid_to_invoice()): + if self.generate_new_invoices_past_due_date and not \ + self.is_current_invoice_generated(self.current_invoice_start, self.current_invoice_end) \ + and (self.is_postpaid_to_invoice() or self.is_prepaid_to_invoice()): + prorate = frappe.db.get_single_value('Subscription Settings', 'prorate') self.generate_invoice(prorate) From 7681600b5e6e2421dfdfee39661aaf87d8327e3b Mon Sep 17 00:00:00 2001 From: Saqib Date: Tue, 2 Nov 2021 17:47:44 +0530 Subject: [PATCH 138/200] fix: test wdv method for indian region --- erpnext/assets/doctype/asset/test_asset.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index 170122527a5..f162d9f39dc 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -1030,6 +1030,7 @@ def create_asset(**args): if asset.calculate_depreciation: asset.append("finance_books", { + "finance_book": args.finance_book, "depreciation_method": args.depreciation_method or "Straight Line", "frequency_of_depreciation": args.frequency_of_depreciation or 12, "total_number_of_depreciations": args.total_number_of_depreciations or 5, From 857d87da97d230367e1e5ac1e3fe8baa13b8130a Mon Sep 17 00:00:00 2001 From: Noah Jacob Date: Tue, 2 Nov 2021 17:52:45 +0530 Subject: [PATCH 139/200] fix: replaced "=" with "in" for multiple statuses in query #28193 fix: replaced "=" with "in" for multiple statuses in query --- .../purchase_order_analysis/purchase_order_analysis.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py index 1b25dd45d2d..a566d568119 100644 --- a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py +++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py @@ -41,10 +41,13 @@ def get_conditions(filters): if filters.get("from_date") and filters.get("to_date"): conditions += " and po.transaction_date between %(from_date)s and %(to_date)s" - for field in ['company', 'name', 'status']: + for field in ['company', 'name']: if filters.get(field): conditions += f" and po.{field} = %({field})s" + if filters.get('status'): + conditions += " and po.status in %(status)s" + if filters.get('project'): conditions += " and poi.project = %(project)s" From 734b57deec069fc3f573604c60a3157da81eff45 Mon Sep 17 00:00:00 2001 From: marination Date: Tue, 2 Nov 2021 18:34:55 +0530 Subject: [PATCH 140/200] fix: Serial Nos not set in the row after scanning in popup - Avoid whitspaces while calculating length of serial nos --- erpnext/selling/sales_common.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index ddd4c4e6a5a..a86e60494e8 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -206,8 +206,10 @@ erpnext.selling.SellingController = class SellingController extends erpnext.Tran var me = this; var item = frappe.get_doc(cdt, cdn); - if (item.serial_no && item.qty === item.serial_no.split(`\n`).length) { - return; + // check if serial nos entered are as much as qty in row + if (item.serial_no) { + let serial_nos = item.serial_no.split(`\n`).filter(sn => sn.trim()); // filter out whitespaces + if (item.qty === serial_nos.length) return; } if (item.serial_no && !item.batch_no) { From 66348e1a035d98e91cb7228e9bd2b7286c5cc274 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Tue, 2 Nov 2021 20:26:40 +0530 Subject: [PATCH 141/200] fix: Error on LDC creation --- .../lower_deduction_certificate/lower_deduction_certificate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.py b/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.py index 7afbc00980c..821e0171bbd 100644 --- a/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.py +++ b/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.py @@ -31,7 +31,7 @@ class LowerDeductionCertificate(Document): <= fiscal_year.year_end_date): frappe.throw(_("Valid Upto date not in Fiscal Year {0}").format(frappe.bold(self.fiscal_year))) - def tax_withholding_category(self): + def validate_supplier_against_tax_category(self): duplicate_certificate = frappe.db.get_value('Lower Deduction Certificate', {'supplier': self.supplier, 'tax_withholding_category': self.tax_withholding_category, 'name': ("!=", self.name)}, ['name', 'valid_from', 'valid_upto'], as_dict=True) From 9c0906f1b51431f67c3bc009a1410e1129a80744 Mon Sep 17 00:00:00 2001 From: Anupam Date: Tue, 2 Nov 2021 20:43:00 +0530 Subject: [PATCH 142/200] fix: test cases --- erpnext/manufacturing/doctype/work_order/test_work_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index f5851dae36c..b6a8700baca 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -802,7 +802,7 @@ class TestWorkOrder(unittest.TestCase): self.assertEqual(row.qty, 1) def test_close_work_order(self): - close_work_order(self.wo_order.name, "Stopped") + close_work_order(self.wo_order.name, "Closed") self.assertEqual(self.wo_order.status, "Closed") def update_job_card(job_card): From f2fbcc81249f0c36a8188bcd09095b48b3e933e1 Mon Sep 17 00:00:00 2001 From: Anuja Pawar Date: Tue, 2 Nov 2021 23:29:06 +0530 Subject: [PATCH 143/200] fix: sider --- erpnext/regional/india/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 99ea53d9430..102e84f9179 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -81,7 +81,7 @@ def update_gst_category(doc, method): for link in doc.links: if link.link_doctype in ['Customer', 'Supplier']: if doc.get('gstin'): - frappe.db.set_value(link.link_doctype, { 'name': link.link_name, 'gst_category': 'Unregistered' }, 'gst_category', 'Registered Regular') + frappe.db.set_value(link.link_doctype, {'name': link.link_name, 'gst_category': 'Unregistered'}, 'gst_category', 'Registered Regular') def set_gst_state_and_state_number(doc): if not doc.gst_state: From 9b4c7e479650851228181cdf562647364ba51cf9 Mon Sep 17 00:00:00 2001 From: Anupam Date: Wed, 3 Nov 2021 13:27:50 +0530 Subject: [PATCH 144/200] fix: validate job card --- .../doctype/job_card/job_card.js | 5 +++ .../doctype/job_card/job_card.py | 14 +++++++ .../doctype/work_order/test_work_order.py | 39 ++++++++++++++++++- 3 files changed, 56 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.js b/erpnext/manufacturing/doctype/job_card/job_card.js index 35be38813e5..df35028ca72 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.js +++ b/erpnext/manufacturing/doctype/job_card/job_card.js @@ -28,6 +28,11 @@ frappe.ui.form.on('Job Card', { frappe.flags.resume_job = 0; let has_items = frm.doc.items && frm.doc.items.length; + if (frm.doc.__onload.work_order_stopped) { + frm.disable_save(); + return + } + if (!frm.doc.__islocal && has_items && frm.doc.docstatus < 2) { let to_request = frm.doc.for_quantity > frm.doc.transferred_qty; let excess_transfer_allowed = frm.doc.__onload.job_card_excess_transfer; diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index e1d79be81c4..dd1df20216b 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -37,6 +37,7 @@ class JobCard(Document): def onload(self): excess_transfer = frappe.db.get_single_value("Manufacturing Settings", "job_card_excess_transfer") self.set_onload("job_card_excess_transfer", excess_transfer) + self.set_onload("work_order_stopped", self.is_work_order_stopped()) def validate(self): self.validate_time_logs() @@ -45,6 +46,7 @@ class JobCard(Document): self.validate_sequence_id() self.set_sub_operations() self.update_sub_operation_status() + self.validate_work_order() def set_sub_operations(self): if self.operation: @@ -549,6 +551,18 @@ class JobCard(Document): frappe.throw(_("{0}, complete the operation {1} before the operation {2}.") .format(message, bold(row.operation), bold(self.operation)), OperationSequenceError) + def validate_work_order(self): + if self.is_work_order_stopped(): + frappe.throw(_("You can't make any changes to Job Card since Work Order is stopped.")) + + def is_work_order_stopped(self): + if self.work_order: + status = frappe.get_value('Work Order', self.work_order) + + if status == "Closed": + return True + + return False @frappe.whitelist() def make_time_log(args): diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index b6a8700baca..3dbbf317576 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -802,8 +802,43 @@ class TestWorkOrder(unittest.TestCase): self.assertEqual(row.qty, 1) def test_close_work_order(self): - close_work_order(self.wo_order.name, "Closed") - self.assertEqual(self.wo_order.status, "Closed") + items = ['Test FG Item for Closed WO', 'Test RM Item 1 for Closed WO', + 'Test RM Item 2 for Closed WO'] + + company = '_Test Company with perpetual inventory' + for item_code in items: + create_item(item_code = item_code, is_stock_item = 1, + is_purchase_item=1, opening_stock=100, valuation_rate=10, company=company, warehouse='Stores - TCP1') + + item = 'Test FG Item for Closed WO' + raw_materials = ['Test RM Item 1 for Closed WO', 'Test RM Item 2 for Closed WO'] + if not frappe.db.get_value('BOM', {'item': item}): + bom = make_bom(item=item, source_warehouse='Stores - TCP1', raw_materials=raw_materials, do_not_save=True) + bom.with_operations = 1 + bom.append('operations', { + 'operation': '_Test Operation 1', + 'workstation': '_Test Workstation 1', + 'hour_rate': 20, + 'time_in_mins': 60 + }) + + bom.submit() + + wo_order = make_wo_order_test_record(item=item, company=company, planned_start_date=now(), qty=20, skip_transfer=1) + job_cards = frappe.db.get_value('Job Card', {'work_order': wo_order.name}, 'name') + + for jc in job_cards: + job_card_doc = frappe.get_doc('Job Card', jc) + job_card_doc.append('time_logs', { + 'from_time': now(), + 'time_in_mins': 60, + 'completed_qty': job_card_doc.for_quantity + }) + + job_card_doc.submit() + + close_work_order(wo_order, "Closed") + self.assertEqual(wo_order.get('status'), "Closed") def update_job_card(job_card): job_card_doc = frappe.get_doc('Job Card', job_card) From ba47bd02b6999411736aa864303a181addc225f3 Mon Sep 17 00:00:00 2001 From: Anupam Date: Wed, 3 Nov 2021 13:41:22 +0530 Subject: [PATCH 145/200] fix: sider isuue --- erpnext/manufacturing/doctype/job_card/job_card.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.js b/erpnext/manufacturing/doctype/job_card/job_card.js index df35028ca72..e3eed92d7e1 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.js +++ b/erpnext/manufacturing/doctype/job_card/job_card.js @@ -30,7 +30,7 @@ frappe.ui.form.on('Job Card', { if (frm.doc.__onload.work_order_stopped) { frm.disable_save(); - return + return; } if (!frm.doc.__islocal && has_items && frm.doc.docstatus < 2) { From c2697bca76318ff4a5839df2dcb4743af2ef196c Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Wed, 3 Nov 2021 13:52:37 +0530 Subject: [PATCH 146/200] ci: change GITHUB_PAT to CI_PAT --- .github/workflows/docker-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 21ba981df44..5b607a99406 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -11,4 +11,4 @@ jobs: - name: curl run: | apk add curl bash - curl -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${{ secrets.GITHUB_PAT }}" https://api.github.com/repos/frappe/frappe_docker/actions/workflows/build_stable.yml/dispatches -d '{"ref":"main"}' + curl -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${{ secrets.CI_PAT }}" https://api.github.com/repos/frappe/frappe_docker/actions/workflows/build_stable.yml/dispatches -d '{"ref":"main"}' From cc15cf6ae2915ba01188a36c427ab19d7fd89e2b Mon Sep 17 00:00:00 2001 From: Anupam Date: Wed, 3 Nov 2021 13:54:46 +0530 Subject: [PATCH 147/200] fix: linter isuue --- erpnext/manufacturing/doctype/work_order/test_work_order.py | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index 3dbbf317576..4f675077553 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -826,7 +826,6 @@ class TestWorkOrder(unittest.TestCase): wo_order = make_wo_order_test_record(item=item, company=company, planned_start_date=now(), qty=20, skip_transfer=1) job_cards = frappe.db.get_value('Job Card', {'work_order': wo_order.name}, 'name') - for jc in job_cards: job_card_doc = frappe.get_doc('Job Card', jc) job_card_doc.append('time_logs', { From cb064b06adb5c82ec021ad2e005102f50da60fef Mon Sep 17 00:00:00 2001 From: Noah Jacob Date: Wed, 3 Nov 2021 17:23:57 +0530 Subject: [PATCH 148/200] fix: added job_card_item link in material request (#28222) * fix: added job_card_item links in material request * fix: add no copy to row references --- erpnext/manufacturing/doctype/job_card/job_card.py | 3 ++- .../doctype/material_request/material_request.py | 3 ++- .../material_request_item/material_request_item.json | 12 +++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index e1d79be81c4..b3b94071f0b 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -605,7 +605,8 @@ def make_material_request(source_name, target_doc=None): "doctype": "Material Request Item", "field_map": { "required_qty": "qty", - "uom": "stock_uom" + "uom": "stock_uom", + "name": "job_card_item" }, "postprocess": update_item, } diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py index 17df9777b19..ec01cae2567 100644 --- a/erpnext/stock/doctype/material_request/material_request.py +++ b/erpnext/stock/doctype/material_request/material_request.py @@ -502,7 +502,8 @@ def make_stock_entry(source_name, target_doc=None): "field_map": { "name": "material_request_item", "parent": "material_request", - "uom": "stock_uom" + "uom": "stock_uom", + "job_card_item": "job_card_item" }, "postprocess": update_item, "condition": lambda doc: doc.ordered_qty < doc.stock_qty diff --git a/erpnext/stock/doctype/material_request_item/material_request_item.json b/erpnext/stock/doctype/material_request_item/material_request_item.json index 25bbbbd4b3e..2bad42a0ebb 100644 --- a/erpnext/stock/doctype/material_request_item/material_request_item.json +++ b/erpnext/stock/doctype/material_request_item/material_request_item.json @@ -52,6 +52,7 @@ "sales_order_item", "production_plan", "material_request_plan_item", + "job_card_item", "col_break4", "expense_account", "section_break_46", @@ -444,16 +445,25 @@ { "fieldname": "qty_info_col_break", "fieldtype": "Column Break" + }, + { + "fieldname": "job_card_item", + "fieldtype": "Data", + "hidden": 1, + "no_copy": 1, + "print_hide": 1, + "label": "Job Card Item" } ], "idx": 1, "index_web_pages_for_search": 1, "istable": 1, "links": [], - "modified": "2020-10-02 11:44:36.553064", + "modified": "2021-11-03 14:40:24.409826", "modified_by": "Administrator", "module": "Stock", "name": "Material Request Item", + "naming_rule": "Random", "owner": "Administrator", "permissions": [], "sort_field": "modified", From 7044ae5e39669a0edf59f3abd19b5b52e1de233b Mon Sep 17 00:00:00 2001 From: Anupam Date: Wed, 3 Nov 2021 17:41:04 +0530 Subject: [PATCH 149/200] fix: testcases: --- erpnext/manufacturing/doctype/work_order/test_work_order.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index 4f675077553..c3f3917b5c8 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -826,6 +826,7 @@ class TestWorkOrder(unittest.TestCase): wo_order = make_wo_order_test_record(item=item, company=company, planned_start_date=now(), qty=20, skip_transfer=1) job_cards = frappe.db.get_value('Job Card', {'work_order': wo_order.name}, 'name') + self.assertEqual(len(job_cards), len(bom.operations)) for jc in job_cards: job_card_doc = frappe.get_doc('Job Card', jc) job_card_doc.append('time_logs', { From b7a44fe0a3e9756eef5ac9000913b0e7d7b86db0 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Wed, 3 Nov 2021 18:17:31 +0530 Subject: [PATCH 150/200] perf: improve financial statement loading time --- erpnext/accounts/report/financial_statements.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 2cb8a6802a7..352b1c8392f 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -425,8 +425,7 @@ def set_gl_entries_by_account( {additional_conditions} and posting_date <= %(to_date)s and is_cancelled = 0 - {distributed_cost_center_query} - order by account, posting_date""".format( + {distributed_cost_center_query}""".format( additional_conditions=additional_conditions, distributed_cost_center_query=distributed_cost_center_query), gl_filters, as_dict=True) #nosec From 114028e473caff6e766347d377cf41c5572c3827 Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Thu, 4 Nov 2021 17:14:24 +0100 Subject: [PATCH 151/200] feat: replace newline in remarks (DATEV report) (#28152) --- erpnext/regional/report/datev/datev.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/regional/report/datev/datev.py b/erpnext/regional/report/datev/datev.py index c46c0df22c7..5acf1da7125 100644 --- a/erpnext/regional/report/datev/datev.py +++ b/erpnext/regional/report/datev/datev.py @@ -351,7 +351,7 @@ def run_query(filters, extra_fields, extra_joins, extra_filters, as_dict=1): gl.posting_date as 'Belegdatum', gl.voucher_no as 'Belegfeld 1', - LEFT(gl.remarks, 60) as 'Buchungstext', + REPLACE(LEFT(gl.remarks, 60), '\n', ' ') as 'Buchungstext', gl.voucher_type as 'Beleginfo - Art 1', gl.voucher_no as 'Beleginfo - Inhalt 1', gl.against_voucher_type as 'Beleginfo - Art 2', From 25f647f067a204c84a7eaed8f435b32596d51fb3 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 4 Nov 2021 21:46:48 +0530 Subject: [PATCH 152/200] fix: Bulk update of valid upto field wasn't working (bp #28242) * fix: Bulk update of valid upto field wasn't working Check in dates for the price list was failing because valid_upto field was string. Converting to date fixed the problem. * chore: extend fix and cleanup whitespace Co-authored-by: Ankush Menat (cherry picked from commit 95a5ef1d416d54ecf0f557586b341b0dce2a0b05) Co-authored-by: fatihustaoglu <46131068+fatihustaoglu@users.noreply.github.com> --- erpnext/stock/doctype/item_price/item_price.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/item_price/item_price.py b/erpnext/stock/doctype/item_price/item_price.py index 3f0fc4136b0..197b147e7ee 100644 --- a/erpnext/stock/doctype/item_price/item_price.py +++ b/erpnext/stock/doctype/item_price/item_price.py @@ -6,6 +6,7 @@ from __future__ import unicode_literals import frappe from frappe import _ from frappe.model.document import Document +from frappe.utils import getdate class ItemPriceDuplicateItem(frappe.ValidationError): @@ -27,7 +28,7 @@ class ItemPrice(Document): def validate_dates(self): if self.valid_from and self.valid_upto: - if self.valid_from > self.valid_upto: + if getdate(self.valid_from) > getdate(self.valid_upto): frappe.throw(_("Valid From Date must be lesser than Valid Upto Date.")) def update_price_list_details(self): From 6098e92ba94a4dc30e7b9dd7df2f68b4d84b7207 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Thu, 4 Nov 2021 18:43:44 +0530 Subject: [PATCH 153/200] chore: remove utf-8 compat code --- erpnext/__init__.py | 2 -- .../account_balance_timeline/account_balance_timeline.py | 1 - erpnext/accounts/deferred_revenue.py | 1 - erpnext/accounts/doctype/__init__.py | 1 - erpnext/accounts/doctype/account/__init__.py | 1 - erpnext/accounts/doctype/account/account.py | 1 - .../doctype/account/chart_of_accounts/chart_of_accounts.py | 1 - .../doctype/account/chart_of_accounts/import_from_openerp.py | 1 - .../chart_of_accounts/verified/standard_chart_of_accounts.py | 1 - .../verified/standard_chart_of_accounts_with_account_number.py | 1 - erpnext/accounts/doctype/account/test_account.py | 1 - .../doctype/accounting_dimension/accounting_dimension.py | 2 -- .../doctype/accounting_dimension/test_accounting_dimension.py | 2 -- .../accounting_dimension_detail/accounting_dimension_detail.py | 2 -- .../accounting_dimension_filter/accounting_dimension_filter.py | 2 -- .../test_accounting_dimension_filter.py | 2 -- .../accounts/doctype/accounting_period/accounting_period.py | 2 -- .../doctype/accounting_period/test_accounting_period.py | 2 -- .../accounts/doctype/accounts_settings/accounts_settings.py | 1 - .../doctype/accounts_settings/test_accounts_settings.py | 1 - .../advance_taxes_and_charges/advance_taxes_and_charges.py | 2 -- .../accounts/doctype/allowed_dimension/allowed_dimension.py | 2 -- .../allowed_to_transact_with/allowed_to_transact_with.py | 2 -- .../doctype/applicable_on_account/applicable_on_account.py | 2 -- erpnext/accounts/doctype/bank/bank.py | 2 -- erpnext/accounts/doctype/bank/bank_dashboard.py | 1 - erpnext/accounts/doctype/bank/test_bank.py | 2 -- erpnext/accounts/doctype/bank_account/bank_account.py | 2 -- .../accounts/doctype/bank_account/bank_account_dashboard.py | 1 - erpnext/accounts/doctype/bank_account/test_bank_account.py | 2 -- .../doctype/bank_account_subtype/bank_account_subtype.py | 2 -- .../doctype/bank_account_subtype/test_bank_account_subtype.py | 2 -- .../accounts/doctype/bank_account_type/bank_account_type.py | 2 -- .../doctype/bank_account_type/test_bank_account_type.py | 2 -- erpnext/accounts/doctype/bank_clearance/bank_clearance.py | 1 - erpnext/accounts/doctype/bank_clearance/test_bank_clearance.py | 2 -- erpnext/accounts/doctype/bank_clearance_detail/__init__.py | 1 - .../doctype/bank_clearance_detail/bank_clearance_detail.py | 1 - erpnext/accounts/doctype/bank_guarantee/bank_guarantee.py | 2 -- erpnext/accounts/doctype/bank_guarantee/test_bank_guarantee.py | 2 -- .../bank_reconciliation_tool/bank_reconciliation_tool.py | 2 -- .../bank_reconciliation_tool/test_bank_reconciliation_tool.py | 2 -- .../doctype/bank_statement_import/bank_statement_import.py | 2 -- .../bank_statement_import/test_bank_statement_import.py | 2 -- erpnext/accounts/doctype/bank_transaction/bank_transaction.py | 2 -- .../doctype/bank_transaction/bank_transaction_upload.py | 2 -- .../accounts/doctype/bank_transaction/test_bank_transaction.py | 2 -- .../bank_transaction_mapping/bank_transaction_mapping.py | 2 -- .../bank_transaction_payments/bank_transaction_payments.py | 2 -- erpnext/accounts/doctype/budget/budget.py | 2 -- erpnext/accounts/doctype/budget/test_budget.py | 2 -- erpnext/accounts/doctype/budget_account/budget_account.py | 2 -- erpnext/accounts/doctype/c_form/__init__.py | 1 - erpnext/accounts/doctype/c_form/c_form.py | 1 - erpnext/accounts/doctype/c_form/test_c_form.py | 2 -- erpnext/accounts/doctype/c_form_invoice_detail/__init__.py | 1 - .../doctype/c_form_invoice_detail/c_form_invoice_detail.py | 1 - erpnext/accounts/doctype/cash_flow_mapper/cash_flow_mapper.py | 2 -- .../doctype/cash_flow_mapper/default_cash_flow_mapper.py | 1 - .../accounts/doctype/cash_flow_mapper/test_cash_flow_mapper.py | 2 -- .../accounts/doctype/cash_flow_mapping/cash_flow_mapping.py | 2 -- .../doctype/cash_flow_mapping/test_cash_flow_mapping.py | 2 -- .../cash_flow_mapping_accounts/cash_flow_mapping_accounts.py | 2 -- .../cash_flow_mapping_template/cash_flow_mapping_template.py | 2 -- .../test_cash_flow_mapping_template.py | 2 -- .../cash_flow_mapping_template_details.py | 2 -- .../test_cash_flow_mapping_template_details.py | 2 -- erpnext/accounts/doctype/cashier_closing/cashier_closing.py | 2 -- .../accounts/doctype/cashier_closing/test_cashier_closing.py | 2 -- .../cashier_closing_payments/cashier_closing_payments.py | 2 -- .../chart_of_accounts_importer/chart_of_accounts_importer.py | 2 -- .../test_chart_of_accounts_importer.py | 2 -- .../doctype/cheque_print_template/cheque_print_template.py | 2 -- .../cheque_print_template/test_cheque_print_template.py | 2 -- erpnext/accounts/doctype/closed_document/closed_document.py | 2 -- erpnext/accounts/doctype/cost_center/__init__.py | 1 - erpnext/accounts/doctype/cost_center/cost_center.py | 1 - erpnext/accounts/doctype/cost_center/cost_center_dashboard.py | 1 - erpnext/accounts/doctype/cost_center/test_cost_center.py | 1 - erpnext/accounts/doctype/coupon_code/coupon_code.py | 2 -- erpnext/accounts/doctype/coupon_code/test_coupon_code.py | 2 -- .../accounts/doctype/discounted_invoice/discounted_invoice.py | 2 -- .../doctype/distributed_cost_center/distributed_cost_center.py | 2 -- erpnext/accounts/doctype/dunning/dunning.py | 2 -- erpnext/accounts/doctype/dunning/dunning_dashboard.py | 1 - erpnext/accounts/doctype/dunning/test_dunning.py | 2 -- .../doctype/dunning_letter_text/dunning_letter_text.py | 2 -- erpnext/accounts/doctype/dunning_type/dunning_type.py | 2 -- erpnext/accounts/doctype/dunning_type/test_dunning_type.py | 2 -- .../exchange_rate_revaluation/exchange_rate_revaluation.py | 2 -- .../exchange_rate_revaluation_dashboard.py | 1 - .../test_exchange_rate_revaluation.py | 2 -- .../exchange_rate_revaluation_account.py | 2 -- erpnext/accounts/doctype/finance_book/finance_book.py | 2 -- .../accounts/doctype/finance_book/finance_book_dashboard.py | 1 - erpnext/accounts/doctype/finance_book/test_finance_book.py | 2 -- erpnext/accounts/doctype/fiscal_year/__init__.py | 1 - erpnext/accounts/doctype/fiscal_year/fiscal_year.py | 1 - erpnext/accounts/doctype/fiscal_year/fiscal_year_dashboard.py | 1 - erpnext/accounts/doctype/fiscal_year/test_fiscal_year.py | 1 - .../doctype/fiscal_year_company/fiscal_year_company.py | 1 - erpnext/accounts/doctype/gl_entry/__init__.py | 1 - erpnext/accounts/doctype/gl_entry/gl_entry.py | 1 - erpnext/accounts/doctype/gl_entry/test_gl_entry.py | 1 - erpnext/accounts/doctype/gst_account/gst_account.py | 2 -- .../doctype/invoice_discounting/invoice_discounting.py | 2 -- .../invoice_discounting/invoice_discounting_dashboard.py | 1 - .../doctype/invoice_discounting/test_invoice_discounting.py | 2 -- .../accounts/doctype/item_tax_template/item_tax_template.py | 2 -- .../doctype/item_tax_template/item_tax_template_dashboard.py | 1 - .../doctype/item_tax_template/test_item_tax_template.py | 2 -- .../item_tax_template_detail/item_tax_template_detail.py | 2 -- erpnext/accounts/doctype/journal_entry/journal_entry.py | 1 - erpnext/accounts/doctype/journal_entry/test_journal_entry.py | 1 - .../doctype/journal_entry_account/journal_entry_account.py | 1 - .../doctype/journal_entry_template/journal_entry_template.py | 2 -- .../journal_entry_template/test_journal_entry_template.py | 2 -- .../journal_entry_template_account.py | 2 -- .../doctype/loyalty_point_entry/loyalty_point_entry.py | 2 -- .../doctype/loyalty_point_entry/test_loyalty_point_entry.py | 2 -- .../loyalty_point_entry_redemption.py | 2 -- erpnext/accounts/doctype/loyalty_program/loyalty_program.py | 2 -- .../doctype/loyalty_program/loyalty_program_dashboard.py | 1 - .../accounts/doctype/loyalty_program/test_loyalty_program.py | 2 -- .../loyalty_program_collection/loyalty_program_collection.py | 2 -- erpnext/accounts/doctype/mode_of_payment/__init__.py | 1 - erpnext/accounts/doctype/mode_of_payment/mode_of_payment.py | 1 - .../accounts/doctype/mode_of_payment/test_mode_of_payment.py | 2 -- .../doctype/mode_of_payment_account/mode_of_payment_account.py | 1 - .../doctype/monthly_distribution/monthly_distribution.py | 1 - .../monthly_distribution/monthly_distribution_dashboard.py | 1 - .../doctype/monthly_distribution/test_monthly_distribution.py | 1 - .../monthly_distribution_percentage.py | 1 - .../opening_invoice_creation_tool.py | 2 -- .../test_opening_invoice_creation_tool.py | 2 -- .../opening_invoice_creation_tool_item.py | 2 -- erpnext/accounts/doctype/party_account/party_account.py | 1 - erpnext/accounts/doctype/payment_entry/payment_entry.py | 2 -- erpnext/accounts/doctype/payment_entry/test_payment_entry.py | 2 -- .../doctype/payment_entry_deduction/payment_entry_deduction.py | 2 -- .../doctype/payment_entry_reference/payment_entry_reference.py | 2 -- .../doctype/payment_gateway_account/payment_gateway_account.py | 2 -- .../payment_gateway_account_dashboard.py | 1 - .../payment_gateway_account/test_payment_gateway_account.py | 2 -- erpnext/accounts/doctype/payment_order/payment_order.py | 2 -- .../accounts/doctype/payment_order/payment_order_dashboard.py | 1 - erpnext/accounts/doctype/payment_order/test_payment_order.py | 2 -- .../doctype/payment_order_reference/payment_order_reference.py | 2 -- .../doctype/payment_reconciliation/payment_reconciliation.py | 1 - .../payment_reconciliation_invoice.py | 1 - .../payment_reconciliation_payment.py | 1 - erpnext/accounts/doctype/payment_request/payment_request.py | 2 -- .../accounts/doctype/payment_request/test_payment_request.py | 2 -- erpnext/accounts/doctype/payment_schedule/payment_schedule.py | 2 -- erpnext/accounts/doctype/payment_term/payment_term.py | 2 -- .../accounts/doctype/payment_term/payment_term_dashboard.py | 1 - erpnext/accounts/doctype/payment_term/test_payment_term.py | 2 -- .../doctype/payment_terms_template/payment_terms_template.py | 2 -- .../payment_terms_template/payment_terms_template_dashboard.py | 1 - .../payment_terms_template/test_payment_terms_template.py | 2 -- .../payment_terms_template_detail.py | 2 -- erpnext/accounts/doctype/period_closing_voucher/__init__.py | 1 - .../doctype/period_closing_voucher/period_closing_voucher.py | 1 - .../period_closing_voucher/test_period_closing_voucher.py | 1 - .../accounts/doctype/pos_closing_entry/pos_closing_entry.py | 2 -- .../doctype/pos_closing_entry/test_pos_closing_entry.py | 2 -- .../pos_closing_entry_detail/pos_closing_entry_detail.py | 2 -- .../doctype/pos_closing_entry_taxes/pos_closing_entry_taxes.py | 2 -- .../accounts/doctype/pos_customer_group/pos_customer_group.py | 2 -- erpnext/accounts/doctype/pos_field/pos_field.py | 2 -- erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 2 -- erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py | 2 -- erpnext/accounts/doctype/pos_invoice_item/pos_invoice_item.py | 2 -- .../doctype/pos_invoice_merge_log/pos_invoice_merge_log.py | 2 -- .../pos_invoice_merge_log/test_pos_invoice_merge_log.py | 2 -- .../doctype/pos_invoice_reference/pos_invoice_reference.py | 2 -- erpnext/accounts/doctype/pos_item_group/pos_item_group.py | 2 -- .../accounts/doctype/pos_opening_entry/pos_opening_entry.py | 2 -- .../doctype/pos_opening_entry/test_pos_opening_entry.py | 2 -- .../pos_opening_entry_detail/pos_opening_entry_detail.py | 2 -- .../accounts/doctype/pos_payment_method/pos_payment_method.py | 2 -- erpnext/accounts/doctype/pos_profile/pos_profile.py | 1 - erpnext/accounts/doctype/pos_profile/test_pos_profile.py | 2 -- erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py | 2 -- .../accounts/doctype/pos_profile_user/test_pos_profile_user.py | 2 -- .../accounts/doctype/pos_search_fields/pos_search_fields.py | 2 -- erpnext/accounts/doctype/pos_settings/pos_settings.py | 2 -- erpnext/accounts/doctype/pos_settings/test_pos_settings.py | 2 -- erpnext/accounts/doctype/pricing_rule/pricing_rule.py | 1 - erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py | 1 - erpnext/accounts/doctype/pricing_rule/utils.py | 1 - .../accounts/doctype/pricing_rule_brand/pricing_rule_brand.py | 2 -- .../doctype/pricing_rule_detail/pricing_rule_detail.py | 2 -- .../doctype/pricing_rule_item_code/pricing_rule_item_code.py | 2 -- .../doctype/pricing_rule_item_group/pricing_rule_item_group.py | 2 -- .../process_deferred_accounting/process_deferred_accounting.py | 2 -- .../test_process_deferred_accounting.py | 2 -- .../process_statement_of_accounts.py | 2 -- .../test_process_statement_of_accounts.py | 2 -- .../process_statement_of_accounts_customer.py | 2 -- .../accounts/doctype/promotional_scheme/promotional_scheme.py | 2 -- .../doctype/promotional_scheme/test_promotional_scheme.py | 2 -- .../promotional_scheme_price_discount.py | 2 -- .../promotional_scheme_product_discount.py | 2 -- erpnext/accounts/doctype/psoa_cost_center/psoa_cost_center.py | 2 -- erpnext/accounts/doctype/psoa_project/psoa_project.py | 2 -- erpnext/accounts/doctype/purchase_invoice/__init__.py | 1 - erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 2 -- .../doctype/purchase_invoice/purchase_invoice_dashboard.py | 1 - .../accounts/doctype/purchase_invoice/test_purchase_invoice.py | 1 - erpnext/accounts/doctype/purchase_invoice_advance/__init__.py | 1 - .../purchase_invoice_advance/purchase_invoice_advance.py | 1 - erpnext/accounts/doctype/purchase_invoice_item/__init__.py | 1 - .../doctype/purchase_invoice_item/purchase_invoice_item.py | 1 - .../accounts/doctype/purchase_taxes_and_charges/__init__.py | 1 - .../purchase_taxes_and_charges/purchase_taxes_and_charges.py | 1 - .../purchase_taxes_and_charges_template.py | 2 -- .../purchase_taxes_and_charges_template_dashboard.py | 1 - .../test_purchase_taxes_and_charges_template.py | 2 -- .../salary_component_account/salary_component_account.py | 2 -- erpnext/accounts/doctype/sales_invoice/__init__.py | 1 - erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 1 - .../accounts/doctype/sales_invoice/sales_invoice_dashboard.py | 1 - erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py | 1 - erpnext/accounts/doctype/sales_invoice_advance/__init__.py | 1 - .../doctype/sales_invoice_advance/sales_invoice_advance.py | 1 - erpnext/accounts/doctype/sales_invoice_item/__init__.py | 1 - .../accounts/doctype/sales_invoice_item/sales_invoice_item.py | 1 - .../doctype/sales_invoice_payment/sales_invoice_payment.py | 2 -- .../doctype/sales_invoice_timesheet/sales_invoice_timesheet.py | 2 -- erpnext/accounts/doctype/sales_taxes_and_charges/__init__.py | 1 - .../doctype/sales_taxes_and_charges/sales_taxes_and_charges.py | 1 - .../sales_taxes_and_charges_template.py | 1 - .../sales_taxes_and_charges_template_dashboard.py | 1 - .../test_sales_taxes_and_charges_template.py | 2 -- erpnext/accounts/doctype/share_balance/share_balance.py | 2 -- erpnext/accounts/doctype/share_transfer/share_transfer.py | 2 -- erpnext/accounts/doctype/share_transfer/test_share_transfer.py | 2 -- erpnext/accounts/doctype/share_type/share_type.py | 2 -- erpnext/accounts/doctype/share_type/share_type_dashboard.py | 1 - erpnext/accounts/doctype/share_type/test_share_type.py | 2 -- erpnext/accounts/doctype/shareholder/shareholder.py | 2 -- erpnext/accounts/doctype/shareholder/shareholder_dashboard.py | 1 - erpnext/accounts/doctype/shareholder/test_shareholder.py | 2 -- erpnext/accounts/doctype/shipping_rule/shipping_rule.py | 1 - .../accounts/doctype/shipping_rule/shipping_rule_dashboard.py | 1 - erpnext/accounts/doctype/shipping_rule/test_shipping_rule.py | 1 - .../doctype/shipping_rule_condition/shipping_rule_condition.py | 1 - .../doctype/shipping_rule_country/shipping_rule_country.py | 2 -- erpnext/accounts/doctype/subscription/subscription.py | 2 -- erpnext/accounts/doctype/subscription/test_subscription.py | 2 -- .../doctype/subscription_invoice/subscription_invoice.py | 2 -- .../doctype/subscription_invoice/test_subscription_invoice.py | 2 -- .../accounts/doctype/subscription_plan/subscription_plan.py | 2 -- .../doctype/subscription_plan/subscription_plan_dashboard.py | 1 - .../doctype/subscription_plan/test_subscription_plan.py | 2 -- .../subscription_plan_detail/subscription_plan_detail.py | 2 -- .../doctype/subscription_settings/subscription_settings.py | 2 -- .../subscription_settings/test_subscription_settings.py | 2 -- erpnext/accounts/doctype/tax_category/tax_category.py | 2 -- .../accounts/doctype/tax_category/tax_category_dashboard.py | 1 - erpnext/accounts/doctype/tax_category/test_tax_category.py | 2 -- erpnext/accounts/doctype/tax_rule/tax_rule.py | 2 -- erpnext/accounts/doctype/tax_rule/test_tax_rule.py | 2 -- .../doctype/tax_withholding_account/tax_withholding_account.py | 2 -- .../tax_withholding_category/tax_withholding_category.py | 2 -- .../tax_withholding_category_dashboard.py | 1 - .../tax_withholding_category/test_tax_withholding_category.py | 2 -- .../doctype/tax_withholding_rate/tax_withholding_rate.py | 2 -- erpnext/accounts/general_ledger.py | 1 - .../notification_for_new_fiscal_year.py | 1 - erpnext/accounts/page/__init__.py | 1 - erpnext/accounts/party.py | 1 - erpnext/accounts/report/account_balance/account_balance.py | 1 - .../accounts/report/account_balance/test_account_balance.py | 1 - erpnext/accounts/report/accounts_payable/accounts_payable.py | 1 - .../accounts_payable_summary/accounts_payable_summary.py | 1 - .../accounts/report/accounts_receivable/accounts_receivable.py | 1 - .../report/accounts_receivable/test_accounts_receivable.py | 1 - .../accounts_receivable_summary/accounts_receivable_summary.py | 1 - .../asset_depreciation_ledger/asset_depreciation_ledger.py | 1 - .../asset_depreciations_and_balances.py | 1 - erpnext/accounts/report/balance_sheet/balance_sheet.py | 1 - .../report/bank_clearance_summary/bank_clearance_summary.py | 1 - .../bank_reconciliation_statement.py | 1 - .../billed_items_to_be_received/billed_items_to_be_received.py | 1 - .../report/budget_variance_report/budget_variance_report.py | 1 - erpnext/accounts/report/cash_flow/cash_flow.py | 1 - erpnext/accounts/report/cash_flow/custom_cash_flow.py | 1 - .../consolidated_financial_statement.py | 1 - .../report/customer_ledger_summary/customer_ledger_summary.py | 1 - .../delivered_items_to_be_billed.py | 1 - .../dimension_wise_accounts_balance_report.py | 1 - erpnext/accounts/report/financial_statements.py | 2 -- erpnext/accounts/report/general_ledger/general_ledger.py | 1 - .../gross_and_net_profit_report/gross_and_net_profit_report.py | 1 - erpnext/accounts/report/gross_profit/gross_profit.py | 1 - .../report/inactive_sales_items/inactive_sales_items.py | 1 - .../item_wise_purchase_register/item_wise_purchase_register.py | 1 - .../item_wise_sales_register/item_wise_sales_register.py | 1 - erpnext/accounts/report/non_billed_report.py | 1 - .../payment_period_based_on_invoice_date.py | 1 - erpnext/accounts/report/pos_register/pos_register.py | 1 - .../profit_and_loss_statement/profit_and_loss_statement.py | 1 - .../report/profitability_analysis/profitability_analysis.py | 1 - .../report/purchase_invoice_trends/purchase_invoice_trends.py | 1 - erpnext/accounts/report/purchase_register/purchase_register.py | 1 - .../received_items_to_be_billed/received_items_to_be_billed.py | 1 - .../report/sales_invoice_trends/sales_invoice_trends.py | 1 - .../report/sales_payment_summary/sales_payment_summary.py | 1 - .../report/sales_payment_summary/test_sales_payment_summary.py | 1 - erpnext/accounts/report/sales_register/sales_register.py | 1 - erpnext/accounts/report/share_balance/share_balance.py | 1 - erpnext/accounts/report/share_ledger/share_ledger.py | 2 -- .../report/supplier_ledger_summary/supplier_ledger_summary.py | 1 - erpnext/accounts/report/tax_detail/tax_detail.py | 1 - erpnext/accounts/report/tax_detail/test_tax_detail.py | 1 - .../report/tds_computation_summary/tds_computation_summary.py | 1 - .../accounts/report/tds_payable_monthly/tds_payable_monthly.py | 1 - erpnext/accounts/report/trial_balance/trial_balance.py | 1 - .../report/trial_balance_for_party/trial_balance_for_party.py | 1 - .../report/unpaid_expense_claim/unpaid_expense_claim.py | 1 - erpnext/accounts/report/utils.py | 1 - erpnext/accounts/test/test_utils.py | 1 - erpnext/accounts/utils.py | 2 -- .../agriculture_analysis_criteria.py | 2 -- .../test_agriculture_analysis_criteria.py | 2 -- .../agriculture/doctype/agriculture_task/agriculture_task.py | 2 -- .../doctype/agriculture_task/test_agriculture_task.py | 2 -- erpnext/agriculture/doctype/crop/crop.py | 2 -- erpnext/agriculture/doctype/crop/crop_dashboard.py | 1 - erpnext/agriculture/doctype/crop/test_crop.py | 2 -- erpnext/agriculture/doctype/crop_cycle/crop_cycle.py | 2 -- erpnext/agriculture/doctype/crop_cycle/test_crop_cycle.py | 2 -- .../agriculture/doctype/detected_disease/detected_disease.py | 2 -- erpnext/agriculture/doctype/disease/disease.py | 2 -- erpnext/agriculture/doctype/disease/test_disease.py | 2 -- erpnext/agriculture/doctype/fertilizer/fertilizer.py | 2 -- erpnext/agriculture/doctype/fertilizer/test_fertilizer.py | 2 -- .../doctype/fertilizer_content/fertilizer_content.py | 2 -- erpnext/agriculture/doctype/linked_location/linked_location.py | 2 -- .../doctype/linked_plant_analysis/linked_plant_analysis.py | 2 -- .../doctype/linked_soil_analysis/linked_soil_analysis.py | 2 -- .../doctype/linked_soil_texture/linked_soil_texture.py | 2 -- erpnext/agriculture/doctype/plant_analysis/plant_analysis.py | 2 -- .../agriculture/doctype/plant_analysis/test_plant_analysis.py | 2 -- .../doctype/plant_analysis_criteria/plant_analysis_criteria.py | 2 -- erpnext/agriculture/doctype/soil_analysis/soil_analysis.py | 2 -- .../agriculture/doctype/soil_analysis/test_soil_analysis.py | 2 -- .../doctype/soil_analysis_criteria/soil_analysis_criteria.py | 2 -- erpnext/agriculture/doctype/soil_texture/soil_texture.py | 2 -- erpnext/agriculture/doctype/soil_texture/test_soil_texture.py | 2 -- .../doctype/soil_texture_criteria/soil_texture_criteria.py | 2 -- .../agriculture/doctype/water_analysis/test_water_analysis.py | 2 -- erpnext/agriculture/doctype/water_analysis/water_analysis.py | 2 -- .../doctype/water_analysis_criteria/water_analysis_criteria.py | 2 -- erpnext/agriculture/doctype/weather/test_weather.py | 2 -- erpnext/agriculture/doctype/weather/weather.py | 2 -- .../agriculture/doctype/weather_parameter/weather_parameter.py | 2 -- erpnext/agriculture/setup.py | 1 - erpnext/assets/doctype/asset/asset.py | 2 -- erpnext/assets/doctype/asset/asset_dashboard.py | 1 - erpnext/assets/doctype/asset/depreciation.py | 2 -- erpnext/assets/doctype/asset/test_asset.py | 2 -- erpnext/assets/doctype/asset_category/asset_category.py | 2 -- erpnext/assets/doctype/asset_category/test_asset_category.py | 2 -- .../doctype/asset_category_account/asset_category_account.py | 2 -- .../assets/doctype/asset_finance_book/asset_finance_book.py | 2 -- erpnext/assets/doctype/asset_maintenance/asset_maintenance.py | 2 -- .../assets/doctype/asset_maintenance/test_asset_maintenance.py | 2 -- .../doctype/asset_maintenance_log/asset_maintenance_log.py | 2 -- .../asset_maintenance_log/test_asset_maintenance_log.py | 2 -- .../doctype/asset_maintenance_task/asset_maintenance_task.py | 2 -- .../doctype/asset_maintenance_team/asset_maintenance_team.py | 2 -- .../asset_maintenance_team/test_asset_maintenance_team.py | 2 -- erpnext/assets/doctype/asset_movement/asset_movement.py | 2 -- erpnext/assets/doctype/asset_movement/test_asset_movement.py | 2 -- .../assets/doctype/asset_movement_item/asset_movement_item.py | 2 -- erpnext/assets/doctype/asset_repair/asset_repair.py | 2 -- erpnext/assets/doctype/asset_repair/test_asset_repair.py | 2 -- .../doctype/asset_value_adjustment/asset_value_adjustment.py | 2 -- .../asset_value_adjustment/test_asset_value_adjustment.py | 2 -- .../doctype/depreciation_schedule/depreciation_schedule.py | 2 -- erpnext/assets/doctype/linked_location/linked_location.py | 2 -- erpnext/assets/doctype/location/location.py | 2 -- erpnext/assets/doctype/location/test_location.py | 2 -- .../doctype/maintenance_team_member/maintenance_team_member.py | 2 -- .../maintenance_team_member/test_maintenance_team_member.py | 2 -- .../assets/report/fixed_asset_register/fixed_asset_register.py | 1 - erpnext/buying/__init__.py | 1 - erpnext/buying/doctype/__init__.py | 1 - erpnext/buying/doctype/buying_settings/buying_settings.py | 1 - erpnext/buying/doctype/buying_settings/test_buying_settings.py | 2 -- erpnext/buying/doctype/purchase_order/__init__.py | 1 - erpnext/buying/doctype/purchase_order/purchase_order.py | 1 - .../buying/doctype/purchase_order/purchase_order_dashboard.py | 1 - erpnext/buying/doctype/purchase_order/test_purchase_order.py | 1 - erpnext/buying/doctype/purchase_order_item/__init__.py | 1 - .../buying/doctype/purchase_order_item/purchase_order_item.py | 1 - .../buying/doctype/purchase_order_item_supplied/__init__.py | 1 - .../purchase_order_item_supplied.py | 1 - .../buying/doctype/purchase_receipt_item_supplied/__init__.py | 1 - .../purchase_receipt_item_supplied.py | 1 - .../doctype/request_for_quotation/request_for_quotation.py | 2 -- .../request_for_quotation/request_for_quotation_dashboard.py | 1 - .../request_for_quotation/test_request_for_quotation.py | 2 -- .../request_for_quotation_item/request_for_quotation_item.py | 2 -- .../request_for_quotation_supplier.py | 2 -- erpnext/buying/doctype/supplier/__init__.py | 1 - erpnext/buying/doctype/supplier/supplier.py | 1 - erpnext/buying/doctype/supplier/supplier_dashboard.py | 1 - erpnext/buying/doctype/supplier/test_supplier.py | 1 - erpnext/buying/doctype/supplier_quotation/__init__.py | 1 - .../buying/doctype/supplier_quotation/supplier_quotation.py | 1 - .../doctype/supplier_quotation/supplier_quotation_dashboard.py | 1 - .../doctype/supplier_quotation/test_supplier_quotation.py | 1 - erpnext/buying/doctype/supplier_quotation_item/__init__.py | 1 - .../doctype/supplier_quotation_item/supplier_quotation_item.py | 1 - .../buying/doctype/supplier_scorecard/supplier_scorecard.py | 2 -- .../doctype/supplier_scorecard/supplier_scorecard_dashboard.py | 1 - .../doctype/supplier_scorecard/test_supplier_scorecard.py | 2 -- .../supplier_scorecard_criteria/supplier_scorecard_criteria.py | 2 -- .../test_supplier_scorecard_criteria.py | 2 -- .../supplier_scorecard_period/supplier_scorecard_period.py | 2 -- .../test_supplier_scorecard_period.py | 2 -- .../supplier_scorecard_scoring_criteria.py | 2 -- .../supplier_scorecard_scoring_standing.py | 2 -- .../supplier_scorecard_scoring_variable.py | 2 -- .../supplier_scorecard_standing/supplier_scorecard_standing.py | 2 -- .../test_supplier_scorecard_standing.py | 2 -- .../supplier_scorecard_variable/supplier_scorecard_variable.py | 2 -- .../test_supplier_scorecard_variable.py | 2 -- erpnext/buying/page/__init__.py | 1 - .../buying/report/procurement_tracker/procurement_tracker.py | 1 - .../report/procurement_tracker/test_procurement_tracker.py | 1 - erpnext/buying/report/purchase_analytics/purchase_analytics.py | 1 - .../report/purchase_order_analysis/purchase_order_analysis.py | 1 - .../report/purchase_order_trends/purchase_order_trends.py | 1 - .../requested_items_to_order_and_receive.py | 1 - .../subcontract_order_summary/subcontract_order_summary.py | 1 - .../subcontracted_item_to_be_received.py | 1 - .../test_subcontracted_item_to_be_received.py | 1 - .../subcontracted_raw_materials_to_be_transferred.py | 1 - .../test_subcontracted_raw_materials_to_be_transferred.py | 1 - .../supplier_quotation_comparison.py | 1 - erpnext/buying/utils.py | 1 - erpnext/commands/__init__.py | 2 -- .../doctype/communication_medium/communication_medium.py | 2 -- .../communication_medium_timeslot.py | 2 -- erpnext/config/education.py | 1 - erpnext/config/projects.py | 1 - erpnext/controllers/accounts_controller.py | 1 - erpnext/controllers/buying_controller.py | 1 - erpnext/controllers/item_variant.py | 1 - erpnext/controllers/print_settings.py | 1 - erpnext/controllers/queries.py | 1 - erpnext/controllers/sales_and_purchase_return.py | 1 - erpnext/controllers/selling_controller.py | 1 - erpnext/controllers/status_updater.py | 1 - erpnext/controllers/taxes_and_totals.py | 1 - erpnext/controllers/tests/test_item_variant.py | 1 - erpnext/controllers/tests/test_mapper.py | 1 - erpnext/controllers/tests/test_qty_based_taxes.py | 1 - erpnext/controllers/trends.py | 1 - erpnext/controllers/website_list_for_contact.py | 1 - erpnext/crm/doctype/appointment/appointment.py | 2 -- erpnext/crm/doctype/appointment/test_appointment.py | 2 -- .../appointment_booking_settings.py | 2 -- .../test_appointment_booking_settings.py | 2 -- .../appointment_booking_slots/appointment_booking_slots.py | 2 -- .../crm/doctype/availability_of_slots/availability_of_slots.py | 2 -- .../doctype/campaign_email_schedule/campaign_email_schedule.py | 2 -- erpnext/crm/doctype/contract/contract.py | 2 -- erpnext/crm/doctype/contract/test_contract.py | 2 -- .../contract_fulfilment_checklist.py | 2 -- .../test_contract_fulfilment_checklist.py | 2 -- erpnext/crm/doctype/contract_template/contract_template.py | 2 -- .../crm/doctype/contract_template/test_contract_template.py | 2 -- .../contract_template_fulfilment_terms.py | 2 -- erpnext/crm/doctype/email_campaign/email_campaign.py | 2 -- erpnext/crm/doctype/email_campaign/test_email_campaign.py | 2 -- erpnext/crm/doctype/lead/lead.py | 1 - erpnext/crm/doctype/lead/lead_dashboard.py | 1 - erpnext/crm/doctype/lead/test_lead.py | 1 - erpnext/crm/doctype/lead_source/lead_source.py | 2 -- erpnext/crm/doctype/lead_source/test_lead_source.py | 2 -- erpnext/crm/doctype/linkedin_settings/linkedin_settings.py | 2 -- .../crm/doctype/linkedin_settings/test_linkedin_settings.py | 2 -- erpnext/crm/doctype/lost_reason_detail/lost_reason_detail.py | 2 -- erpnext/crm/doctype/market_segment/market_segment.py | 2 -- erpnext/crm/doctype/market_segment/test_market_segment.py | 2 -- erpnext/crm/doctype/opportunity/opportunity.py | 1 - erpnext/crm/doctype/opportunity/opportunity_dashboard.py | 1 - erpnext/crm/doctype/opportunity/test_opportunity.py | 1 - erpnext/crm/doctype/opportunity_item/opportunity_item.py | 2 -- .../doctype/opportunity_lost_reason/opportunity_lost_reason.py | 2 -- .../opportunity_lost_reason_detail.py | 2 -- erpnext/crm/doctype/opportunity_type/opportunity_type.py | 2 -- erpnext/crm/doctype/opportunity_type/test_opportunity_type.py | 2 -- erpnext/crm/doctype/sales_stage/sales_stage.py | 2 -- erpnext/crm/doctype/sales_stage/test_sales_stage.py | 2 -- erpnext/crm/doctype/social_media_post/social_media_post.py | 2 -- .../crm/doctype/social_media_post/test_social_media_post.py | 2 -- erpnext/crm/doctype/twitter_settings/test_twitter_settings.py | 2 -- erpnext/crm/doctype/twitter_settings/twitter_settings.py | 2 -- erpnext/crm/report/campaign_efficiency/campaign_efficiency.py | 1 - .../first_response_time_for_opportunity.py | 1 - .../crm/report/lead_conversion_time/lead_conversion_time.py | 1 - erpnext/crm/report/lead_details/lead_details.py | 1 - .../crm/report/lead_owner_efficiency/lead_owner_efficiency.py | 1 - erpnext/crm/report/lost_opportunity/lost_opportunity.py | 1 - .../prospects_engaged_but_not_converted.py | 1 - erpnext/demo/demo.py | 1 - erpnext/demo/domains.py | 1 - erpnext/demo/setup/education.py | 1 - erpnext/demo/setup/manufacture.py | 1 - erpnext/demo/setup/retail.py | 1 - erpnext/demo/setup/setup_data.py | 1 - erpnext/demo/user/accounts.py | 1 - erpnext/demo/user/education.py | 1 - erpnext/demo/user/fixed_asset.py | 1 - erpnext/demo/user/hr.py | 1 - erpnext/demo/user/manufacturing.py | 1 - erpnext/demo/user/projects.py | 1 - erpnext/demo/user/purchase.py | 1 - erpnext/demo/user/sales.py | 1 - erpnext/demo/user/stock.py | 1 - erpnext/domains/agriculture.py | 1 - erpnext/domains/distribution.py | 1 - erpnext/domains/education.py | 1 - erpnext/domains/hospitality.py | 1 - erpnext/domains/manufacturing.py | 1 - erpnext/domains/non_profit.py | 1 - erpnext/domains/retail.py | 1 - erpnext/domains/services.py | 1 - erpnext/education/__init__.py | 1 - erpnext/education/api.py | 2 -- erpnext/education/doctype/academic_term/academic_term.py | 2 -- .../education/doctype/academic_term/academic_term_dashboard.py | 1 - erpnext/education/doctype/academic_term/test_academic_term.py | 2 -- erpnext/education/doctype/academic_year/academic_year.py | 2 -- .../education/doctype/academic_year/academic_year_dashboard.py | 1 - erpnext/education/doctype/academic_year/test_academic_year.py | 2 -- erpnext/education/doctype/article/article.py | 2 -- erpnext/education/doctype/article/test_article.py | 2 -- .../doctype/assessment_criteria/assessment_criteria.py | 2 -- .../doctype/assessment_criteria/test_assessment_criteria.py | 2 -- .../assessment_criteria_group/assessment_criteria_group.py | 2 -- .../test_assessment_criteria_group.py | 2 -- erpnext/education/doctype/assessment_group/assessment_group.py | 2 -- .../doctype/assessment_group/assessment_group_dashboard.py | 1 - .../doctype/assessment_group/test_assessment_group.py | 2 -- erpnext/education/doctype/assessment_plan/assessment_plan.py | 2 -- .../doctype/assessment_plan/assessment_plan_dashboard.py | 1 - .../education/doctype/assessment_plan/test_assessment_plan.py | 2 -- .../assessment_plan_criteria/assessment_plan_criteria.py | 2 -- .../education/doctype/assessment_result/assessment_result.py | 2 -- .../doctype/assessment_result/assessment_result_dashboard.py | 1 - .../doctype/assessment_result/test_assessment_result.py | 2 -- .../assessment_result_detail/assessment_result_detail.py | 2 -- .../doctype/assessment_result_tool/assessment_result_tool.py | 2 -- .../assessment_result_tool/test_assessment_result_tool.py | 2 -- erpnext/education/doctype/content_activity/content_activity.py | 2 -- erpnext/education/doctype/content_question/content_question.py | 2 -- .../doctype/content_question/test_content_question.py | 2 -- erpnext/education/doctype/course/course.py | 2 -- erpnext/education/doctype/course/course_dashboard.py | 1 - erpnext/education/doctype/course/test_course.py | 2 -- erpnext/education/doctype/course_activity/course_activity.py | 2 -- .../education/doctype/course_activity/test_course_activity.py | 2 -- .../course_assessment_criteria/course_assessment_criteria.py | 2 -- erpnext/education/doctype/course_content/course_content.py | 2 -- .../education/doctype/course_content/test_course_content.py | 2 -- .../education/doctype/course_enrollment/course_enrollment.py | 2 -- .../doctype/course_enrollment/course_enrollment_dashboard.py | 1 - .../doctype/course_enrollment/test_course_enrollment.py | 2 -- erpnext/education/doctype/course_schedule/course_schedule.py | 1 - .../doctype/course_schedule/course_schedule_dashboard.py | 1 - .../education/doctype/course_schedule/test_course_schedule.py | 2 -- .../doctype/course_scheduling_tool/course_scheduling_tool.py | 2 -- .../course_scheduling_tool/test_course_scheduling_tool.py | 2 -- erpnext/education/doctype/course_topic/course_topic.py | 2 -- erpnext/education/doctype/course_topic/test_course_topic.py | 2 -- .../education/doctype/education_settings/education_settings.py | 2 -- .../doctype/education_settings/test_education_settings.py | 2 -- erpnext/education/doctype/fee_category/fee_category.py | 2 -- erpnext/education/doctype/fee_category/test_fee_category.py | 2 -- erpnext/education/doctype/fee_component/fee_component.py | 2 -- erpnext/education/doctype/fee_schedule/fee_schedule.py | 2 -- .../education/doctype/fee_schedule/fee_schedule_dashboard.py | 1 - erpnext/education/doctype/fee_schedule/test_fee_schedule.py | 2 -- .../doctype/fee_schedule_program/fee_schedule_program.py | 2 -- .../fee_schedule_student_group/fee_schedule_student_group.py | 2 -- erpnext/education/doctype/fee_structure/fee_structure.py | 2 -- .../education/doctype/fee_structure/fee_structure_dashboard.py | 1 - erpnext/education/doctype/fee_structure/test_fee_structure.py | 2 -- erpnext/education/doctype/fees/fees.py | 2 -- erpnext/education/doctype/fees/test_fees.py | 2 -- erpnext/education/doctype/grading_scale/grading_scale.py | 2 -- .../education/doctype/grading_scale/grading_scale_dashboard.py | 1 - erpnext/education/doctype/grading_scale/test_grading_scale.py | 2 -- .../doctype/grading_scale_interval/grading_scale_interval.py | 2 -- erpnext/education/doctype/guardian/guardian.py | 2 -- erpnext/education/doctype/guardian/test_guardian.py | 2 -- .../education/doctype/guardian_interest/guardian_interest.py | 2 -- erpnext/education/doctype/guardian_student/guardian_student.py | 2 -- erpnext/education/doctype/instructor/instructor.py | 2 -- erpnext/education/doctype/instructor/instructor_dashboard.py | 1 - erpnext/education/doctype/instructor/test_instructor.py | 2 -- erpnext/education/doctype/instructor_log/instructor_log.py | 2 -- erpnext/education/doctype/options/options.py | 2 -- erpnext/education/doctype/program/program.py | 2 -- erpnext/education/doctype/program/test_program.py | 2 -- erpnext/education/doctype/program_course/program_course.py | 2 -- .../education/doctype/program_enrollment/program_enrollment.py | 2 -- .../doctype/program_enrollment/program_enrollment_dashboard.py | 1 - .../doctype/program_enrollment/test_program_enrollment.py | 2 -- .../program_enrollment_course/program_enrollment_course.py | 2 -- .../doctype/program_enrollment_fee/program_enrollment_fee.py | 2 -- .../doctype/program_enrollment_tool/program_enrollment_tool.py | 2 -- .../program_enrollment_tool/test_program_enrollment_tool.py | 2 -- .../program_enrollment_tool_student.py | 2 -- erpnext/education/doctype/program_fee/program_fee.py | 2 -- erpnext/education/doctype/question/question.py | 2 -- erpnext/education/doctype/question/test_question.py | 2 -- erpnext/education/doctype/quiz/quiz.py | 2 -- erpnext/education/doctype/quiz/test_quiz.py | 2 -- erpnext/education/doctype/quiz_activity/quiz_activity.py | 2 -- erpnext/education/doctype/quiz_activity/test_quiz_activity.py | 2 -- erpnext/education/doctype/quiz_question/quiz_question.py | 2 -- erpnext/education/doctype/quiz_result/quiz_result.py | 2 -- erpnext/education/doctype/quiz_result/test_quiz_result.py | 2 -- erpnext/education/doctype/room/room.py | 2 -- erpnext/education/doctype/room/room_dashboard.py | 1 - erpnext/education/doctype/room/test_room.py | 2 -- erpnext/education/doctype/school_house/school_house.py | 2 -- erpnext/education/doctype/school_house/test_school_house.py | 2 -- erpnext/education/doctype/student/student.py | 2 -- erpnext/education/doctype/student/student_dashboard.py | 1 - erpnext/education/doctype/student/test_student.py | 2 -- .../education/doctype/student_admission/student_admission.py | 2 -- .../doctype/student_admission/test_student_admission.py | 2 -- .../student_admission_program/student_admission_program.py | 2 -- .../education/doctype/student_applicant/student_applicant.py | 1 - .../doctype/student_applicant/test_student_applicant.py | 2 -- .../education/doctype/student_attendance/student_attendance.py | 2 -- .../doctype/student_attendance/student_attendance_dashboard.py | 1 - .../doctype/student_attendance/test_student_attendance.py | 2 -- .../doctype/student_attendance_tool/student_attendance_tool.py | 2 -- .../student_attendance_tool/test_student_attendance_tool.py | 2 -- .../education/doctype/student_batch_name/student_batch_name.py | 2 -- .../doctype/student_batch_name/test_student_batch_name.py | 2 -- erpnext/education/doctype/student_category/student_category.py | 2 -- .../doctype/student_category/student_category_dashboard.py | 1 - .../doctype/student_category/test_student_category.py | 2 -- erpnext/education/doctype/student_group/student_group.py | 2 -- .../education/doctype/student_group/student_group_dashboard.py | 1 - erpnext/education/doctype/student_group/test_student_group.py | 2 -- .../student_group_creation_tool/student_group_creation_tool.py | 2 -- .../test_student_group_creation_tool.py | 2 -- .../student_group_creation_tool_course.py | 2 -- .../student_group_instructor/student_group_instructor.py | 2 -- .../doctype/student_group_student/student_group_student.py | 2 -- erpnext/education/doctype/student_guardian/student_guardian.py | 2 -- erpnext/education/doctype/student_language/student_language.py | 2 -- .../doctype/student_language/test_student_language.py | 2 -- .../student_leave_application/student_leave_application.py | 2 -- .../student_leave_application_dashboard.py | 1 - .../test_student_leave_application.py | 2 -- erpnext/education/doctype/student_log/student_log.py | 2 -- erpnext/education/doctype/student_log/test_student_log.py | 2 -- .../student_report_generation_tool.py | 2 -- .../test_student_report_generation_tool.py | 2 -- erpnext/education/doctype/student_sibling/student_sibling.py | 2 -- erpnext/education/doctype/student_siblings/student_siblings.py | 2 -- erpnext/education/doctype/topic/test_topic.py | 2 -- erpnext/education/doctype/topic/topic.py | 2 -- erpnext/education/doctype/topic_content/test_topic_content.py | 2 -- erpnext/education/doctype/topic_content/topic_content.py | 2 -- .../report/absent_student_report/absent_student_report.py | 1 - .../report/assessment_plan_status/assessment_plan_status.py | 1 - .../course_wise_assessment_report.py | 1 - .../report/final_assessment_grades/final_assessment_grades.py | 1 - .../program_wise_fee_collection/program_wise_fee_collection.py | 1 - .../student_and_guardian_contact_details.py | 1 - .../student_batch_wise_attendance.py | 1 - .../student_monthly_attendance_sheet.py | 1 - erpnext/education/setup.py | 2 -- erpnext/education/utils.py | 3 --- .../education/web_form/student_applicant/student_applicant.py | 1 - erpnext/erpnext_integrations/connectors/github_connection.py | 1 - .../erpnext_integrations/connectors/woocommerce_connection.py | 1 - .../data_migration_mapping/issue_to_task/__init__.py | 1 - .../data_migration_mapping/milestone_to_project/__init__.py | 1 - .../doctype/amazon_mws_settings/amazon_methods.py | 2 -- .../doctype/amazon_mws_settings/amazon_mws_api.py | 2 -- .../doctype/amazon_mws_settings/amazon_mws_settings.py | 2 -- .../doctype/amazon_mws_settings/test_amazon_mws_settings.py | 2 -- .../doctype/amazon_mws_settings/xml_utils.py | 2 -- .../doctype/exotel_settings/exotel_settings.py | 2 -- .../doctype/gocardless_mandate/gocardless_mandate.py | 2 -- .../doctype/gocardless_mandate/test_gocardless_mandate.py | 2 -- .../doctype/gocardless_settings/__init__.py | 2 -- .../doctype/gocardless_settings/gocardless_settings.py | 2 -- .../doctype/gocardless_settings/test_gocardless_settings.py | 2 -- .../doctype/mpesa_settings/mpesa_settings.py | 2 -- .../doctype/mpesa_settings/test_mpesa_settings.py | 2 -- .../doctype/plaid_settings/plaid_connector.py | 1 - .../doctype/plaid_settings/plaid_settings.py | 1 - .../doctype/plaid_settings/test_plaid_settings.py | 1 - .../doctype/quickbooks_migrator/quickbooks_migrator.py | 2 -- .../doctype/quickbooks_migrator/test_quickbooks_migrator.py | 2 -- .../doctype/tally_migration/tally_migration.py | 2 -- .../doctype/tally_migration/test_tally_migration.py | 2 -- .../doctype/taxjar_settings/taxjar_settings.py | 2 -- .../doctype/taxjar_settings/test_taxjar_settings.py | 2 -- .../doctype/woocommerce_settings/test_woocommerce_settings.py | 2 -- .../doctype/woocommerce_settings/woocommerce_settings.py | 2 -- erpnext/erpnext_integrations/stripe_integration.py | 1 - erpnext/erpnext_integrations/utils.py | 1 - erpnext/exceptions.py | 1 - erpnext/hooks.py | 1 - erpnext/hotels/doctype/hotel_room/hotel_room.py | 2 -- erpnext/hotels/doctype/hotel_room/test_hotel_room.py | 2 -- .../hotels/doctype/hotel_room_amenity/hotel_room_amenity.py | 2 -- .../hotels/doctype/hotel_room_package/hotel_room_package.py | 2 -- .../doctype/hotel_room_package/test_hotel_room_package.py | 2 -- .../hotels/doctype/hotel_room_pricing/hotel_room_pricing.py | 2 -- .../doctype/hotel_room_pricing/test_hotel_room_pricing.py | 2 -- .../doctype/hotel_room_pricing_item/hotel_room_pricing_item.py | 2 -- .../hotel_room_pricing_package/hotel_room_pricing_package.py | 2 -- .../test_hotel_room_pricing_package.py | 2 -- .../doctype/hotel_room_reservation/hotel_room_reservation.py | 2 -- .../hotel_room_reservation/test_hotel_room_reservation.py | 2 -- .../hotel_room_reservation_item/hotel_room_reservation_item.py | 2 -- erpnext/hotels/doctype/hotel_room_type/hotel_room_type.py | 2 -- erpnext/hotels/doctype/hotel_room_type/test_hotel_room_type.py | 2 -- erpnext/hotels/doctype/hotel_settings/hotel_settings.py | 2 -- erpnext/hotels/doctype/hotel_settings/test_hotel_settings.py | 2 -- .../hotels/report/hotel_room_occupancy/hotel_room_occupancy.py | 1 - erpnext/hr/doctype/__init__.py | 1 - erpnext/hr/doctype/appointment_letter/appointment_letter.py | 2 -- .../hr/doctype/appointment_letter/test_appointment_letter.py | 2 -- .../appointment_letter_content/appointment_letter_content.py | 2 -- .../appointment_letter_template/appointment_letter_template.py | 2 -- .../test_appointment_letter_template.py | 2 -- erpnext/hr/doctype/appraisal/__init__.py | 1 - erpnext/hr/doctype/appraisal/appraisal.py | 1 - erpnext/hr/doctype/appraisal/test_appraisal.py | 1 - erpnext/hr/doctype/appraisal_goal/__init__.py | 1 - erpnext/hr/doctype/appraisal_goal/appraisal_goal.py | 1 - erpnext/hr/doctype/appraisal_template/__init__.py | 1 - erpnext/hr/doctype/appraisal_template/appraisal_template.py | 1 - .../doctype/appraisal_template/appraisal_template_dashboard.py | 1 - .../hr/doctype/appraisal_template/test_appraisal_template.py | 1 - erpnext/hr/doctype/appraisal_template_goal/__init__.py | 1 - .../doctype/appraisal_template_goal/appraisal_template_goal.py | 1 - erpnext/hr/doctype/attendance/__init__.py | 1 - erpnext/hr/doctype/attendance/attendance.py | 1 - erpnext/hr/doctype/attendance/attendance_dashboard.py | 1 - erpnext/hr/doctype/attendance/test_attendance.py | 1 - erpnext/hr/doctype/attendance_request/attendance_request.py | 2 -- .../doctype/attendance_request/attendance_request_dashboard.py | 1 - .../hr/doctype/attendance_request/test_attendance_request.py | 2 -- erpnext/hr/doctype/branch/__init__.py | 1 - erpnext/hr/doctype/branch/branch.py | 1 - erpnext/hr/doctype/branch/test_branch.py | 1 - .../compensatory_leave_request/compensatory_leave_request.py | 2 -- .../test_compensatory_leave_request.py | 2 -- erpnext/hr/doctype/daily_work_summary/daily_work_summary.py | 2 -- .../hr/doctype/daily_work_summary/test_daily_work_summary.py | 2 -- .../daily_work_summary_group/daily_work_summary_group.py | 1 - .../daily_work_summary_group_user.py | 2 -- erpnext/hr/doctype/department/__init__.py | 1 - erpnext/hr/doctype/department/department.py | 1 - erpnext/hr/doctype/department/test_department.py | 1 - erpnext/hr/doctype/department_approver/department_approver.py | 2 -- erpnext/hr/doctype/designation/__init__.py | 1 - erpnext/hr/doctype/designation/designation.py | 1 - erpnext/hr/doctype/designation/test_designation.py | 1 - erpnext/hr/doctype/designation_skill/designation_skill.py | 2 -- erpnext/hr/doctype/driver/driver.py | 2 -- erpnext/hr/doctype/driver/test_driver.py | 2 -- .../driving_license_category/driving_license_category.py | 2 -- erpnext/hr/doctype/employee/__init__.py | 1 - erpnext/hr/doctype/employee/employee_dashboard.py | 1 - erpnext/hr/doctype/employee_advance/employee_advance.py | 2 -- .../hr/doctype/employee_advance/employee_advance_dashboard.py | 1 - erpnext/hr/doctype/employee_advance/test_employee_advance.py | 2 -- .../employee_attendance_tool/employee_attendance_tool.py | 2 -- .../employee_boarding_activity/employee_boarding_activity.py | 2 -- erpnext/hr/doctype/employee_checkin/employee_checkin.py | 2 -- erpnext/hr/doctype/employee_checkin/test_employee_checkin.py | 2 -- erpnext/hr/doctype/employee_education/__init__.py | 1 - erpnext/hr/doctype/employee_education/employee_education.py | 1 - erpnext/hr/doctype/employee_external_work_history/__init__.py | 1 - .../employee_external_work_history.py | 1 - erpnext/hr/doctype/employee_grade/employee_grade.py | 2 -- erpnext/hr/doctype/employee_grade/employee_grade_dashboard.py | 1 - erpnext/hr/doctype/employee_grade/test_employee_grade.py | 2 -- erpnext/hr/doctype/employee_group/employee_group.py | 2 -- erpnext/hr/doctype/employee_group/test_employee_group.py | 2 -- .../hr/doctype/employee_group_table/employee_group_table.py | 2 -- .../employee_health_insurance/employee_health_insurance.py | 2 -- .../test_employee_health_insurance.py | 2 -- erpnext/hr/doctype/employee_internal_work_history/__init__.py | 1 - .../employee_internal_work_history.py | 1 - erpnext/hr/doctype/employee_onboarding/employee_onboarding.py | 2 -- .../hr/doctype/employee_onboarding/test_employee_onboarding.py | 2 -- .../employee_onboarding_template.py | 2 -- .../employee_onboarding_template_dashboard.py | 1 - .../test_employee_onboarding_template.py | 2 -- erpnext/hr/doctype/employee_promotion/employee_promotion.py | 2 -- .../hr/doctype/employee_promotion/test_employee_promotion.py | 2 -- .../employee_property_history/employee_property_history.py | 2 -- erpnext/hr/doctype/employee_referral/employee_referral.py | 2 -- .../doctype/employee_referral/employee_referral_dashboard.py | 1 - erpnext/hr/doctype/employee_referral/test_employee_referral.py | 2 -- erpnext/hr/doctype/employee_separation/employee_separation.py | 2 -- .../hr/doctype/employee_separation/test_employee_separation.py | 2 -- .../employee_separation_template.py | 2 -- .../employee_separation_template_dashboard.py | 1 - .../test_employee_separation_template.py | 2 -- erpnext/hr/doctype/employee_skill/employee_skill.py | 2 -- erpnext/hr/doctype/employee_skill_map/employee_skill_map.py | 2 -- erpnext/hr/doctype/employee_training/employee_training.py | 2 -- erpnext/hr/doctype/employee_transfer/employee_transfer.py | 2 -- erpnext/hr/doctype/employee_transfer/test_employee_transfer.py | 2 -- .../employee_transfer_property/employee_transfer_property.py | 2 -- .../test_employee_transfer_property.py | 2 -- erpnext/hr/doctype/employment_type/__init__.py | 1 - erpnext/hr/doctype/employment_type/employment_type.py | 1 - erpnext/hr/doctype/employment_type/test_employment_type.py | 1 - erpnext/hr/doctype/expected_skill_set/expected_skill_set.py | 2 -- erpnext/hr/doctype/expense_claim/__init__.py | 1 - erpnext/hr/doctype/expense_claim/expense_claim.py | 1 - erpnext/hr/doctype/expense_claim/expense_claim_dashboard.py | 1 - erpnext/hr/doctype/expense_claim/test_expense_claim.py | 1 - .../hr/doctype/expense_claim_account/expense_claim_account.py | 2 -- .../hr/doctype/expense_claim_advance/expense_claim_advance.py | 2 -- erpnext/hr/doctype/expense_claim_detail/__init__.py | 1 - .../hr/doctype/expense_claim_detail/expense_claim_detail.py | 1 - erpnext/hr/doctype/expense_claim_type/__init__.py | 1 - erpnext/hr/doctype/expense_claim_type/expense_claim_type.py | 1 - .../hr/doctype/expense_claim_type/test_expense_claim_type.py | 2 -- .../expense_taxes_and_charges/expense_taxes_and_charges.py | 2 -- erpnext/hr/doctype/holiday/__init__.py | 1 - erpnext/hr/doctype/holiday/holiday.py | 1 - erpnext/hr/doctype/holiday_list/__init__.py | 1 - erpnext/hr/doctype/holiday_list/holiday_list.py | 1 - erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py | 1 - erpnext/hr/doctype/holiday_list/test_holiday_list.py | 1 - erpnext/hr/doctype/hr_settings/test_hr_settings.py | 2 -- .../identification_document_type.py | 2 -- .../test_identification_document_type.py | 2 -- erpnext/hr/doctype/interest/interest.py | 2 -- erpnext/hr/doctype/interest/test_interest.py | 2 -- erpnext/hr/doctype/interview/interview.py | 2 -- erpnext/hr/doctype/interview/test_interview.py | 2 -- erpnext/hr/doctype/interview_detail/interview_detail.py | 2 -- erpnext/hr/doctype/interview_detail/test_interview_detail.py | 2 -- erpnext/hr/doctype/interview_feedback/interview_feedback.py | 2 -- .../hr/doctype/interview_feedback/test_interview_feedback.py | 2 -- erpnext/hr/doctype/interview_round/interview_round.py | 2 -- erpnext/hr/doctype/interview_round/test_interview_round.py | 2 -- erpnext/hr/doctype/interview_type/interview_type.py | 2 -- erpnext/hr/doctype/interview_type/test_interview_type.py | 2 -- erpnext/hr/doctype/interviewer/interviewer.py | 2 -- erpnext/hr/doctype/job_applicant/job_applicant.py | 1 - erpnext/hr/doctype/job_applicant/job_applicant_dashboard.py | 1 - erpnext/hr/doctype/job_applicant/test_job_applicant.py | 2 -- .../hr/doctype/job_applicant_source/job_applicant_source.py | 2 -- .../doctype/job_applicant_source/test_job_applicant_source.py | 2 -- erpnext/hr/doctype/job_offer/job_offer.py | 1 - erpnext/hr/doctype/job_offer/test_job_offer.py | 1 - erpnext/hr/doctype/job_offer_term/job_offer_term.py | 1 - erpnext/hr/doctype/job_opening/job_opening.py | 1 - erpnext/hr/doctype/job_opening/job_opening_dashboard.py | 1 - erpnext/hr/doctype/job_opening/test_job_opening.py | 2 -- erpnext/hr/doctype/leave_allocation/__init__.py | 1 - erpnext/hr/doctype/leave_allocation/leave_allocation.py | 1 - .../hr/doctype/leave_allocation/leave_allocation_dashboard.py | 1 - erpnext/hr/doctype/leave_allocation/test_leave_allocation.py | 1 - erpnext/hr/doctype/leave_application/__init__.py | 1 - erpnext/hr/doctype/leave_application/leave_application.py | 1 - .../doctype/leave_application/leave_application_dashboard.py | 1 - erpnext/hr/doctype/leave_application/test_leave_application.py | 1 - erpnext/hr/doctype/leave_block_list/leave_block_list.py | 1 - .../hr/doctype/leave_block_list/leave_block_list_dashboard.py | 1 - erpnext/hr/doctype/leave_block_list/test_leave_block_list.py | 1 - .../doctype/leave_block_list_allow/leave_block_list_allow.py | 1 - .../hr/doctype/leave_block_list_date/leave_block_list_date.py | 1 - erpnext/hr/doctype/leave_control_panel/__init__.py | 1 - erpnext/hr/doctype/leave_control_panel/leave_control_panel.py | 1 - .../hr/doctype/leave_control_panel/test_leave_control_panel.py | 2 -- erpnext/hr/doctype/leave_encashment/leave_encashment.py | 2 -- erpnext/hr/doctype/leave_encashment/test_leave_encashment.py | 2 -- erpnext/hr/doctype/leave_ledger_entry/leave_ledger_entry.py | 2 -- .../hr/doctype/leave_ledger_entry/test_leave_ledger_entry.py | 2 -- erpnext/hr/doctype/leave_period/leave_period.py | 2 -- erpnext/hr/doctype/leave_period/leave_period_dashboard.py | 1 - erpnext/hr/doctype/leave_period/test_leave_period.py | 2 -- erpnext/hr/doctype/leave_policy/leave_policy.py | 2 -- erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py | 1 - erpnext/hr/doctype/leave_policy/test_leave_policy.py | 2 -- .../doctype/leave_policy_assignment/leave_policy_assignment.py | 2 -- .../leave_policy_assignment_dashboard.py | 1 - .../leave_policy_assignment/test_leave_policy_assignment.py | 2 -- erpnext/hr/doctype/leave_policy_detail/leave_policy_detail.py | 2 -- .../hr/doctype/leave_policy_detail/test_leave_policy_detail.py | 2 -- erpnext/hr/doctype/leave_type/__init__.py | 1 - erpnext/hr/doctype/leave_type/leave_type.py | 1 - erpnext/hr/doctype/leave_type/leave_type_dashboard.py | 1 - erpnext/hr/doctype/leave_type/test_leave_type.py | 1 - erpnext/hr/doctype/offer_term/offer_term.py | 1 - erpnext/hr/doctype/offer_term/test_offer_term.py | 1 - erpnext/hr/doctype/purpose_of_travel/purpose_of_travel.py | 2 -- erpnext/hr/doctype/purpose_of_travel/test_purpose_of_travel.py | 2 -- erpnext/hr/doctype/shift_assignment/shift_assignment.py | 2 -- erpnext/hr/doctype/shift_assignment/test_shift_assignment.py | 2 -- erpnext/hr/doctype/shift_request/shift_request.py | 2 -- erpnext/hr/doctype/shift_request/shift_request_dashboard.py | 1 - erpnext/hr/doctype/shift_request/test_shift_request.py | 2 -- erpnext/hr/doctype/shift_type/shift_type.py | 2 -- erpnext/hr/doctype/shift_type/shift_type_dashboard.py | 1 - erpnext/hr/doctype/shift_type/test_shift_type.py | 2 -- erpnext/hr/doctype/skill/skill.py | 2 -- erpnext/hr/doctype/skill_assessment/skill_assessment.py | 2 -- erpnext/hr/doctype/staffing_plan/staffing_plan.py | 2 -- erpnext/hr/doctype/staffing_plan/staffing_plan_dashboard.py | 1 - erpnext/hr/doctype/staffing_plan/test_staffing_plan.py | 2 -- .../hr/doctype/staffing_plan_detail/staffing_plan_detail.py | 2 -- erpnext/hr/doctype/training_event/test_training_event.py | 2 -- erpnext/hr/doctype/training_event/training_event.py | 2 -- erpnext/hr/doctype/training_event/training_event_dashboard.py | 1 - .../doctype/training_event_employee/training_event_employee.py | 2 -- erpnext/hr/doctype/training_feedback/test_training_feedback.py | 2 -- erpnext/hr/doctype/training_feedback/training_feedback.py | 2 -- erpnext/hr/doctype/training_program/test_training_program.py | 2 -- erpnext/hr/doctype/training_program/training_program.py | 2 -- .../hr/doctype/training_program/training_program_dashboard.py | 1 - erpnext/hr/doctype/training_result/test_training_result.py | 2 -- erpnext/hr/doctype/training_result/training_result.py | 2 -- .../training_result_employee/training_result_employee.py | 2 -- erpnext/hr/doctype/travel_itinerary/travel_itinerary.py | 2 -- erpnext/hr/doctype/travel_request/test_travel_request.py | 2 -- erpnext/hr/doctype/travel_request/travel_request.py | 2 -- .../doctype/travel_request_costing/travel_request_costing.py | 2 -- erpnext/hr/doctype/upload_attendance/test_upload_attendance.py | 2 -- erpnext/hr/doctype/upload_attendance/upload_attendance.py | 1 - erpnext/hr/doctype/vehicle/test_vehicle.py | 2 -- erpnext/hr/doctype/vehicle/vehicle.py | 2 -- erpnext/hr/doctype/vehicle/vehicle_dashboard.py | 1 - erpnext/hr/doctype/vehicle_log/test_vehicle_log.py | 2 -- erpnext/hr/doctype/vehicle_log/vehicle_log.py | 2 -- erpnext/hr/doctype/vehicle_service/vehicle_service.py | 2 -- erpnext/hr/notification/training_feedback/training_feedback.py | 1 - .../hr/notification/training_scheduled/training_scheduled.py | 1 - erpnext/hr/page/__init__.py | 1 - erpnext/hr/page/organizational_chart/organizational_chart.py | 1 - erpnext/hr/page/team_updates/team_updates.py | 1 - .../daily_work_summary_replies/daily_work_summary_replies.py | 1 - .../employee_advance_summary/employee_advance_summary.py | 1 - erpnext/hr/report/employee_analytics/employee_analytics.py | 1 - erpnext/hr/report/employee_birthday/employee_birthday.py | 1 - .../hr/report/employee_leave_balance/employee_leave_balance.py | 1 - .../employee_leave_balance_summary.py | 1 - .../employees_working_on_a_holiday.py | 1 - .../monthly_attendance_sheet/monthly_attendance_sheet.py | 1 - .../hr/report/recruitment_analytics/recruitment_analytics.py | 1 - erpnext/hr/report/vehicle_expenses/test_vehicle_expenses.py | 1 - erpnext/hr/report/vehicle_expenses/vehicle_expenses.py | 1 - erpnext/hr/web_form/job_application/job_application.py | 1 - .../top_10_pledged_loan_securities.py | 1 - erpnext/loan_management/doctype/loan/loan.py | 2 -- erpnext/loan_management/doctype/loan/loan_dashboard.py | 1 - erpnext/loan_management/doctype/loan/test_loan.py | 2 -- .../doctype/loan_application/loan_application.py | 2 -- .../doctype/loan_application/loan_application_dashboard.py | 1 - .../doctype/loan_application/test_loan_application.py | 2 -- .../doctype/loan_disbursement/loan_disbursement.py | 2 -- .../doctype/loan_disbursement/test_loan_disbursement.py | 2 -- .../doctype/loan_interest_accrual/loan_interest_accrual.py | 2 -- .../loan_interest_accrual/test_loan_interest_accrual.py | 2 -- .../loan_management/doctype/loan_repayment/loan_repayment.py | 2 -- .../doctype/loan_repayment/test_loan_repayment.py | 2 -- .../doctype/loan_repayment_detail/loan_repayment_detail.py | 2 -- erpnext/loan_management/doctype/loan_security/loan_security.py | 2 -- .../doctype/loan_security/loan_security_dashboard.py | 1 - .../doctype/loan_security/test_loan_security.py | 2 -- .../doctype/loan_security_pledge/loan_security_pledge.py | 2 -- .../doctype/loan_security_pledge/test_loan_security_pledge.py | 2 -- .../doctype/loan_security_price/loan_security_price.py | 2 -- .../doctype/loan_security_price/test_loan_security_price.py | 2 -- .../doctype/loan_security_shortfall/loan_security_shortfall.py | 2 -- .../loan_security_shortfall/test_loan_security_shortfall.py | 2 -- .../doctype/loan_security_type/loan_security_type.py | 2 -- .../doctype/loan_security_type/loan_security_type_dashboard.py | 1 - .../doctype/loan_security_type/test_loan_security_type.py | 2 -- .../doctype/loan_security_unpledge/loan_security_unpledge.py | 2 -- .../loan_security_unpledge/test_loan_security_unpledge.py | 2 -- erpnext/loan_management/doctype/loan_type/loan_type.py | 2 -- .../loan_management/doctype/loan_type/loan_type_dashboard.py | 1 - erpnext/loan_management/doctype/loan_type/test_loan_type.py | 2 -- .../loan_management/doctype/loan_write_off/loan_write_off.py | 2 -- .../doctype/loan_write_off/test_loan_write_off.py | 2 -- erpnext/loan_management/doctype/pledge/pledge.py | 2 -- erpnext/loan_management/doctype/pledge/test_pledge.py | 2 -- .../process_loan_interest_accrual.py | 2 -- .../process_loan_interest_accrual_dashboard.py | 1 - .../test_process_loan_interest_accrual.py | 2 -- .../process_loan_security_shortfall.py | 2 -- .../process_loan_security_shortfall_dashboard.py | 1 - .../test_process_loan_security_shortfall.py | 2 -- .../loan_management/doctype/proposed_pledge/proposed_pledge.py | 2 -- .../doctype/repayment_schedule/repayment_schedule.py | 2 -- .../doctype/salary_slip_loan/salary_slip_loan.py | 2 -- .../doctype/sanctioned_loan_amount/sanctioned_loan_amount.py | 2 -- .../sanctioned_loan_amount/test_sanctioned_loan_amount.py | 2 -- erpnext/loan_management/doctype/unpledge/unpledge.py | 2 -- .../applicant_wise_loan_security_exposure.py | 1 - .../report/loan_interest_report/loan_interest_report.py | 1 - .../loan_repayment_and_closure/loan_repayment_and_closure.py | 1 - .../report/loan_security_exposure/loan_security_exposure.py | 1 - .../report/loan_security_status/loan_security_status.py | 1 - .../doctype/maintenance_schedule/maintenance_schedule.py | 1 - .../doctype/maintenance_schedule/test_maintenance_schedule.py | 2 -- .../maintenance_schedule_detail/maintenance_schedule_detail.py | 2 -- .../maintenance_schedule_item/maintenance_schedule_item.py | 2 -- .../maintenance/doctype/maintenance_visit/maintenance_visit.py | 1 - .../doctype/maintenance_visit/test_maintenance_visit.py | 2 -- .../maintenance_visit_purpose/maintenance_visit_purpose.py | 2 -- erpnext/manufacturing/doctype/__init__.py | 1 - erpnext/manufacturing/doctype/blanket_order/blanket_order.py | 2 -- .../doctype/blanket_order/blanket_order_dashboard.py | 1 - .../manufacturing/doctype/blanket_order/test_blanket_order.py | 2 -- .../doctype/blanket_order_item/blanket_order_item.py | 2 -- erpnext/manufacturing/doctype/bom/__init__.py | 1 - erpnext/manufacturing/doctype/bom/bom_dashboard.py | 1 - erpnext/manufacturing/doctype/bom_explosion_item/__init__.py | 1 - .../doctype/bom_explosion_item/bom_explosion_item.py | 1 - erpnext/manufacturing/doctype/bom_item/__init__.py | 1 - erpnext/manufacturing/doctype/bom_item/bom_item.py | 1 - erpnext/manufacturing/doctype/bom_operation/__init__.py | 1 - erpnext/manufacturing/doctype/bom_operation/bom_operation.py | 1 - erpnext/manufacturing/doctype/bom_scrap_item/bom_scrap_item.py | 2 -- .../manufacturing/doctype/bom_update_tool/bom_update_tool.py | 2 -- .../doctype/bom_update_tool/test_bom_update_tool.py | 1 - .../manufacturing/doctype/bom_website_item/bom_website_item.py | 2 -- .../doctype/bom_website_operation/bom_website_operation.py | 2 -- erpnext/manufacturing/doctype/downtime_entry/downtime_entry.py | 2 -- .../doctype/downtime_entry/test_downtime_entry.py | 2 -- erpnext/manufacturing/doctype/job_card/job_card.py | 1 - erpnext/manufacturing/doctype/job_card/job_card_dashboard.py | 1 - erpnext/manufacturing/doctype/job_card/test_job_card.py | 1 - erpnext/manufacturing/doctype/job_card_item/job_card_item.py | 2 -- .../doctype/job_card_operation/job_card_operation.py | 2 -- .../doctype/job_card_time_log/job_card_time_log.py | 2 -- .../doctype/manufacturing_settings/manufacturing_settings.py | 1 - .../manufacturing_settings/test_manufacturing_settings.py | 2 -- .../material_request_plan_item/material_request_plan_item.py | 2 -- .../test_material_request_plan_item.py | 2 -- erpnext/manufacturing/doctype/operation/operation.py | 1 - erpnext/manufacturing/doctype/operation/operation_dashboard.py | 1 - erpnext/manufacturing/doctype/operation/test_operation.py | 1 - .../manufacturing/doctype/production_plan/production_plan.py | 2 -- .../doctype/production_plan/production_plan_dashboard.py | 1 - .../doctype/production_plan/test_production_plan.py | 2 -- erpnext/manufacturing/doctype/production_plan_item/__init__.py | 1 - .../doctype/production_plan_item/production_plan_item.py | 1 - .../production_plan_item_reference.py | 2 -- .../production_plan_material_request.py | 2 -- .../production_plan_material_request_warehouse.py | 2 -- .../test_production_plan_material_request_warehouse.py | 2 -- .../doctype/production_plan_sales_order/__init__.py | 1 - .../production_plan_sales_order/production_plan_sales_order.py | 1 - .../production_plan_sub_assembly_item.py | 2 -- erpnext/manufacturing/doctype/routing/routing.py | 2 -- erpnext/manufacturing/doctype/routing/routing_dashboard.py | 1 - erpnext/manufacturing/doctype/routing/test_routing.py | 2 -- erpnext/manufacturing/doctype/sub_operation/sub_operation.py | 2 -- .../manufacturing/doctype/sub_operation/test_sub_operation.py | 2 -- erpnext/manufacturing/doctype/work_order/__init__.py | 1 - .../manufacturing/doctype/work_order/work_order_dashboard.py | 1 - .../manufacturing/doctype/work_order_item/work_order_item.py | 2 -- .../doctype/work_order_operation/work_order_operation.py | 1 - erpnext/manufacturing/doctype/workstation/__init__.py | 1 - erpnext/manufacturing/doctype/workstation/test_workstation.py | 1 - erpnext/manufacturing/doctype/workstation/workstation.py | 1 - .../manufacturing/doctype/workstation/workstation_dashboard.py | 1 - .../workstation_working_hour/workstation_working_hour.py | 1 - .../material_request_receipt_notification.py | 1 - erpnext/manufacturing/report/bom_explorer/bom_explorer.py | 1 - .../report/bom_operations_time/bom_operations_time.py | 1 - .../report/bom_stock_calculated/bom_stock_calculated.py | 1 - .../manufacturing/report/bom_stock_report/bom_stock_report.py | 1 - .../report/bom_variance_report/bom_variance_report.py | 1 - .../cost_of_poor_quality_report/cost_of_poor_quality_report.py | 1 - .../report/downtime_analysis/downtime_analysis.py | 1 - .../exponential_smoothing_forecasting.py | 1 - .../manufacturing/report/job_card_summary/job_card_summary.py | 1 - .../report/production_analytics/production_analytics.py | 1 - .../report/production_plan_summary/production_plan_summary.py | 1 - .../production_planning_report/production_planning_report.py | 1 - .../quality_inspection_summary/quality_inspection_summary.py | 1 - .../report/work_order_stock_report/work_order_stock_report.py | 1 - .../report/work_order_summary/work_order_summary.py | 1 - .../certification_application/certification_application.py | 2 -- .../test_certification_application.py | 2 -- .../doctype/certified_consultant/certified_consultant.py | 2 -- .../doctype/certified_consultant/test_certified_consultant.py | 2 -- erpnext/non_profit/doctype/chapter/chapter.py | 2 -- erpnext/non_profit/doctype/chapter/test_chapter.py | 2 -- erpnext/non_profit/doctype/chapter_member/chapter_member.py | 2 -- erpnext/non_profit/doctype/donation/donation.py | 2 -- erpnext/non_profit/doctype/donation/donation_dashboard.py | 1 - erpnext/non_profit/doctype/donation/test_donation.py | 2 -- erpnext/non_profit/doctype/donor/donor.py | 2 -- erpnext/non_profit/doctype/donor/test_donor.py | 2 -- erpnext/non_profit/doctype/donor_type/donor_type.py | 2 -- erpnext/non_profit/doctype/donor_type/test_donor_type.py | 2 -- .../non_profit/doctype/grant_application/grant_application.py | 2 -- .../doctype/grant_application/test_grant_application.py | 2 -- erpnext/non_profit/doctype/member/member.py | 2 -- erpnext/non_profit/doctype/member/member_dashboard.py | 1 - erpnext/non_profit/doctype/member/test_member.py | 2 -- erpnext/non_profit/doctype/membership/membership.py | 2 -- erpnext/non_profit/doctype/membership/test_membership.py | 2 -- erpnext/non_profit/doctype/membership_type/membership_type.py | 2 -- .../non_profit/doctype/membership_type/test_membership_type.py | 2 -- .../doctype/non_profit_settings/non_profit_settings.py | 2 -- .../doctype/non_profit_settings/test_non_profit_settings.py | 2 -- erpnext/non_profit/doctype/volunteer/test_volunteer.py | 2 -- erpnext/non_profit/doctype/volunteer/volunteer.py | 2 -- erpnext/non_profit/doctype/volunteer_skill/volunteer_skill.py | 2 -- .../non_profit/doctype/volunteer_type/test_volunteer_type.py | 2 -- erpnext/non_profit/doctype/volunteer_type/volunteer_type.py | 2 -- .../report/expiring_memberships/expiring_memberships.py | 1 - .../certification_application/certification_application.py | 1 - .../certification_application_usd.py | 1 - .../non_profit/web_form/grant_application/grant_application.py | 1 - erpnext/patches/__init__.py | 1 - erpnext/patches/v10_0/add_default_cash_flow_mappers.py | 1 - .../v10_0/fichier_des_ecritures_comptables_for_france.py | 1 - erpnext/patches/v10_0/item_barcode_childtable_migrate.py | 1 - ..._daily_work_summary_settings_to_daily_work_summary_group.py | 1 - erpnext/patches/v10_0/rename_offer_letter_to_job_offer.py | 1 - erpnext/patches/v10_0/rename_price_to_rate_in_pricing_rule.py | 1 - erpnext/patches/v10_0/set_currency_in_pricing_rule.py | 1 - erpnext/patches/v10_0/update_translatable_fields.py | 1 - erpnext/patches/v10_1/transfer_subscription_to_auto_repeat.py | 1 - .../v11_0/add_default_dispatch_notification_template.py | 1 - erpnext/patches/v11_0/add_default_email_template_for_leave.py | 1 - erpnext/patches/v11_0/add_expense_claim_default_account.py | 1 - erpnext/patches/v11_0/add_index_on_nestedset_doctypes.py | 1 - erpnext/patches/v11_0/add_item_group_defaults.py | 1 - erpnext/patches/v11_0/add_market_segments.py | 1 - erpnext/patches/v11_0/add_sales_stages.py | 1 - .../patches/v11_0/check_buying_selling_in_currency_exchange.py | 1 - erpnext/patches/v11_0/create_default_success_action.py | 1 - .../v11_0/create_department_records_for_each_company.py | 1 - erpnext/patches/v11_0/create_salary_structure_assignments.py | 1 - erpnext/patches/v11_0/drop_column_max_days_allowed.py | 1 - erpnext/patches/v11_0/ewaybill_fields_gst_india.py | 1 - erpnext/patches/v11_0/hr_ux_cleanups.py | 1 - erpnext/patches/v11_0/inter_state_field_for_gst.py | 1 - .../v11_0/make_asset_finance_book_against_old_entries.py | 1 - erpnext/patches/v11_0/make_italian_localization_fields.py | 1 - erpnext/patches/v11_0/make_job_card.py | 1 - erpnext/patches/v11_0/make_location_from_warehouse.py | 1 - erpnext/patches/v11_0/make_quality_inspection_template.py | 1 - erpnext/patches/v11_0/merge_land_unit_with_location.py | 1 - .../move_item_defaults_to_child_table_for_multicompany.py | 1 - erpnext/patches/v11_0/move_leave_approvers_from_employee.py | 1 - erpnext/patches/v11_0/rebuild_tree_for_company.py | 1 - erpnext/patches/v11_0/refactor_autoname_naming.py | 1 - erpnext/patches/v11_0/refactor_naming_series.py | 1 - erpnext/patches/v11_0/remove_modules_setup_page.py | 1 - .../rename_additional_salary_component_additional_salary.py | 1 - erpnext/patches/v11_0/rename_asset_adjustment_doctype.py | 1 - erpnext/patches/v11_0/rename_bom_wo_fields.py | 1 - erpnext/patches/v11_0/rename_field_max_days_allowed.py | 1 - erpnext/patches/v11_0/rename_members_with_naming_series.py | 1 - erpnext/patches/v11_0/rename_overproduction_percent_field.py | 1 - erpnext/patches/v11_0/rename_production_order_to_work_order.py | 1 - .../patches/v11_0/rename_supplier_type_to_supplier_group.py | 1 - erpnext/patches/v11_0/renamed_from_to_fields_in_project.py | 1 - erpnext/patches/v11_0/set_default_email_template_in_hr.py | 1 - erpnext/patches/v11_0/set_department_for_doctypes.py | 1 - erpnext/patches/v11_0/set_missing_gst_hsn_code.py | 1 - erpnext/patches/v11_0/set_salary_component_properties.py | 1 - .../v11_0/set_update_field_and_value_in_workflow_state.py | 1 - erpnext/patches/v11_0/set_user_permissions_for_department.py | 1 - .../patches/v11_0/skip_user_permission_check_for_department.py | 1 - erpnext/patches/v11_0/uom_conversion_data.py | 1 - erpnext/patches/v11_0/update_account_type_in_party_type.py | 1 - erpnext/patches/v11_0/update_allow_transfer_for_manufacture.py | 1 - .../v11_0/update_backflush_subcontract_rm_based_on_bom.py | 1 - erpnext/patches/v11_0/update_brand_in_item_price.py | 1 - erpnext/patches/v11_0/update_delivery_trip_status.py | 1 - erpnext/patches/v11_0/update_department_lft_rgt.py | 1 - erpnext/patches/v11_0/update_sales_partner_type.py | 1 - erpnext/patches/v11_0/update_total_qty_field.py | 1 - erpnext/patches/v11_1/delete_bom_browser.py | 1 - erpnext/patches/v11_1/delete_scheduling_tool.py | 1 - erpnext/patches/v11_1/make_job_card_time_logs.py | 1 - erpnext/patches/v11_1/move_customer_lead_to_dynamic_column.py | 1 - erpnext/patches/v11_1/rename_depends_on_lwp.py | 1 - erpnext/patches/v11_1/renamed_delayed_item_report.py | 1 - .../patches/v11_1/set_default_action_for_quality_inspection.py | 1 - erpnext/patches/v11_1/set_missing_opportunity_from.py | 1 - erpnext/patches/v11_1/set_salary_details_submittable.py | 1 - .../v11_1/set_status_for_material_request_type_manufacture.py | 1 - erpnext/patches/v11_1/set_variant_based_on.py | 1 - erpnext/patches/v11_1/setup_guardian_role.py | 1 - erpnext/patches/v11_1/update_bank_transaction_status.py | 1 - .../patches/v11_1/update_default_supplier_in_item_defaults.py | 1 - erpnext/patches/v11_1/woocommerce_set_creation_user.py | 1 - .../v12_0/add_default_buying_selling_terms_in_company.py | 1 - .../v12_0/add_document_type_field_for_italy_einvoicing.py | 1 - erpnext/patches/v12_0/add_export_type_field_in_party_master.py | 1 - erpnext/patches/v12_0/add_gst_category_in_delivery_note.py | 1 - erpnext/patches/v12_0/add_taxjar_integration_field.py | 1 - .../v12_0/create_accounting_dimensions_in_missing_doctypes.py | 1 - erpnext/patches/v12_0/create_irs_1099_field_united_states.py | 1 - erpnext/patches/v12_0/create_itc_reversal_custom_fields.py | 1 - erpnext/patches/v12_0/create_taxable_value_field.py | 1 - erpnext/patches/v12_0/generate_leave_ledger_entries.py | 1 - erpnext/patches/v12_0/make_item_manufacturer.py | 1 - .../patches/v12_0/move_bank_account_swift_number_to_bank.py | 1 - .../v12_0/move_credit_limit_to_customer_credit_limit.py | 1 - .../patches/v12_0/move_due_advance_amount_to_pending_amount.py | 1 - erpnext/patches/v12_0/move_plaid_settings_to_doctype.py | 1 - .../v12_0/move_target_distribution_from_parent_to_child.py | 1 - erpnext/patches/v12_0/recalculate_requested_qty_in_bin.py | 1 - erpnext/patches/v12_0/remove_bank_remittance_custom_fields.py | 1 - .../patches/v12_0/remove_denied_leaves_from_leave_ledger.py | 1 - erpnext/patches/v12_0/remove_duplicate_leave_ledger_entries.py | 1 - erpnext/patches/v12_0/remove_patient_medical_record_page.py | 1 - erpnext/patches/v12_0/rename_account_type_doctype.py | 1 - .../rename_bank_account_field_in_journal_entry_account.py | 1 - erpnext/patches/v12_0/rename_bank_reconciliation.py | 1 - erpnext/patches/v12_0/rename_lost_reason_detail.py | 1 - erpnext/patches/v12_0/rename_pos_closing_doctype.py | 1 - erpnext/patches/v12_0/rename_pricing_rule_child_doctypes.py | 1 - .../v12_0/repost_stock_ledger_entries_for_target_warehouse.py | 1 - ...tically_process_deferred_accounting_in_accounts_settings.py | 1 - erpnext/patches/v12_0/set_cwip_and_delete_asset_settings.py | 1 - erpnext/patches/v12_0/set_default_payroll_based_on.py | 1 - .../v12_0/set_expense_account_in_landed_cost_voucher_taxes.py | 1 - .../v12_0/set_italian_import_supplier_invoice_permissions.py | 1 - erpnext/patches/v12_0/set_multi_uom_in_rfq.py | 1 - .../patches/v12_0/set_production_capacity_in_workstation.py | 1 - .../patches/v12_0/set_purchase_receipt_delivery_note_detail.py | 1 - erpnext/patches/v12_0/set_quotation_status.py | 1 - .../set_received_qty_in_material_request_as_per_stock_uom.py | 1 - erpnext/patches/v12_0/set_serial_no_status.py | 1 - erpnext/patches/v12_0/set_updated_purpose_in_pick_list.py | 1 - .../patches/v12_0/set_valid_till_date_in_supplier_quotation.py | 1 - erpnext/patches/v12_0/stock_entry_enhancements.py | 1 - erpnext/patches/v12_0/unhide_cost_center_field.py | 1 - .../unset_customer_supplier_based_on_type_of_item_price.py | 1 - erpnext/patches/v12_0/update_address_template_for_india.py | 1 - erpnext/patches/v12_0/update_bom_in_so_mr.py | 1 - erpnext/patches/v12_0/update_due_date_in_gle.py | 1 - .../v12_0/update_end_date_and_status_in_email_campaign.py | 1 - erpnext/patches/v12_0/update_ewaybill_field_position.py | 1 - erpnext/patches/v12_0/update_gst_category.py | 1 - erpnext/patches/v12_0/update_healthcare_refactored_changes.py | 1 - erpnext/patches/v12_0/update_is_cancelled_field.py | 1 - erpnext/patches/v12_0/update_item_tax_template_company.py | 1 - .../update_owner_fields_in_acc_dimension_custom_fields.py | 1 - erpnext/patches/v12_0/update_price_list_currency_in_bom.py | 1 - erpnext/patches/v12_0/update_price_or_product_discount.py | 1 - erpnext/patches/v12_0/update_pricing_rule_fields.py | 1 - erpnext/patches/v12_0/update_uom_conversion_factor.py | 1 - .../v13_0/add_default_interview_notification_templates.py | 1 - erpnext/patches/v13_0/add_doctype_to_sla.py | 1 - erpnext/patches/v13_0/add_naming_series_to_old_projects.py | 1 - erpnext/patches/v13_0/add_po_to_global_search.py | 1 - erpnext/patches/v13_0/add_standard_navbar_items.py | 1 - .../v13_0/bill_for_rejected_quantity_in_purchase_invoice.py | 1 - erpnext/patches/v13_0/change_default_pos_print_format.py | 1 - erpnext/patches/v13_0/check_is_income_tax_component.py | 1 - erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py | 1 - ...policy_assignment_based_on_employee_current_leave_policy.py | 1 - erpnext/patches/v13_0/create_uae_pos_invoice_fields.py | 1 - erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py | 1 - .../patches/v13_0/delete_old_bank_reconciliation_doctypes.py | 1 - erpnext/patches/v13_0/delete_old_purchase_reports.py | 1 - erpnext/patches/v13_0/delete_old_sales_reports.py | 1 - erpnext/patches/v13_0/delete_orphaned_tables.py | 1 - erpnext/patches/v13_0/drop_razorpay_payload_column.py | 1 - erpnext/patches/v13_0/germany_fill_debtor_creditor_number.py | 1 - erpnext/patches/v13_0/germany_make_custom_fields.py | 1 - erpnext/patches/v13_0/gst_fields_for_pos_invoice.py | 1 - erpnext/patches/v13_0/healthcare_lab_module_rename_doctypes.py | 1 - erpnext/patches/v13_0/loyalty_points_entry_for_pos_invoice.py | 1 - erpnext/patches/v13_0/make_non_standard_user_type.py | 1 - erpnext/patches/v13_0/modify_invalid_gain_loss_gl_entries.py | 1 - erpnext/patches/v13_0/move_branch_code_to_bank_account.py | 1 - ...move_doctype_reports_and_notification_from_hr_to_payroll.py | 1 - .../v13_0/move_payroll_setting_separately_from_hr_settings.py | 1 - .../move_tax_slabs_from_payroll_period_to_income_tax_slab.py | 1 - ...se_linking_in_additional_salary_encashment_and_incentive.py | 1 - erpnext/patches/v13_0/print_uom_after_quantity_patch.py | 1 - erpnext/patches/v13_0/rename_discharge_date_in_ip_record.py | 1 - erpnext/patches/v13_0/rename_issue_doctype_fields.py | 1 - erpnext/patches/v13_0/rename_issue_status_hold_to_on_hold.py | 1 - .../v13_0/rename_membership_settings_to_non_profit_settings.py | 1 - .../patches/v13_0/replace_pos_page_with_point_of_sale_page.py | 1 - erpnext/patches/v13_0/replace_pos_payment_mode_table.py | 1 - .../reset_clearance_date_for_intracompany_payment_entries.py | 1 - .../patches/v13_0/set_company_field_in_healthcare_doctypes.py | 1 - .../v13_0/set_payment_channel_in_payment_gateway_account.py | 1 - erpnext/patches/v13_0/set_pos_closing_as_failed.py | 1 - erpnext/patches/v13_0/set_training_event_attendance.py | 1 - erpnext/patches/v13_0/set_youtube_video_id.py | 1 - .../v13_0/setting_custom_roles_for_some_regional_reports.py | 1 - erpnext/patches/v13_0/setup_gratuity_rule_for_india_and_uae.py | 1 - erpnext/patches/v13_0/stock_entry_enhancements.py | 1 - .../patches/v13_0/update_actual_start_and_end_date_in_wo.py | 1 - erpnext/patches/v13_0/update_deferred_settings.py | 1 - erpnext/patches/v13_0/update_job_card_details.py | 1 - erpnext/patches/v13_0/update_level_in_bom.py | 1 - erpnext/patches/v13_0/update_member_email_address.py | 1 - erpnext/patches/v13_0/update_old_loans.py | 1 - erpnext/patches/v13_0/update_payment_terms_outstanding.py | 1 - erpnext/patches/v13_0/update_pos_closing_entry_in_merge_log.py | 1 - erpnext/patches/v13_0/update_project_template_tasks.py | 1 - .../patches/v13_0/update_reason_for_resignation_in_employee.py | 1 - erpnext/patches/v13_0/update_recipient_email_digest.py | 1 - erpnext/patches/v13_0/update_response_by_variance.py | 1 - erpnext/patches/v13_0/update_sla_enhancements.py | 1 - .../v13_0/update_start_end_date_for_old_shift_assignment.py | 1 - erpnext/patches/v13_0/update_subscription.py | 1 - erpnext/patches/v13_0/update_timesheet_changes.py | 1 - erpnext/patches/v13_0/validate_options_for_data_field.py | 1 - erpnext/patches/v14_0/update_opportunity_currency_fields.py | 1 - erpnext/patches/v4_2/repost_reserved_qty.py | 1 - erpnext/patches/v4_2/update_requested_and_ordered_qty.py | 1 - .../v5_7/update_item_description_based_on_item_master.py | 1 - .../v8_1/removed_roles_from_gst_report_non_indian_account.py | 1 - erpnext/patches/v8_1/setup_gst_india.py | 1 - erpnext/patches/v8_7/sync_india_custom_fields.py | 1 - erpnext/payroll/doctype/additional_salary/additional_salary.py | 2 -- .../doctype/additional_salary/test_additional_salary.py | 2 -- .../employee_benefit_application.py | 2 -- .../test_employee_benefit_application.py | 2 -- .../employee_benefit_application_detail.py | 2 -- .../doctype/employee_benefit_claim/employee_benefit_claim.py | 2 -- .../employee_benefit_claim/test_employee_benefit_claim.py | 2 -- .../payroll/doctype/employee_incentive/employee_incentive.py | 2 -- .../doctype/employee_incentive/test_employee_incentive.py | 2 -- .../doctype/employee_other_income/employee_other_income.py | 2 -- .../employee_other_income/test_employee_other_income.py | 2 -- .../employee_tax_exemption_category.py | 2 -- .../test_employee_tax_exemption_category.py | 2 -- .../employee_tax_exemption_declaration.py | 2 -- .../test_employee_tax_exemption_declaration.py | 2 -- .../employee_tax_exemption_declaration_category.py | 2 -- .../employee_tax_exemption_proof_submission.py | 2 -- .../test_employee_tax_exemption_proof_submission.py | 2 -- .../employee_tax_exemption_proof_submission_detail.py | 2 -- .../employee_tax_exemption_sub_category.py | 2 -- .../test_employee_tax_exemption_sub_category.py | 2 -- erpnext/payroll/doctype/gratuity/gratuity.py | 2 -- erpnext/payroll/doctype/gratuity/gratuity_dashboard.py | 1 - erpnext/payroll/doctype/gratuity/test_gratuity.py | 2 -- .../gratuity_applicable_component.py | 2 -- erpnext/payroll/doctype/gratuity_rule/gratuity_rule.py | 2 -- .../payroll/doctype/gratuity_rule/gratuity_rule_dashboard.py | 1 - erpnext/payroll/doctype/gratuity_rule/test_gratuity_rule.py | 2 -- .../payroll/doctype/gratuity_rule_slab/gratuity_rule_slab.py | 2 -- erpnext/payroll/doctype/income_tax_slab/income_tax_slab.py | 2 -- .../payroll/doctype/income_tax_slab/test_income_tax_slab.py | 2 -- .../income_tax_slab_other_charges.py | 2 -- .../doctype/payroll_employee_detail/payroll_employee_detail.py | 2 -- erpnext/payroll/doctype/payroll_entry/payroll_entry.py | 2 -- .../payroll/doctype/payroll_entry/payroll_entry_dashboard.py | 1 - erpnext/payroll/doctype/payroll_entry/test_payroll_entry.py | 1 - erpnext/payroll/doctype/payroll_period/payroll_period.py | 2 -- .../payroll/doctype/payroll_period/payroll_period_dashboard.py | 1 - erpnext/payroll/doctype/payroll_period/test_payroll_period.py | 2 -- .../payroll/doctype/payroll_period_date/payroll_period_date.py | 2 -- erpnext/payroll/doctype/payroll_settings/payroll_settings.py | 2 -- .../payroll/doctype/payroll_settings/test_payroll_settings.py | 2 -- erpnext/payroll/doctype/retention_bonus/retention_bonus.py | 2 -- .../payroll/doctype/retention_bonus/test_retention_bonus.py | 2 -- erpnext/payroll/doctype/salary_component/salary_component.py | 2 -- .../payroll/doctype/salary_component/test_salary_component.py | 2 -- erpnext/payroll/doctype/salary_detail/salary_detail.py | 2 -- erpnext/payroll/doctype/salary_slip/__init__.py | 1 - erpnext/payroll/doctype/salary_slip/salary_slip.py | 1 - erpnext/payroll/doctype/salary_slip/test_salary_slip.py | 1 - erpnext/payroll/doctype/salary_slip_leave/salary_slip_leave.py | 2 -- .../doctype/salary_slip_timesheet/salary_slip_timesheet.py | 2 -- erpnext/payroll/doctype/salary_structure/__init__.py | 1 - erpnext/payroll/doctype/salary_structure/salary_structure.py | 1 - .../doctype/salary_structure/salary_structure_dashboard.py | 1 - .../payroll/doctype/salary_structure/test_salary_structure.py | 1 - .../salary_structure_assignment/salary_structure_assignment.py | 2 -- .../test_salary_structure_assignment.py | 2 -- .../payroll/doctype/taxable_salary_slab/taxable_salary_slab.py | 2 -- .../payroll/notification/retention_bonus/retention_bonus.py | 1 - erpnext/payroll/report/bank_remittance/bank_remittance.py | 1 - .../report/income_tax_deductions/income_tax_deductions.py | 1 - .../salary_payments_based_on_payment_mode.py | 1 - .../report/salary_payments_via_ecs/salary_payments_via_ecs.py | 1 - erpnext/payroll/report/salary_register/salary_register.py | 1 - erpnext/portal/doctype/homepage/homepage.py | 2 -- erpnext/portal/doctype/homepage/test_homepage.py | 2 -- .../homepage_featured_product/homepage_featured_product.py | 2 -- erpnext/portal/doctype/homepage_section/homepage_section.py | 2 -- .../portal/doctype/homepage_section/test_homepage_section.py | 2 -- .../doctype/homepage_section_card/homepage_section_card.py | 2 -- erpnext/portal/doctype/products_settings/products_settings.py | 2 -- .../portal/doctype/products_settings/test_products_settings.py | 2 -- erpnext/portal/doctype/website_attribute/website_attribute.py | 2 -- .../doctype/website_filter_field/website_filter_field.py | 2 -- .../portal/product_configurator/test_product_configurator.py | 1 - erpnext/portal/utils.py | 1 - erpnext/projects/doctype/__init__.py | 1 - erpnext/projects/doctype/activity_cost/activity_cost.py | 2 -- erpnext/projects/doctype/activity_cost/test_activity_cost.py | 2 -- erpnext/projects/doctype/activity_type/activity_type.py | 1 - erpnext/projects/doctype/activity_type/test_activity_type.py | 1 - erpnext/projects/doctype/dependent_task/dependent_task.py | 2 -- erpnext/projects/doctype/project/__init__.py | 1 - erpnext/projects/doctype/project/project.py | 1 - erpnext/projects/doctype/project/project_dashboard.py | 1 - erpnext/projects/doctype/project/test_project.py | 1 - erpnext/projects/doctype/project_template/project_template.py | 2 -- .../doctype/project_template/project_template_dashboard.py | 1 - .../projects/doctype/project_template/test_project_template.py | 2 -- .../doctype/project_template_task/project_template_task.py | 2 -- erpnext/projects/doctype/project_type/project_type.py | 2 -- erpnext/projects/doctype/project_type/test_project_type.py | 2 -- erpnext/projects/doctype/project_update/project_update.py | 2 -- erpnext/projects/doctype/project_update/test_project_update.py | 2 -- erpnext/projects/doctype/project_user/project_user.py | 2 -- .../projects/doctype/projects_settings/projects_settings.py | 2 -- .../doctype/projects_settings/test_projects_settings.py | 2 -- erpnext/projects/doctype/task/__init__.py | 1 - erpnext/projects/doctype/task/task.py | 1 - erpnext/projects/doctype/task/task_dashboard.py | 1 - erpnext/projects/doctype/task/test_task.py | 1 - erpnext/projects/doctype/task_depends_on/task_depends_on.py | 2 -- erpnext/projects/doctype/task_type/task_type.py | 2 -- erpnext/projects/doctype/task_type/test_task_type.py | 2 -- erpnext/projects/doctype/timesheet/test_timesheet.py | 2 -- erpnext/projects/doctype/timesheet/timesheet.py | 2 -- erpnext/projects/doctype/timesheet/timesheet_dashboard.py | 1 - erpnext/projects/doctype/timesheet_detail/timesheet_detail.py | 2 -- erpnext/projects/report/billing_summary.py | 1 - .../report/daily_timesheet_summary/daily_timesheet_summary.py | 1 - .../report/delayed_tasks_summary/delayed_tasks_summary.py | 1 - .../report/delayed_tasks_summary/test_delayed_tasks_summary.py | 1 - .../employee_billing_summary/employee_billing_summary.py | 1 - .../employee_hours_utilization_based_on_timesheet.py | 1 - .../test_employee_util.py | 1 - .../report/project_billing_summary/project_billing_summary.py | 1 - .../report/project_profitability/project_profitability.py | 1 - .../report/project_profitability/test_project_profitability.py | 1 - erpnext/projects/report/project_summary/project_summary.py | 1 - .../project_wise_stock_tracking/project_wise_stock_tracking.py | 1 - erpnext/projects/utils.py | 1 - erpnext/projects/web_form/tasks/tasks.py | 1 - .../doctype/non_conformance/non_conformance.py | 2 -- .../doctype/non_conformance/test_non_conformance.py | 2 -- .../doctype/quality_action/quality_action.py | 2 -- .../doctype/quality_action/test_quality_action.py | 2 -- .../quality_action_resolution/quality_action_resolution.py | 2 -- .../doctype/quality_feedback/quality_feedback.py | 2 -- .../doctype/quality_feedback/test_quality_feedback.py | 2 -- .../quality_feedback_parameter/quality_feedback_parameter.py | 2 -- .../quality_feedback_template/quality_feedback_template.py | 2 -- .../test_quality_feedback_template.py | 2 -- .../quality_feedback_template_parameter.py | 2 -- .../quality_management/doctype/quality_goal/quality_goal.py | 2 -- .../doctype/quality_goal/test_quality_goal.py | 2 -- .../doctype/quality_goal_objective/quality_goal_objective.py | 2 -- .../doctype/quality_meeting/quality_meeting.py | 2 -- .../doctype/quality_meeting/test_quality_meeting.py | 2 -- .../doctype/quality_meeting_agenda/quality_meeting_agenda.py | 2 -- .../quality_meeting_agenda/test_quality_meeting_agenda.py | 2 -- .../doctype/quality_meeting_minutes/quality_meeting_minutes.py | 2 -- .../doctype/quality_procedure/quality_procedure.py | 2 -- .../doctype/quality_procedure/test_quality_procedure.py | 2 -- .../quality_procedure_process/quality_procedure_process.py | 2 -- .../doctype/quality_review/quality_review.py | 2 -- .../doctype/quality_review/test_quality_review.py | 2 -- .../quality_review_objective/quality_review_objective.py | 2 -- erpnext/regional/__init__.py | 1 - .../address_template/test_regional_address_template.py | 1 - erpnext/regional/doctype/datev_settings/datev_settings.py | 2 -- erpnext/regional/doctype/datev_settings/test_datev_settings.py | 2 -- erpnext/regional/doctype/gst_hsn_code/gst_hsn_code.py | 2 -- erpnext/regional/doctype/gst_hsn_code/test_gst_hsn_code.py | 2 -- erpnext/regional/doctype/gst_settings/gst_settings.py | 2 -- erpnext/regional/doctype/gst_settings/test_gst_settings.py | 2 -- erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py | 2 -- erpnext/regional/doctype/gstr_3b_report/test_gstr_3b_report.py | 2 -- .../doctype/import_supplier_invoice/import_supplier_invoice.py | 1 - .../import_supplier_invoice/test_import_supplier_invoice.py | 2 -- .../lower_deduction_certificate/lower_deduction_certificate.py | 2 -- .../test_lower_deduction_certificate.py | 2 -- .../tax_exemption_80g_certificate.py | 2 -- .../test_tax_exemption_80g_certificate.py | 2 -- .../tax_exemption_80g_certificate_detail.py | 2 -- erpnext/regional/doctype/uae_vat_account/uae_vat_account.py | 2 -- .../regional/doctype/uae_vat_settings/test_uae_vat_settings.py | 2 -- erpnext/regional/doctype/uae_vat_settings/uae_vat_settings.py | 2 -- erpnext/regional/france/setup.py | 1 - erpnext/regional/france/utils.py | 1 - erpnext/regional/germany/utils/datev/datev_csv.py | 1 - erpnext/regional/india/__init__.py | 1 - erpnext/regional/india/setup.py | 1 - erpnext/regional/india/test_utils.py | 1 - erpnext/regional/india/utils.py | 1 - erpnext/regional/italy/setup.py | 1 - erpnext/regional/italy/utils.py | 1 - erpnext/regional/report/datev/datev.py | 1 - erpnext/regional/report/datev/test_datev.py | 1 - .../electronic_invoice_register/electronic_invoice_register.py | 1 - erpnext/regional/report/eway_bill/eway_bill.py | 1 - .../fichier_des_ecritures_comptables_[fec].py | 1 - .../gst_itemised_purchase_register.py | 1 - .../gst_itemised_sales_register/gst_itemised_sales_register.py | 1 - .../report/gst_purchase_register/gst_purchase_register.py | 1 - .../regional/report/gst_sales_register/gst_sales_register.py | 1 - erpnext/regional/report/gstr_1/gstr_1.py | 1 - erpnext/regional/report/gstr_2/gstr_2.py | 1 - .../hsn_wise_summary_of_outward_supplies.py | 1 - erpnext/regional/report/ksa_vat/ksa_vat.py | 1 - .../professional_tax_deductions/professional_tax_deductions.py | 1 - .../provident_fund_deductions/provident_fund_deductions.py | 1 - erpnext/regional/report/uae_vat_201/test_uae_vat_201.py | 1 - erpnext/regional/report/uae_vat_201/uae_vat_201.py | 1 - .../regional/report/vat_audit_report/test_vat_audit_report.py | 1 - erpnext/regional/report/vat_audit_report/vat_audit_report.py | 1 - erpnext/regional/saudi_arabia/setup.py | 1 - erpnext/regional/south_africa/setup.py | 1 - erpnext/regional/turkey/setup.py | 1 - erpnext/regional/united_arab_emirates/setup.py | 1 - erpnext/regional/united_arab_emirates/utils.py | 1 - erpnext/regional/united_states/setup.py | 1 - erpnext/regional/united_states/test_united_states.py | 1 - erpnext/restaurant/doctype/restaurant/restaurant.py | 2 -- erpnext/restaurant/doctype/restaurant/restaurant_dashboard.py | 1 - erpnext/restaurant/doctype/restaurant/test_restaurant.py | 2 -- erpnext/restaurant/doctype/restaurant_menu/restaurant_menu.py | 2 -- .../restaurant/doctype/restaurant_menu/test_restaurant_menu.py | 2 -- .../doctype/restaurant_menu_item/restaurant_menu_item.py | 2 -- .../doctype/restaurant_order_entry/restaurant_order_entry.py | 2 -- .../restaurant_order_entry_item/restaurant_order_entry_item.py | 2 -- .../doctype/restaurant_reservation/restaurant_reservation.py | 2 -- .../restaurant_reservation/test_restaurant_reservation.py | 2 -- .../restaurant/doctype/restaurant_table/restaurant_table.py | 2 -- .../doctype/restaurant_table/test_restaurant_table.py | 2 -- erpnext/selling/doctype/__init__.py | 1 - erpnext/selling/doctype/customer/__init__.py | 1 - erpnext/selling/doctype/customer/customer.py | 1 - erpnext/selling/doctype/customer/customer_dashboard.py | 1 - erpnext/selling/doctype/customer/test_customer.py | 1 - .../doctype/customer_credit_limit/customer_credit_limit.py | 2 -- erpnext/selling/doctype/industry_type/__init__.py | 1 - erpnext/selling/doctype/industry_type/industry_type.py | 1 - erpnext/selling/doctype/industry_type/test_industry_type.py | 1 - erpnext/selling/doctype/installation_note/__init__.py | 1 - erpnext/selling/doctype/installation_note/installation_note.py | 1 - .../doctype/installation_note/test_installation_note.py | 2 -- erpnext/selling/doctype/installation_note_item/__init__.py | 1 - .../doctype/installation_note_item/installation_note_item.py | 1 - erpnext/selling/doctype/product_bundle/product_bundle.py | 1 - erpnext/selling/doctype/product_bundle/test_product_bundle.py | 1 - .../selling/doctype/product_bundle_item/product_bundle_item.py | 2 -- erpnext/selling/doctype/quotation/__init__.py | 1 - erpnext/selling/doctype/quotation/quotation.py | 1 - erpnext/selling/doctype/quotation/quotation_dashboard.py | 1 - erpnext/selling/doctype/quotation/test_quotation.py | 1 - erpnext/selling/doctype/quotation_item/__init__.py | 1 - erpnext/selling/doctype/quotation_item/quotation_item.py | 1 - erpnext/selling/doctype/sales_order/__init__.py | 1 - erpnext/selling/doctype/sales_order/sales_order.py | 1 - erpnext/selling/doctype/sales_order/sales_order_dashboard.py | 1 - erpnext/selling/doctype/sales_order/test_sales_order.py | 1 - erpnext/selling/doctype/sales_order_item/__init__.py | 1 - erpnext/selling/doctype/sales_order_item/sales_order_item.py | 1 - .../selling/doctype/sales_partner_type/sales_partner_type.py | 2 -- .../doctype/sales_partner_type/test_sales_partner_type.py | 2 -- erpnext/selling/doctype/sales_team/__init__.py | 1 - erpnext/selling/doctype/sales_team/sales_team.py | 1 - erpnext/selling/doctype/selling_settings/selling_settings.py | 1 - .../selling/doctype/selling_settings/test_selling_settings.py | 2 -- erpnext/selling/doctype/sms_center/__init__.py | 1 - erpnext/selling/doctype/sms_center/sms_center.py | 1 - erpnext/selling/page/__init__.py | 1 - erpnext/selling/page/point_of_sale/point_of_sale.py | 1 - erpnext/selling/page/sales_funnel/sales_funnel.py | 1 - .../report/address_and_contacts/address_and_contacts.py | 1 - .../available_stock_for_packing_items.py | 1 - .../customer_acquisition_and_loyalty.py | 1 - .../report/customer_credit_balance/customer_credit_balance.py | 1 - .../customer_wise_item_price/customer_wise_item_price.py | 1 - .../selling/report/inactive_customers/inactive_customers.py | 1 - .../report/item_wise_sales_history/item_wise_sales_history.py | 1 - .../pending_so_items_for_purchase_request.py | 1 - .../test_pending_so_items_for_purchase_request.py | 1 - erpnext/selling/report/quotation_trends/quotation_trends.py | 1 - erpnext/selling/report/sales_analytics/sales_analytics.py | 1 - erpnext/selling/report/sales_analytics/test_analytics.py | 1 - .../report/sales_order_analysis/sales_order_analysis.py | 1 - .../selling/report/sales_order_trends/sales_order_trends.py | 1 - .../sales_partner_commission_summary.py | 1 - .../item_group_wise_sales_target_variance.py | 1 - .../sales_partner_target_variance_based_on_item_group.py | 1 - .../sales_partner_transaction_summary.py | 1 - .../sales_person_commission_summary.py | 1 - .../sales_person_target_variance_based_on_item_group.py | 1 - .../sales_person_wise_transaction_summary.py | 1 - .../territory_target_variance_based_on_item_group.py | 1 - .../report/territory_wise_sales/territory_wise_sales.py | 1 - erpnext/setup/default_energy_point_rules.py | 1 - erpnext/setup/default_success_action.py | 1 - erpnext/setup/doctype/__init__.py | 1 - erpnext/setup/doctype/authorization_control/__init__.py | 1 - .../doctype/authorization_control/authorization_control.py | 1 - erpnext/setup/doctype/authorization_rule/__init__.py | 1 - erpnext/setup/doctype/authorization_rule/authorization_rule.py | 1 - .../doctype/authorization_rule/test_authorization_rule.py | 2 -- erpnext/setup/doctype/brand/__init__.py | 1 - erpnext/setup/doctype/brand/brand.py | 1 - erpnext/setup/doctype/brand/test_brand.py | 1 - erpnext/setup/doctype/company/__init__.py | 1 - erpnext/setup/doctype/company/company.py | 1 - erpnext/setup/doctype/company/company_dashboard.py | 1 - erpnext/setup/doctype/company/test_company.py | 1 - erpnext/setup/doctype/currency_exchange/currency_exchange.py | 1 - erpnext/setup/doctype/customer_group/__init__.py | 1 - erpnext/setup/doctype/customer_group/customer_group.py | 1 - erpnext/setup/doctype/customer_group/test_customer_group.py | 1 - erpnext/setup/doctype/email_digest/__init__.py | 1 - erpnext/setup/doctype/email_digest/email_digest.py | 1 - erpnext/setup/doctype/email_digest/quotes.py | 2 -- erpnext/setup/doctype/email_digest/test_email_digest.py | 2 -- .../doctype/email_digest_recipient/email_digest_recipient.py | 2 -- erpnext/setup/doctype/global_defaults/__init__.py | 1 - erpnext/setup/doctype/global_defaults/global_defaults.py | 1 - erpnext/setup/doctype/global_defaults/test_global_defaults.py | 2 -- erpnext/setup/doctype/item_group/__init__.py | 1 - erpnext/setup/doctype/item_group/item_group.py | 1 - erpnext/setup/doctype/item_group/test_item_group.py | 1 - erpnext/setup/doctype/naming_series/__init__.py | 1 - erpnext/setup/doctype/naming_series/naming_series.py | 1 - erpnext/setup/doctype/party_type/party_type.py | 2 -- erpnext/setup/doctype/party_type/test_party_type.py | 2 -- erpnext/setup/doctype/print_heading/__init__.py | 1 - erpnext/setup/doctype/print_heading/print_heading.py | 1 - erpnext/setup/doctype/print_heading/test_print_heading.py | 1 - erpnext/setup/doctype/quotation_lost_reason/__init__.py | 1 - .../doctype/quotation_lost_reason/quotation_lost_reason.py | 1 - .../quotation_lost_reason/test_quotation_lost_reason.py | 1 - .../quotation_lost_reason_detail.py | 2 -- erpnext/setup/doctype/sales_partner/__init__.py | 1 - erpnext/setup/doctype/sales_partner/sales_partner.py | 1 - erpnext/setup/doctype/sales_partner/test_sales_partner.py | 1 - erpnext/setup/doctype/sales_person/__init__.py | 1 - erpnext/setup/doctype/sales_person/sales_person.py | 1 - erpnext/setup/doctype/sales_person/sales_person_dashboard.py | 1 - erpnext/setup/doctype/sales_person/test_sales_person.py | 1 - erpnext/setup/doctype/supplier_group/__init__.py | 1 - erpnext/setup/doctype/supplier_group/supplier_group.py | 2 -- erpnext/setup/doctype/supplier_group/test_supplier_group.py | 2 -- erpnext/setup/doctype/target_detail/__init__.py | 1 - erpnext/setup/doctype/target_detail/target_detail.py | 1 - erpnext/setup/doctype/terms_and_conditions/__init__.py | 1 - .../setup/doctype/terms_and_conditions/terms_and_conditions.py | 1 - .../doctype/terms_and_conditions/test_terms_and_conditions.py | 1 - erpnext/setup/doctype/territory/__init__.py | 1 - erpnext/setup/doctype/territory/territory.py | 1 - erpnext/setup/doctype/territory/test_territory.py | 1 - .../test_transaction_deletion_record.py | 2 -- .../transaction_deletion_record/transaction_deletion_record.py | 2 -- .../transaction_deletion_record_item.py | 2 -- erpnext/setup/doctype/uom/__init__.py | 1 - erpnext/setup/doctype/uom/test_uom.py | 1 - erpnext/setup/doctype/uom/uom.py | 1 - .../uom_conversion_factor/test_uom_conversion_factor.py | 2 -- .../doctype/uom_conversion_factor/uom_conversion_factor.py | 2 -- erpnext/setup/doctype/website_item_group/website_item_group.py | 1 - erpnext/setup/install.py | 1 - erpnext/setup/page/__init__.py | 1 - erpnext/setup/setup_wizard/data/dashboard_charts.py | 1 - erpnext/setup/setup_wizard/data/industry_type.py | 1 - erpnext/setup/setup_wizard/operations/company_setup.py | 1 - erpnext/setup/setup_wizard/operations/default_website.py | 1 - erpnext/setup/setup_wizard/operations/defaults_setup.py | 1 - erpnext/setup/setup_wizard/operations/install_fixtures.py | 1 - erpnext/setup/setup_wizard/operations/sample_data.py | 1 - erpnext/setup/setup_wizard/operations/taxes_setup.py | 1 - erpnext/setup/setup_wizard/setup_wizard.py | 1 - erpnext/setup/setup_wizard/utils.py | 1 - erpnext/setup/utils.py | 1 - erpnext/shopping_cart/cart.py | 1 - .../doctype/shopping_cart_settings/shopping_cart_settings.py | 1 - .../shopping_cart_settings/test_shopping_cart_settings.py | 1 - erpnext/shopping_cart/filters.py | 1 - erpnext/shopping_cart/product_info.py | 1 - erpnext/shopping_cart/test_shopping_cart.py | 1 - erpnext/startup/__init__.py | 2 -- erpnext/startup/boot.py | 1 - erpnext/startup/leaderboard.py | 1 - erpnext/startup/notifications.py | 1 - erpnext/startup/report_data_map.py | 1 - erpnext/stock/__init__.py | 1 - erpnext/stock/dashboard/item_dashboard.py | 1 - erpnext/stock/dashboard/warehouse_capacity_dashboard.py | 1 - .../warehouse_wise_stock_value/warehouse_wise_stock_value.py | 1 - erpnext/stock/doctype/__init__.py | 1 - erpnext/stock/doctype/batch/__init__.py | 1 - erpnext/stock/doctype/batch/batch.py | 1 - erpnext/stock/doctype/batch/batch_dashboard.py | 1 - erpnext/stock/doctype/bin/__init__.py | 1 - erpnext/stock/doctype/bin/bin.py | 1 - erpnext/stock/doctype/bin/test_bin.py | 2 -- .../doctype/customs_tariff_number/customs_tariff_number.py | 2 -- .../customs_tariff_number/test_customs_tariff_number.py | 2 -- erpnext/stock/doctype/delivery_note/__init__.py | 1 - erpnext/stock/doctype/delivery_note/delivery_note.py | 1 - erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py | 1 - erpnext/stock/doctype/delivery_note/test_delivery_note.py | 1 - erpnext/stock/doctype/delivery_note_item/__init__.py | 1 - erpnext/stock/doctype/delivery_note_item/delivery_note_item.py | 1 - erpnext/stock/doctype/delivery_settings/delivery_settings.py | 2 -- .../stock/doctype/delivery_settings/test_delivery_settings.py | 2 -- erpnext/stock/doctype/delivery_stop/delivery_stop.py | 2 -- erpnext/stock/doctype/delivery_trip/delivery_trip.py | 2 -- erpnext/stock/doctype/delivery_trip/test_delivery_trip.py | 2 -- erpnext/stock/doctype/item/__init__.py | 1 - erpnext/stock/doctype/item/item_dashboard.py | 1 - erpnext/stock/doctype/item/test_item.py | 1 - erpnext/stock/doctype/item_alternative/item_alternative.py | 2 -- .../stock/doctype/item_alternative/test_item_alternative.py | 2 -- erpnext/stock/doctype/item_attribute/item_attribute.py | 1 - erpnext/stock/doctype/item_attribute/test_item_attribute.py | 1 - .../stock/doctype/item_attribute_value/item_attribute_value.py | 1 - erpnext/stock/doctype/item_barcode/item_barcode.py | 2 -- erpnext/stock/doctype/item_customer_detail/__init__.py | 1 - .../stock/doctype/item_customer_detail/item_customer_detail.py | 1 - erpnext/stock/doctype/item_default/item_default.py | 2 -- erpnext/stock/doctype/item_manufacturer/item_manufacturer.py | 2 -- .../stock/doctype/item_manufacturer/test_item_manufacturer.py | 2 -- erpnext/stock/doctype/item_price/__init__.py | 1 - erpnext/stock/doctype/item_price/item_price.py | 1 - erpnext/stock/doctype/item_price/test_item_price.py | 1 - .../doctype/item_quality_inspection_parameter/__init__.py | 1 - .../item_quality_inspection_parameter.py | 1 - erpnext/stock/doctype/item_reorder/item_reorder.py | 1 - erpnext/stock/doctype/item_supplier/__init__.py | 1 - erpnext/stock/doctype/item_supplier/item_supplier.py | 1 - erpnext/stock/doctype/item_tax/__init__.py | 1 - erpnext/stock/doctype/item_tax/item_tax.py | 1 - erpnext/stock/doctype/item_variant/item_variant.py | 1 - .../doctype/item_variant_attribute/item_variant_attribute.py | 2 -- .../doctype/item_variant_settings/item_variant_settings.py | 2 -- .../item_variant_settings/test_item_variant_settings.py | 2 -- .../item_website_specification/item_website_specification.py | 1 - erpnext/stock/doctype/landed_cost_item/__init__.py | 1 - erpnext/stock/doctype/landed_cost_item/landed_cost_item.py | 1 - erpnext/stock/doctype/landed_cost_purchase_receipt/__init__.py | 1 - .../landed_cost_purchase_receipt.py | 1 - .../landed_cost_taxes_and_charges.py | 1 - .../stock/doctype/landed_cost_voucher/landed_cost_voucher.py | 1 - .../doctype/landed_cost_voucher/test_landed_cost_voucher.py | 1 - erpnext/stock/doctype/manufacturer/manufacturer.py | 2 -- erpnext/stock/doctype/manufacturer/test_manufacturer.py | 2 -- erpnext/stock/doctype/material_request/material_request.py | 1 - .../doctype/material_request/material_request_dashboard.py | 1 - .../stock/doctype/material_request/test_material_request.py | 1 - .../doctype/material_request_item/material_request_item.py | 1 - erpnext/stock/doctype/packed_item/packed_item.py | 1 - erpnext/stock/doctype/packing_slip/__init__.py | 1 - erpnext/stock/doctype/packing_slip/packing_slip.py | 1 - erpnext/stock/doctype/packing_slip/test_packing_slip.py | 2 -- erpnext/stock/doctype/packing_slip_item/__init__.py | 1 - erpnext/stock/doctype/packing_slip_item/packing_slip_item.py | 1 - erpnext/stock/doctype/pick_list/pick_list.py | 1 - erpnext/stock/doctype/pick_list/pick_list_dashboard.py | 1 - erpnext/stock/doctype/pick_list/test_pick_list.py | 2 -- erpnext/stock/doctype/pick_list_item/pick_list_item.py | 2 -- erpnext/stock/doctype/price_list/__init__.py | 1 - erpnext/stock/doctype/price_list/price_list.py | 1 - erpnext/stock/doctype/price_list/test_price_list.py | 1 - erpnext/stock/doctype/price_list_country/price_list_country.py | 2 -- erpnext/stock/doctype/purchase_receipt/__init__.py | 1 - erpnext/stock/doctype/purchase_receipt/purchase_receipt.py | 1 - .../doctype/purchase_receipt/purchase_receipt_dashboard.py | 1 - .../stock/doctype/purchase_receipt/test_purchase_receipt.py | 1 - erpnext/stock/doctype/purchase_receipt_item/__init__.py | 1 - .../doctype/purchase_receipt_item/purchase_receipt_item.py | 1 - erpnext/stock/doctype/putaway_rule/putaway_rule.py | 2 -- erpnext/stock/doctype/putaway_rule/test_putaway_rule.py | 2 -- erpnext/stock/doctype/quality_inspection/__init__.py | 1 - erpnext/stock/doctype/quality_inspection/quality_inspection.py | 1 - .../quality_inspection_parameter.py | 2 -- .../test_quality_inspection_parameter.py | 2 -- .../quality_inspection_parameter_group.py | 2 -- .../test_quality_inspection_parameter_group.py | 2 -- erpnext/stock/doctype/quality_inspection_reading/__init__.py | 1 - .../quality_inspection_reading/quality_inspection_reading.py | 1 - .../quality_inspection_template/quality_inspection_template.py | 2 -- .../test_quality_inspection_template.py | 2 -- .../stock/doctype/quick_stock_balance/quick_stock_balance.py | 2 -- .../doctype/repost_item_valuation/repost_item_valuation.py | 2 -- erpnext/stock/doctype/serial_no/__init__.py | 1 - erpnext/stock/doctype/serial_no/serial_no.py | 1 - erpnext/stock/doctype/serial_no/test_serial_no.py | 1 - erpnext/stock/doctype/shipment/shipment.py | 2 -- erpnext/stock/doctype/shipment/test_shipment.py | 2 -- .../doctype/shipment_delivery_note/shipment_delivery_note.py | 2 -- erpnext/stock/doctype/shipment_parcel/shipment_parcel.py | 2 -- .../shipment_parcel_template/shipment_parcel_template.py | 2 -- .../shipment_parcel_template/test_shipment_parcel_template.py | 2 -- erpnext/stock/doctype/stock_entry/__init__.py | 1 - erpnext/stock/doctype/stock_entry/stock_entry.py | 1 - erpnext/stock/doctype/stock_entry/stock_entry_utils.py | 1 - erpnext/stock/doctype/stock_entry/test_stock_entry.py | 1 - erpnext/stock/doctype/stock_entry_detail/__init__.py | 1 - erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py | 1 - erpnext/stock/doctype/stock_entry_type/stock_entry_type.py | 2 -- .../stock/doctype/stock_entry_type/test_stock_entry_type.py | 2 -- erpnext/stock/doctype/stock_ledger_entry/__init__.py | 1 - erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py | 1 - .../doctype/stock_ledger_entry/test_stock_ledger_entry.py | 2 -- erpnext/stock/doctype/stock_reconciliation/__init__.py | 1 - .../stock/doctype/stock_reconciliation/stock_reconciliation.py | 1 - .../doctype/stock_reconciliation/test_stock_reconciliation.py | 1 - .../stock_reconciliation_item/stock_reconciliation_item.py | 1 - erpnext/stock/doctype/stock_settings/stock_settings.py | 1 - erpnext/stock/doctype/stock_settings/test_stock_settings.py | 2 -- erpnext/stock/doctype/uom_category/test_uom_category.py | 2 -- erpnext/stock/doctype/uom_category/uom_category.py | 2 -- erpnext/stock/doctype/uom_conversion_detail/__init__.py | 1 - .../doctype/uom_conversion_detail/uom_conversion_detail.py | 1 - erpnext/stock/doctype/variant_field/test_variant_field.py | 2 -- erpnext/stock/doctype/variant_field/variant_field.py | 2 -- erpnext/stock/doctype/warehouse/__init__.py | 1 - erpnext/stock/doctype/warehouse/test_warehouse.py | 1 - erpnext/stock/doctype/warehouse/warehouse.py | 1 - erpnext/stock/doctype/warehouse_type/test_warehouse_type.py | 2 -- erpnext/stock/doctype/warehouse_type/warehouse_type.py | 2 -- erpnext/stock/get_item_details.py | 1 - erpnext/stock/page/__init__.py | 1 - erpnext/stock/reorder_item.py | 1 - .../batch_item_expiry_status/batch_item_expiry_status.py | 1 - .../batch_wise_balance_history/batch_wise_balance_history.py | 1 - erpnext/stock/report/bom_search/bom_search.py | 1 - .../stock/report/delayed_item_report/delayed_item_report.py | 1 - .../stock/report/delayed_order_report/delayed_order_report.py | 1 - .../stock/report/delivery_note_trends/delivery_note_trends.py | 1 - .../incorrect_stock_value_report.py | 1 - erpnext/stock/report/item_price_stock/item_price_stock.py | 1 - erpnext/stock/report/item_prices/item_prices.py | 1 - .../stock/report/item_shortage_report/item_shortage_report.py | 1 - .../stock/report/item_variant_details/item_variant_details.py | 1 - .../itemwise_recommended_reorder_level.py | 1 - .../report/product_bundle_balance/product_bundle_balance.py | 1 - .../report/purchase_receipt_trends/purchase_receipt_trends.py | 1 - erpnext/stock/report/serial_no_ledger/serial_no_ledger.py | 1 - erpnext/stock/report/stock_ageing/stock_ageing.py | 1 - .../stock_and_account_value_comparison.py | 1 - erpnext/stock/report/stock_balance/stock_balance.py | 1 - erpnext/stock/report/stock_ledger/stock_ledger.py | 1 - .../stock/report/stock_projected_qty/stock_projected_qty.py | 1 - .../stock_qty_vs_serial_no_count.py | 1 - .../supplier_wise_sales_analytics.py | 1 - .../stock/report/total_stock_summary/total_stock_summary.py | 1 - .../warehouse_wise_item_balance_age_and_value.py | 1 - erpnext/stock/stock_balance.py | 1 - erpnext/stock/stock_ledger.py | 1 - erpnext/stock/utils.py | 1 - erpnext/support/__init__.py | 1 - erpnext/support/doctype/__init__.py | 1 - erpnext/support/doctype/issue/issue.py | 1 - erpnext/support/doctype/issue/issue_dashboard.py | 1 - erpnext/support/doctype/issue/test_issue.py | 1 - erpnext/support/doctype/issue_priority/issue_priority.py | 2 -- erpnext/support/doctype/issue_priority/test_issue_priority.py | 2 -- erpnext/support/doctype/issue_type/issue_type.py | 2 -- erpnext/support/doctype/issue_type/test_issue_type.py | 2 -- .../support/doctype/pause_sla_on_status/pause_sla_on_status.py | 2 -- erpnext/support/doctype/service_day/service_day.py | 2 -- .../doctype/service_level_agreement/service_level_agreement.py | 2 -- .../service_level_agreement/test_service_level_agreement.py | 2 -- .../doctype/service_level_priority/service_level_priority.py | 2 -- .../doctype/support_search_source/support_search_source.py | 2 -- erpnext/support/doctype/support_settings/support_settings.py | 2 -- .../support/doctype/support_settings/test_support_settings.py | 2 -- erpnext/support/doctype/warranty_claim/test_warranty_claim.py | 1 - erpnext/support/doctype/warranty_claim/warranty_claim.py | 1 - erpnext/support/page/__init__.py | 1 - .../first_response_time_for_issues.py | 1 - erpnext/support/report/issue_analytics/issue_analytics.py | 1 - erpnext/support/report/issue_analytics/test_issue_analytics.py | 1 - erpnext/support/report/issue_summary/issue_summary.py | 1 - .../support_hour_distribution/support_hour_distribution.py | 1 - erpnext/support/web_form/issues/issues.py | 1 - erpnext/telephony/doctype/call_log/call_log.py | 2 -- erpnext/telephony/doctype/call_log/test_call_log.py | 2 -- .../incoming_call_handling_schedule.py | 2 -- .../doctype/incoming_call_settings/incoming_call_settings.py | 2 -- .../incoming_call_settings/test_incoming_call_settings.py | 2 -- .../doctype/voice_call_settings/test_voice_call_settings.py | 2 -- .../doctype/voice_call_settings/voice_call_settings.py | 2 -- erpnext/templates/pages/cart.py | 1 - erpnext/templates/pages/courses.py | 1 - erpnext/templates/pages/help.py | 1 - erpnext/templates/pages/home.py | 1 - erpnext/templates/pages/integrations/gocardless_checkout.py | 1 - .../templates/pages/integrations/gocardless_confirmation.py | 1 - erpnext/templates/pages/material_request_info.py | 1 - erpnext/templates/pages/non_profit/join_chapter.py | 1 - erpnext/templates/pages/non_profit/leave_chapter.py | 1 - erpnext/templates/pages/order.py | 1 - erpnext/templates/pages/partners.py | 1 - erpnext/templates/pages/product_search.py | 1 - erpnext/templates/pages/projects.py | 1 - erpnext/templates/pages/regional/india/update_gstin.py | 1 - erpnext/templates/pages/rfq.py | 1 - erpnext/templates/pages/search_help.py | 1 - erpnext/templates/pages/task_info.py | 1 - erpnext/templates/pages/timelog_info.py | 1 - erpnext/templates/utils.py | 1 - erpnext/tests/test_init.py | 1 - erpnext/tests/test_notifications.py | 1 - erpnext/tests/test_regional.py | 1 - erpnext/tests/test_search.py | 1 - erpnext/tests/test_subcontracting.py | 1 - erpnext/tests/test_woocommerce.py | 1 - erpnext/utilities/__init__.py | 1 - erpnext/utilities/activation.py | 1 - erpnext/utilities/bot.py | 1 - erpnext/utilities/doctype/__init__.py | 1 - erpnext/utilities/doctype/rename_tool/rename_tool.py | 1 - erpnext/utilities/doctype/sms_log/__init__.py | 1 - erpnext/utilities/doctype/sms_log/sms_log.py | 1 - erpnext/utilities/doctype/sms_log/test_sms_log.py | 2 -- erpnext/utilities/doctype/video/test_video.py | 2 -- erpnext/utilities/doctype/video/video.py | 2 -- .../utilities/doctype/video_settings/test_video_settings.py | 2 -- erpnext/utilities/doctype/video_settings/video_settings.py | 2 -- erpnext/utilities/hierarchy_chart.py | 1 - erpnext/utilities/product.py | 1 - .../report/youtube_interactions/youtube_interactions.py | 1 - erpnext/utilities/transaction_base.py | 1 - erpnext/utilities/web_form/addresses/addresses.py | 1 - erpnext/www/lms/content.py | 1 - erpnext/www/lms/course.py | 1 - erpnext/www/lms/index.py | 1 - erpnext/www/lms/profile.py | 1 - erpnext/www/lms/program.py | 1 - erpnext/www/lms/topic.py | 1 - erpnext/www/payment_setup_certification.py | 1 - erpnext/www/support/index.py | 1 - setup.py | 2 -- 1966 files changed, 2865 deletions(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 45218276f68..a4318290802 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals import inspect diff --git a/erpnext/accounts/dashboard_chart_source/account_balance_timeline/account_balance_timeline.py b/erpnext/accounts/dashboard_chart_source/account_balance_timeline/account_balance_timeline.py index 5eb857719a9..1c1364ed111 100644 --- a/erpnext/accounts/dashboard_chart_source/account_balance_timeline/account_balance_timeline.py +++ b/erpnext/accounts/dashboard_chart_source/account_balance_timeline/account_balance_timeline.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/deferred_revenue.py b/erpnext/accounts/deferred_revenue.py index 71957e67a3c..3afa0ce7dfe 100644 --- a/erpnext/accounts/deferred_revenue.py +++ b/erpnext/accounts/deferred_revenue.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/__init__.py b/erpnext/accounts/doctype/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/__init__.py +++ b/erpnext/accounts/doctype/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/account/__init__.py b/erpnext/accounts/doctype/account/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/account/__init__.py +++ b/erpnext/accounts/doctype/account/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py index 605262f7b3e..f8a06c7243f 100644 --- a/erpnext/accounts/doctype/account/account.py +++ b/erpnext/accounts/doctype/account/account.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, throw diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py index 3596c340175..3a5514388ca 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json import os diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/import_from_openerp.py b/erpnext/accounts/doctype/account/chart_of_accounts/import_from_openerp.py index 72223573a23..7d94c89ad7b 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/import_from_openerp.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/import_from_openerp.py @@ -4,7 +4,6 @@ """ Import chart of accounts from OpenERP sources """ -from __future__ import print_function, unicode_literals import ast import json diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py index f058afba6a7..9248ffa6e57 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts_with_account_number.py b/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts_with_account_number.py index 9f339520356..31ae17189a7 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts_with_account_number.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts_with_account_number.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/account/test_account.py b/erpnext/accounts/doctype/account/test_account.py index 0c3b33e0b9e..0715823b300 100644 --- a/erpnext/accounts/doctype/account/test_account.py +++ b/erpnext/accounts/doctype/account/test_account.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py index af8255f9448..b6112e0cc57 100644 --- a/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py +++ b/erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/accounts/doctype/accounting_dimension/test_accounting_dimension.py b/erpnext/accounts/doctype/accounting_dimension/test_accounting_dimension.py index 3769fc12707..f781a221ddf 100644 --- a/erpnext/accounts/doctype/accounting_dimension/test_accounting_dimension.py +++ b/erpnext/accounts/doctype/accounting_dimension/test_accounting_dimension.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/accounting_dimension_detail/accounting_dimension_detail.py b/erpnext/accounts/doctype/accounting_dimension_detail/accounting_dimension_detail.py index c116f164536..4b0cbb35a0a 100644 --- a/erpnext/accounts/doctype/accounting_dimension_detail/accounting_dimension_detail.py +++ b/erpnext/accounts/doctype/accounting_dimension_detail/accounting_dimension_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.py b/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.py index cb8c7d1c984..7d32bad0e78 100644 --- a/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.py +++ b/erpnext/accounts/doctype/accounting_dimension_filter/accounting_dimension_filter.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright, (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _, scrub diff --git a/erpnext/accounts/doctype/accounting_dimension_filter/test_accounting_dimension_filter.py b/erpnext/accounts/doctype/accounting_dimension_filter/test_accounting_dimension_filter.py index 9968f689916..e2f85ba21a9 100644 --- a/erpnext/accounts/doctype/accounting_dimension_filter/test_accounting_dimension_filter.py +++ b/erpnext/accounts/doctype/accounting_dimension_filter/test_accounting_dimension_filter.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/accounting_period/accounting_period.py b/erpnext/accounts/doctype/accounting_period/accounting_period.py index 67d1a8a09bd..e2949378e5f 100644 --- a/erpnext/accounts/doctype/accounting_period/accounting_period.py +++ b/erpnext/accounts/doctype/accounting_period/accounting_period.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/accounting_period/test_accounting_period.py b/erpnext/accounts/doctype/accounting_period/test_accounting_period.py index 5885b58e481..c06c2e0338b 100644 --- a/erpnext/accounts/doctype/accounting_period/test_accounting_period.py +++ b/erpnext/accounts/doctype/accounting_period/test_accounting_period.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py index f54473351a2..aa132a07d0c 100644 --- a/erpnext/accounts/doctype/accounts_settings/accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/accounts_settings.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/accounts_settings/test_accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/test_accounts_settings.py index c1c156fa65e..eb90fc7a861 100644 --- a/erpnext/accounts/doctype/accounts_settings/test_accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/test_accounts_settings.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/advance_taxes_and_charges/advance_taxes_and_charges.py b/erpnext/accounts/doctype/advance_taxes_and_charges/advance_taxes_and_charges.py index 0c98f248746..55c84fb9e50 100644 --- a/erpnext/accounts/doctype/advance_taxes_and_charges/advance_taxes_and_charges.py +++ b/erpnext/accounts/doctype/advance_taxes_and_charges/advance_taxes_and_charges.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/allowed_dimension/allowed_dimension.py b/erpnext/accounts/doctype/allowed_dimension/allowed_dimension.py index b5e7ad3fbe2..a3173a84f6c 100644 --- a/erpnext/accounts/doctype/allowed_dimension/allowed_dimension.py +++ b/erpnext/accounts/doctype/allowed_dimension/allowed_dimension.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/allowed_to_transact_with/allowed_to_transact_with.py b/erpnext/accounts/doctype/allowed_to_transact_with/allowed_to_transact_with.py index 3e84c3071b0..a532070d1e4 100644 --- a/erpnext/accounts/doctype/allowed_to_transact_with/allowed_to_transact_with.py +++ b/erpnext/accounts/doctype/allowed_to_transact_with/allowed_to_transact_with.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/applicable_on_account/applicable_on_account.py b/erpnext/accounts/doctype/applicable_on_account/applicable_on_account.py index 91331fadd51..aae216627c6 100644 --- a/erpnext/accounts/doctype/applicable_on_account/applicable_on_account.py +++ b/erpnext/accounts/doctype/applicable_on_account/applicable_on_account.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/bank/bank.py b/erpnext/accounts/doctype/bank/bank.py index e1eb984f5f5..f111433c321 100644 --- a/erpnext/accounts/doctype/bank/bank.py +++ b/erpnext/accounts/doctype/bank/bank.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.contacts.address_and_contact import ( delete_contact_and_address, diff --git a/erpnext/accounts/doctype/bank/bank_dashboard.py b/erpnext/accounts/doctype/bank/bank_dashboard.py index 1e2383de5fd..e7ef6aa25f5 100644 --- a/erpnext/accounts/doctype/bank/bank_dashboard.py +++ b/erpnext/accounts/doctype/bank/bank_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/bank/test_bank.py b/erpnext/accounts/doctype/bank/test_bank.py index 62d14d6fc63..5ca0e999bfb 100644 --- a/erpnext/accounts/doctype/bank/test_bank.py +++ b/erpnext/accounts/doctype/bank/test_bank.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/bank_account/bank_account.py b/erpnext/accounts/doctype/bank_account/bank_account.py index 703f55de807..f9140c31d64 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account.py +++ b/erpnext/accounts/doctype/bank_account/bank_account.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py b/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py index c7ea1522993..bc08eab0351 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py +++ b/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/bank_account/test_bank_account.py b/erpnext/accounts/doctype/bank_account/test_bank_account.py index dc970f3d99e..5f23f88af6c 100644 --- a/erpnext/accounts/doctype/bank_account/test_bank_account.py +++ b/erpnext/accounts/doctype/bank_account/test_bank_account.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/bank_account_subtype/bank_account_subtype.py b/erpnext/accounts/doctype/bank_account_subtype/bank_account_subtype.py index 84fa0c92b80..6355478fbde 100644 --- a/erpnext/accounts/doctype/bank_account_subtype/bank_account_subtype.py +++ b/erpnext/accounts/doctype/bank_account_subtype/bank_account_subtype.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/bank_account_subtype/test_bank_account_subtype.py b/erpnext/accounts/doctype/bank_account_subtype/test_bank_account_subtype.py index d4eb88b3656..a5faf1c2195 100644 --- a/erpnext/accounts/doctype/bank_account_subtype/test_bank_account_subtype.py +++ b/erpnext/accounts/doctype/bank_account_subtype/test_bank_account_subtype.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/bank_account_type/bank_account_type.py b/erpnext/accounts/doctype/bank_account_type/bank_account_type.py index bba43dc486c..177b711166d 100644 --- a/erpnext/accounts/doctype/bank_account_type/bank_account_type.py +++ b/erpnext/accounts/doctype/bank_account_type/bank_account_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/bank_account_type/test_bank_account_type.py b/erpnext/accounts/doctype/bank_account_type/test_bank_account_type.py index 00fd4338d22..fee8b47cdcb 100644 --- a/erpnext/accounts/doctype/bank_account_type/test_bank_account_type.py +++ b/erpnext/accounts/doctype/bank_account_type/test_bank_account_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py index 340b4481785..a3bbb2288d3 100644 --- a/erpnext/accounts/doctype/bank_clearance/bank_clearance.py +++ b/erpnext/accounts/doctype/bank_clearance/bank_clearance.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/accounts/doctype/bank_clearance/test_bank_clearance.py b/erpnext/accounts/doctype/bank_clearance/test_bank_clearance.py index bdf3c7f48ae..706fbbe245c 100644 --- a/erpnext/accounts/doctype/bank_clearance/test_bank_clearance.py +++ b/erpnext/accounts/doctype/bank_clearance/test_bank_clearance.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/accounts/doctype/bank_clearance_detail/__init__.py b/erpnext/accounts/doctype/bank_clearance_detail/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/bank_clearance_detail/__init__.py +++ b/erpnext/accounts/doctype/bank_clearance_detail/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/bank_clearance_detail/bank_clearance_detail.py b/erpnext/accounts/doctype/bank_clearance_detail/bank_clearance_detail.py index 1b23400cd37..3d29fd7a484 100644 --- a/erpnext/accounts/doctype/bank_clearance_detail/bank_clearance_detail.py +++ b/erpnext/accounts/doctype/bank_clearance_detail/bank_clearance_detail.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.py b/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.py index 8043c5f04e5..cfbcf16b91e 100644 --- a/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.py +++ b/erpnext/accounts/doctype/bank_guarantee/bank_guarantee.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/accounts/doctype/bank_guarantee/test_bank_guarantee.py b/erpnext/accounts/doctype/bank_guarantee/test_bank_guarantee.py index 5cd455fd6c6..b992c6ad1db 100644 --- a/erpnext/accounts/doctype/bank_guarantee/test_bank_guarantee.py +++ b/erpnext/accounts/doctype/bank_guarantee/test_bank_guarantee.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py index ce64ee4f5a2..002e312a39f 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/accounts/doctype/bank_reconciliation_tool/test_bank_reconciliation_tool.py b/erpnext/accounts/doctype/bank_reconciliation_tool/test_bank_reconciliation_tool.py index 55b83b6bdfe..599ced59192 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/test_bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/test_bank_reconciliation_tool.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py b/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py index 25d1023c270..c57e862892c 100644 --- a/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py +++ b/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import csv import json diff --git a/erpnext/accounts/doctype/bank_statement_import/test_bank_statement_import.py b/erpnext/accounts/doctype/bank_statement_import/test_bank_statement_import.py index 5b45fa204bf..08c12bddb0b 100644 --- a/erpnext/accounts/doctype/bank_statement_import/test_bank_statement_import.py +++ b/erpnext/accounts/doctype/bank_statement_import/test_bank_statement_import.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py index c4cf37e0c82..46200873044 100644 --- a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.utils import flt diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py b/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py index e8d032be360..6125c27cdfd 100644 --- a/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py b/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py index 35d08bd8033..72b6893faf5 100644 --- a/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py +++ b/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import json import unittest diff --git a/erpnext/accounts/doctype/bank_transaction_mapping/bank_transaction_mapping.py b/erpnext/accounts/doctype/bank_transaction_mapping/bank_transaction_mapping.py index 8b809fe705d..e19712ccff0 100644 --- a/erpnext/accounts/doctype/bank_transaction_mapping/bank_transaction_mapping.py +++ b/erpnext/accounts/doctype/bank_transaction_mapping/bank_transaction_mapping.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/bank_transaction_payments/bank_transaction_payments.py b/erpnext/accounts/doctype/bank_transaction_payments/bank_transaction_payments.py index 2546f27a46e..0536aa24b37 100644 --- a/erpnext/accounts/doctype/bank_transaction_payments/bank_transaction_payments.py +++ b/erpnext/accounts/doctype/bank_transaction_payments/bank_transaction_payments.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/budget/budget.py b/erpnext/accounts/doctype/budget/budget.py index 9c20e82f169..492bb365589 100644 --- a/erpnext/accounts/doctype/budget/budget.py +++ b/erpnext/accounts/doctype/budget/budget.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/budget/test_budget.py b/erpnext/accounts/doctype/budget/test_budget.py index cc8220920e3..9a83a0aa9a6 100644 --- a/erpnext/accounts/doctype/budget/test_budget.py +++ b/erpnext/accounts/doctype/budget/test_budget.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/budget_account/budget_account.py b/erpnext/accounts/doctype/budget_account/budget_account.py index 454e47d7a1a..65bc95157bb 100644 --- a/erpnext/accounts/doctype/budget_account/budget_account.py +++ b/erpnext/accounts/doctype/budget_account/budget_account.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/c_form/__init__.py b/erpnext/accounts/doctype/c_form/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/c_form/__init__.py +++ b/erpnext/accounts/doctype/c_form/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/c_form/c_form.py b/erpnext/accounts/doctype/c_form/c_form.py index b1ab6481597..61331d32d8e 100644 --- a/erpnext/accounts/doctype/c_form/c_form.py +++ b/erpnext/accounts/doctype/c_form/c_form.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/c_form/test_c_form.py b/erpnext/accounts/doctype/c_form/test_c_form.py index e5c56157318..fa34c255c66 100644 --- a/erpnext/accounts/doctype/c_form/test_c_form.py +++ b/erpnext/accounts/doctype/c_form/test_c_form.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/c_form_invoice_detail/__init__.py b/erpnext/accounts/doctype/c_form_invoice_detail/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/c_form_invoice_detail/__init__.py +++ b/erpnext/accounts/doctype/c_form_invoice_detail/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.py b/erpnext/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.py index 1316227df91..1e6ab979782 100644 --- a/erpnext/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.py +++ b/erpnext/accounts/doctype/c_form_invoice_detail/c_form_invoice_detail.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/cash_flow_mapper/cash_flow_mapper.py b/erpnext/accounts/doctype/cash_flow_mapper/cash_flow_mapper.py index 96920b329e7..d975f803a0c 100644 --- a/erpnext/accounts/doctype/cash_flow_mapper/cash_flow_mapper.py +++ b/erpnext/accounts/doctype/cash_flow_mapper/cash_flow_mapper.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/cash_flow_mapper/default_cash_flow_mapper.py b/erpnext/accounts/doctype/cash_flow_mapper/default_cash_flow_mapper.py index 43ebcb0cac9..4465ec6024b 100644 --- a/erpnext/accounts/doctype/cash_flow_mapper/default_cash_flow_mapper.py +++ b/erpnext/accounts/doctype/cash_flow_mapper/default_cash_flow_mapper.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals DEFAULT_MAPPERS = [ { diff --git a/erpnext/accounts/doctype/cash_flow_mapper/test_cash_flow_mapper.py b/erpnext/accounts/doctype/cash_flow_mapper/test_cash_flow_mapper.py index f055e563adb..044f2aee720 100644 --- a/erpnext/accounts/doctype/cash_flow_mapper/test_cash_flow_mapper.py +++ b/erpnext/accounts/doctype/cash_flow_mapper/test_cash_flow_mapper.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/cash_flow_mapping/cash_flow_mapping.py b/erpnext/accounts/doctype/cash_flow_mapping/cash_flow_mapping.py index 9ec466a7a6d..cd8381a4bd3 100644 --- a/erpnext/accounts/doctype/cash_flow_mapping/cash_flow_mapping.py +++ b/erpnext/accounts/doctype/cash_flow_mapping/cash_flow_mapping.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/cash_flow_mapping/test_cash_flow_mapping.py b/erpnext/accounts/doctype/cash_flow_mapping/test_cash_flow_mapping.py index 5e44c61379b..abb25670467 100644 --- a/erpnext/accounts/doctype/cash_flow_mapping/test_cash_flow_mapping.py +++ b/erpnext/accounts/doctype/cash_flow_mapping/test_cash_flow_mapping.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/cash_flow_mapping_accounts/cash_flow_mapping_accounts.py b/erpnext/accounts/doctype/cash_flow_mapping_accounts/cash_flow_mapping_accounts.py index 51740353192..d8dd05ce1c7 100644 --- a/erpnext/accounts/doctype/cash_flow_mapping_accounts/cash_flow_mapping_accounts.py +++ b/erpnext/accounts/doctype/cash_flow_mapping_accounts/cash_flow_mapping_accounts.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/cash_flow_mapping_template/cash_flow_mapping_template.py b/erpnext/accounts/doctype/cash_flow_mapping_template/cash_flow_mapping_template.py index fabf5796bcf..610428cf51f 100644 --- a/erpnext/accounts/doctype/cash_flow_mapping_template/cash_flow_mapping_template.py +++ b/erpnext/accounts/doctype/cash_flow_mapping_template/cash_flow_mapping_template.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/cash_flow_mapping_template/test_cash_flow_mapping_template.py b/erpnext/accounts/doctype/cash_flow_mapping_template/test_cash_flow_mapping_template.py index d6b964bb177..19461467359 100644 --- a/erpnext/accounts/doctype/cash_flow_mapping_template/test_cash_flow_mapping_template.py +++ b/erpnext/accounts/doctype/cash_flow_mapping_template/test_cash_flow_mapping_template.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/cash_flow_mapping_template_details/cash_flow_mapping_template_details.py b/erpnext/accounts/doctype/cash_flow_mapping_template_details/cash_flow_mapping_template_details.py index f0ff33fb38f..d15ab7e802d 100644 --- a/erpnext/accounts/doctype/cash_flow_mapping_template_details/cash_flow_mapping_template_details.py +++ b/erpnext/accounts/doctype/cash_flow_mapping_template_details/cash_flow_mapping_template_details.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/cash_flow_mapping_template_details/test_cash_flow_mapping_template_details.py b/erpnext/accounts/doctype/cash_flow_mapping_template_details/test_cash_flow_mapping_template_details.py index db5683a5a74..5795e61aedd 100644 --- a/erpnext/accounts/doctype/cash_flow_mapping_template_details/test_cash_flow_mapping_template_details.py +++ b/erpnext/accounts/doctype/cash_flow_mapping_template_details/test_cash_flow_mapping_template_details.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/cashier_closing/cashier_closing.py b/erpnext/accounts/doctype/cashier_closing/cashier_closing.py index cab7d407b54..9fbd0c97c1e 100644 --- a/erpnext/accounts/doctype/cashier_closing/cashier_closing.py +++ b/erpnext/accounts/doctype/cashier_closing/cashier_closing.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/cashier_closing/test_cashier_closing.py b/erpnext/accounts/doctype/cashier_closing/test_cashier_closing.py index 981093f3d04..d11737c33cc 100644 --- a/erpnext/accounts/doctype/cashier_closing/test_cashier_closing.py +++ b/erpnext/accounts/doctype/cashier_closing/test_cashier_closing.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/cashier_closing_payments/cashier_closing_payments.py b/erpnext/accounts/doctype/cashier_closing_payments/cashier_closing_payments.py index a2a8b9437e4..7617f9bdba9 100644 --- a/erpnext/accounts/doctype/cashier_closing_payments/cashier_closing_payments.py +++ b/erpnext/accounts/doctype/cashier_closing_payments/cashier_closing_payments.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py b/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py index eabe408d640..aaacce4eb9d 100644 --- a/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py +++ b/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import csv import os diff --git a/erpnext/accounts/doctype/chart_of_accounts_importer/test_chart_of_accounts_importer.py b/erpnext/accounts/doctype/chart_of_accounts_importer/test_chart_of_accounts_importer.py index ca9cf699aa7..00e5cc30671 100644 --- a/erpnext/accounts/doctype/chart_of_accounts_importer/test_chart_of_accounts_importer.py +++ b/erpnext/accounts/doctype/chart_of_accounts_importer/test_chart_of_accounts_importer.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py index 0f595ba933a..20cb42c109c 100644 --- a/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py +++ b/erpnext/accounts/doctype/cheque_print_template/cheque_print_template.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/cheque_print_template/test_cheque_print_template.py b/erpnext/accounts/doctype/cheque_print_template/test_cheque_print_template.py index 8ce8794cfcf..2b323a9bf62 100644 --- a/erpnext/accounts/doctype/cheque_print_template/test_cheque_print_template.py +++ b/erpnext/accounts/doctype/cheque_print_template/test_cheque_print_template.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/closed_document/closed_document.py b/erpnext/accounts/doctype/closed_document/closed_document.py index 50469bc19c6..89d3d2e29c8 100644 --- a/erpnext/accounts/doctype/closed_document/closed_document.py +++ b/erpnext/accounts/doctype/closed_document/closed_document.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/cost_center/__init__.py b/erpnext/accounts/doctype/cost_center/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/cost_center/__init__.py +++ b/erpnext/accounts/doctype/cost_center/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/cost_center/cost_center.py b/erpnext/accounts/doctype/cost_center/cost_center.py index 166ebb83ac2..7ae0a72e3d1 100644 --- a/erpnext/accounts/doctype/cost_center/cost_center.py +++ b/erpnext/accounts/doctype/cost_center/cost_center.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/cost_center/cost_center_dashboard.py b/erpnext/accounts/doctype/cost_center/cost_center_dashboard.py index 24cf3ea0689..0bae8fe1456 100644 --- a/erpnext/accounts/doctype/cost_center/cost_center_dashboard.py +++ b/erpnext/accounts/doctype/cost_center/cost_center_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/cost_center/test_cost_center.py b/erpnext/accounts/doctype/cost_center/test_cost_center.py index 142b925c2ea..f8615ec03a5 100644 --- a/erpnext/accounts/doctype/cost_center/test_cost_center.py +++ b/erpnext/accounts/doctype/cost_center/test_cost_center.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/coupon_code/coupon_code.py b/erpnext/accounts/doctype/coupon_code/coupon_code.py index bb2615b3610..ee32de1cd28 100644 --- a/erpnext/accounts/doctype/coupon_code/coupon_code.py +++ b/erpnext/accounts/doctype/coupon_code/coupon_code.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/coupon_code/test_coupon_code.py b/erpnext/accounts/doctype/coupon_code/test_coupon_code.py index bf8c014a5b9..5ba06913310 100644 --- a/erpnext/accounts/doctype/coupon_code/test_coupon_code.py +++ b/erpnext/accounts/doctype/coupon_code/test_coupon_code.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/discounted_invoice/discounted_invoice.py b/erpnext/accounts/doctype/discounted_invoice/discounted_invoice.py index 11faa773c65..9b8932c19e0 100644 --- a/erpnext/accounts/doctype/discounted_invoice/discounted_invoice.py +++ b/erpnext/accounts/doctype/discounted_invoice/discounted_invoice.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/distributed_cost_center/distributed_cost_center.py b/erpnext/accounts/doctype/distributed_cost_center/distributed_cost_center.py index 436704008ea..dcf0e3b99de 100644 --- a/erpnext/accounts/doctype/distributed_cost_center/distributed_cost_center.py +++ b/erpnext/accounts/doctype/distributed_cost_center/distributed_cost_center.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/dunning/dunning.py b/erpnext/accounts/doctype/dunning/dunning.py index 65ada530df5..02377cd5659 100644 --- a/erpnext/accounts/doctype/dunning/dunning.py +++ b/erpnext/accounts/doctype/dunning/dunning.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/accounts/doctype/dunning/dunning_dashboard.py b/erpnext/accounts/doctype/dunning/dunning_dashboard.py index fa3330f7cfd..ebe4efb0985 100644 --- a/erpnext/accounts/doctype/dunning/dunning_dashboard.py +++ b/erpnext/accounts/doctype/dunning/dunning_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/dunning/test_dunning.py b/erpnext/accounts/doctype/dunning/test_dunning.py index 9e8b6553360..b043c5ba19c 100644 --- a/erpnext/accounts/doctype/dunning/test_dunning.py +++ b/erpnext/accounts/doctype/dunning/test_dunning.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/dunning_letter_text/dunning_letter_text.py b/erpnext/accounts/doctype/dunning_letter_text/dunning_letter_text.py index b14fdc11f2a..9f3cf7f3f6c 100644 --- a/erpnext/accounts/doctype/dunning_letter_text/dunning_letter_text.py +++ b/erpnext/accounts/doctype/dunning_letter_text/dunning_letter_text.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/dunning_type/dunning_type.py b/erpnext/accounts/doctype/dunning_type/dunning_type.py index 64e7cf420fe..1b9bb9c0325 100644 --- a/erpnext/accounts/doctype/dunning_type/dunning_type.py +++ b/erpnext/accounts/doctype/dunning_type/dunning_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/dunning_type/test_dunning_type.py b/erpnext/accounts/doctype/dunning_type/test_dunning_type.py index ae08907273e..67b72e4be75 100644 --- a/erpnext/accounts/doctype/dunning_type/test_dunning_type.py +++ b/erpnext/accounts/doctype/dunning_type/test_dunning_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py index 9c173d0c517..1b13195ce98 100644 --- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py +++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation_dashboard.py b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation_dashboard.py index 7358f561ed4..0efe291d217 100644 --- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation_dashboard.py +++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/test_exchange_rate_revaluation.py b/erpnext/accounts/doctype/exchange_rate_revaluation/test_exchange_rate_revaluation.py index e725ce4da45..ec55e60fd1f 100644 --- a/erpnext/accounts/doctype/exchange_rate_revaluation/test_exchange_rate_revaluation.py +++ b/erpnext/accounts/doctype/exchange_rate_revaluation/test_exchange_rate_revaluation.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation_account/exchange_rate_revaluation_account.py b/erpnext/accounts/doctype/exchange_rate_revaluation_account/exchange_rate_revaluation_account.py index 58375dd4ef9..96a92bb31fd 100644 --- a/erpnext/accounts/doctype/exchange_rate_revaluation_account/exchange_rate_revaluation_account.py +++ b/erpnext/accounts/doctype/exchange_rate_revaluation_account/exchange_rate_revaluation_account.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/finance_book/finance_book.py b/erpnext/accounts/doctype/finance_book/finance_book.py index 527b8e67886..78b321b2da4 100644 --- a/erpnext/accounts/doctype/finance_book/finance_book.py +++ b/erpnext/accounts/doctype/finance_book/finance_book.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/finance_book/finance_book_dashboard.py b/erpnext/accounts/doctype/finance_book/finance_book_dashboard.py index c2ebea6e8f8..4a56cd39d00 100644 --- a/erpnext/accounts/doctype/finance_book/finance_book_dashboard.py +++ b/erpnext/accounts/doctype/finance_book/finance_book_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/finance_book/test_finance_book.py b/erpnext/accounts/doctype/finance_book/test_finance_book.py index 87a8ae260c0..5fb3d0a96cb 100644 --- a/erpnext/accounts/doctype/finance_book/test_finance_book.py +++ b/erpnext/accounts/doctype/finance_book/test_finance_book.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/fiscal_year/__init__.py b/erpnext/accounts/doctype/fiscal_year/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/fiscal_year/__init__.py +++ b/erpnext/accounts/doctype/fiscal_year/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py index 6854ac910d2..dd893f9fc80 100644 --- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py +++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from dateutil.relativedelta import relativedelta diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year_dashboard.py b/erpnext/accounts/doctype/fiscal_year/fiscal_year_dashboard.py index 92e8a426cff..3ede25f19d4 100644 --- a/erpnext/accounts/doctype/fiscal_year/fiscal_year_dashboard.py +++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/fiscal_year/test_fiscal_year.py b/erpnext/accounts/doctype/fiscal_year/test_fiscal_year.py index b0365afa827..bc8c6abeff3 100644 --- a/erpnext/accounts/doctype/fiscal_year/test_fiscal_year.py +++ b/erpnext/accounts/doctype/fiscal_year/test_fiscal_year.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/fiscal_year_company/fiscal_year_company.py b/erpnext/accounts/doctype/fiscal_year_company/fiscal_year_company.py index b9c57f67b0e..d5db78dfb91 100644 --- a/erpnext/accounts/doctype/fiscal_year_company/fiscal_year_company.py +++ b/erpnext/accounts/doctype/fiscal_year_company/fiscal_year_company.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/gl_entry/__init__.py b/erpnext/accounts/doctype/gl_entry/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/gl_entry/__init__.py +++ b/erpnext/accounts/doctype/gl_entry/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index 60015f6ec88..f184b95a92d 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/gl_entry/test_gl_entry.py b/erpnext/accounts/doctype/gl_entry/test_gl_entry.py index 14959520767..3de23946892 100644 --- a/erpnext/accounts/doctype/gl_entry/test_gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/test_gl_entry.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/gst_account/gst_account.py b/erpnext/accounts/doctype/gst_account/gst_account.py index 9ca3f9ac51d..befca41b57e 100644 --- a/erpnext/accounts/doctype/gst_account/gst_account.py +++ b/erpnext/accounts/doctype/gst_account/gst_account.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.py b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.py index 8867f1cd9bf..09c389de738 100644 --- a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.py +++ b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting_dashboard.py b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting_dashboard.py index bab8e46c31e..771846e508a 100644 --- a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting_dashboard.py +++ b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/invoice_discounting/test_invoice_discounting.py b/erpnext/accounts/doctype/invoice_discounting/test_invoice_discounting.py index 58aea92e817..d1d4be36f17 100644 --- a/erpnext/accounts/doctype/invoice_discounting/test_invoice_discounting.py +++ b/erpnext/accounts/doctype/invoice_discounting/test_invoice_discounting.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/item_tax_template/item_tax_template.py b/erpnext/accounts/doctype/item_tax_template/item_tax_template.py index 1e26afe0253..0ceb6a0bc23 100644 --- a/erpnext/accounts/doctype/item_tax_template/item_tax_template.py +++ b/erpnext/accounts/doctype/item_tax_template/item_tax_template.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/item_tax_template/item_tax_template_dashboard.py b/erpnext/accounts/doctype/item_tax_template/item_tax_template_dashboard.py index 3d80a9785f0..71177c25318 100644 --- a/erpnext/accounts/doctype/item_tax_template/item_tax_template_dashboard.py +++ b/erpnext/accounts/doctype/item_tax_template/item_tax_template_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/item_tax_template/test_item_tax_template.py b/erpnext/accounts/doctype/item_tax_template/test_item_tax_template.py index 46bb300e37d..e8638bb355d 100644 --- a/erpnext/accounts/doctype/item_tax_template/test_item_tax_template.py +++ b/erpnext/accounts/doctype/item_tax_template/test_item_tax_template.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/item_tax_template_detail/item_tax_template_detail.py b/erpnext/accounts/doctype/item_tax_template_detail/item_tax_template_detail.py index aa3b5420d60..221081e84d7 100644 --- a/erpnext/accounts/doctype/item_tax_template_detail/item_tax_template_detail.py +++ b/erpnext/accounts/doctype/item_tax_template_detail/item_tax_template_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index f3a0bdbec49..9c7e93fa56f 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py index d03a08851a6..481462b2aba 100644 --- a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.py b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.py index 86d3df4dc22..534b589273c 100644 --- a/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.py +++ b/erpnext/accounts/doctype/journal_entry_account/journal_entry_account.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/journal_entry_template/journal_entry_template.py b/erpnext/accounts/doctype/journal_entry_template/journal_entry_template.py index f0813f5e275..2da72c20ad8 100644 --- a/erpnext/accounts/doctype/journal_entry_template/journal_entry_template.py +++ b/erpnext/accounts/doctype/journal_entry_template/journal_entry_template.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/journal_entry_template/test_journal_entry_template.py b/erpnext/accounts/doctype/journal_entry_template/test_journal_entry_template.py index 61fea94e823..868a0ee7beb 100644 --- a/erpnext/accounts/doctype/journal_entry_template/test_journal_entry_template.py +++ b/erpnext/accounts/doctype/journal_entry_template/test_journal_entry_template.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/accounts/doctype/journal_entry_template_account/journal_entry_template_account.py b/erpnext/accounts/doctype/journal_entry_template_account/journal_entry_template_account.py index d0408ca2fcd..f84fddd54ca 100644 --- a/erpnext/accounts/doctype/journal_entry_template_account/journal_entry_template_account.py +++ b/erpnext/accounts/doctype/journal_entry_template_account/journal_entry_template_account.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/loyalty_point_entry/loyalty_point_entry.py b/erpnext/accounts/doctype/loyalty_point_entry/loyalty_point_entry.py index 003389e0b51..f460b9f7953 100644 --- a/erpnext/accounts/doctype/loyalty_point_entry/loyalty_point_entry.py +++ b/erpnext/accounts/doctype/loyalty_point_entry/loyalty_point_entry.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/loyalty_point_entry/test_loyalty_point_entry.py b/erpnext/accounts/doctype/loyalty_point_entry/test_loyalty_point_entry.py index 07856cfd5d6..cd38559d1d1 100644 --- a/erpnext/accounts/doctype/loyalty_point_entry/test_loyalty_point_entry.py +++ b/erpnext/accounts/doctype/loyalty_point_entry/test_loyalty_point_entry.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/loyalty_point_entry_redemption/loyalty_point_entry_redemption.py b/erpnext/accounts/doctype/loyalty_point_entry_redemption/loyalty_point_entry_redemption.py index 506e2ce8398..bc8f5c70a7c 100644 --- a/erpnext/accounts/doctype/loyalty_point_entry_redemption/loyalty_point_entry_redemption.py +++ b/erpnext/accounts/doctype/loyalty_point_entry_redemption/loyalty_point_entry_redemption.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/loyalty_program/loyalty_program.py b/erpnext/accounts/doctype/loyalty_program/loyalty_program.py index 89ed461fd5d..70da03b27f3 100644 --- a/erpnext/accounts/doctype/loyalty_program/loyalty_program.py +++ b/erpnext/accounts/doctype/loyalty_program/loyalty_program.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/loyalty_program/loyalty_program_dashboard.py b/erpnext/accounts/doctype/loyalty_program/loyalty_program_dashboard.py index 267bbbf00b2..7652e9691b4 100644 --- a/erpnext/accounts/doctype/loyalty_program/loyalty_program_dashboard.py +++ b/erpnext/accounts/doctype/loyalty_program/loyalty_program_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/accounts/doctype/loyalty_program/test_loyalty_program.py b/erpnext/accounts/doctype/loyalty_program/test_loyalty_program.py index a039e32b8b9..82c14324f5c 100644 --- a/erpnext/accounts/doctype/loyalty_program/test_loyalty_program.py +++ b/erpnext/accounts/doctype/loyalty_program/test_loyalty_program.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/loyalty_program_collection/loyalty_program_collection.py b/erpnext/accounts/doctype/loyalty_program_collection/loyalty_program_collection.py index 4bbcf3ae9f0..c462d5f0657 100644 --- a/erpnext/accounts/doctype/loyalty_program_collection/loyalty_program_collection.py +++ b/erpnext/accounts/doctype/loyalty_program_collection/loyalty_program_collection.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/mode_of_payment/__init__.py b/erpnext/accounts/doctype/mode_of_payment/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/mode_of_payment/__init__.py +++ b/erpnext/accounts/doctype/mode_of_payment/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.py b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.py index dfe42df226a..f21d1b9baa9 100644 --- a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.py +++ b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/mode_of_payment/test_mode_of_payment.py b/erpnext/accounts/doctype/mode_of_payment/test_mode_of_payment.py index 299687b067e..2ff02a7c4dc 100644 --- a/erpnext/accounts/doctype/mode_of_payment/test_mode_of_payment.py +++ b/erpnext/accounts/doctype/mode_of_payment/test_mode_of_payment.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/mode_of_payment_account/mode_of_payment_account.py b/erpnext/accounts/doctype/mode_of_payment_account/mode_of_payment_account.py index 40b5f302f2c..3d3bba6b23d 100644 --- a/erpnext/accounts/doctype/mode_of_payment_account/mode_of_payment_account.py +++ b/erpnext/accounts/doctype/mode_of_payment_account/mode_of_payment_account.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/monthly_distribution/monthly_distribution.py b/erpnext/accounts/doctype/monthly_distribution/monthly_distribution.py index c0e00d62099..a8c5f68c110 100644 --- a/erpnext/accounts/doctype/monthly_distribution/monthly_distribution.py +++ b/erpnext/accounts/doctype/monthly_distribution/monthly_distribution.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/monthly_distribution/monthly_distribution_dashboard.py b/erpnext/accounts/doctype/monthly_distribution/monthly_distribution_dashboard.py index 912bd9e331a..3e6575f2540 100644 --- a/erpnext/accounts/doctype/monthly_distribution/monthly_distribution_dashboard.py +++ b/erpnext/accounts/doctype/monthly_distribution/monthly_distribution_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/monthly_distribution/test_monthly_distribution.py b/erpnext/accounts/doctype/monthly_distribution/test_monthly_distribution.py index 63faa158f15..4a878b2aaf7 100644 --- a/erpnext/accounts/doctype/monthly_distribution/test_monthly_distribution.py +++ b/erpnext/accounts/doctype/monthly_distribution/test_monthly_distribution.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/monthly_distribution_percentage/monthly_distribution_percentage.py b/erpnext/accounts/doctype/monthly_distribution_percentage/monthly_distribution_percentage.py index 8ec30c79af7..274e2b643f9 100644 --- a/erpnext/accounts/doctype/monthly_distribution_percentage/monthly_distribution_percentage.py +++ b/erpnext/accounts/doctype/monthly_distribution_percentage/monthly_distribution_percentage.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py index 2b94bf4c1f1..2a923f009db 100644 --- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py +++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import traceback from json import dumps diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/test_opening_invoice_creation_tool.py b/erpnext/accounts/doctype/opening_invoice_creation_tool/test_opening_invoice_creation_tool.py index ed3c6a9da0a..c795e83c56b 100644 --- a/erpnext/accounts/doctype/opening_invoice_creation_tool/test_opening_invoice_creation_tool.py +++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/test_opening_invoice_creation_tool.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.py b/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.py index 4008022a26b..6c0ca4a19f3 100644 --- a/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.py +++ b/erpnext/accounts/doctype/opening_invoice_creation_tool_item/opening_invoice_creation_tool_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/party_account/party_account.py b/erpnext/accounts/doctype/party_account/party_account.py index 08d67c7a7be..cd270b1184c 100644 --- a/erpnext/accounts/doctype/party_account/party_account.py +++ b/erpnext/accounts/doctype/party_account/party_account.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index 8bbe3db914f..d6f594d5bca 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py index c90a3c503c2..cc3528e9aaa 100644 --- a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.py b/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.py index 9cfed7b56d3..b71dbb97d75 100644 --- a/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.py +++ b/erpnext/accounts/doctype/payment_entry_deduction/payment_entry_deduction.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py index a686f495cda..fc1cad9ad67 100644 --- a/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py +++ b/erpnext/accounts/doctype/payment_entry_reference/payment_entry_reference.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.py b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.py index 1d8a8ac5e19..25dc4e6a60d 100644 --- a/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.py +++ b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account_dashboard.py b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account_dashboard.py index 2edc1a1590b..bb0fc975cac 100644 --- a/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account_dashboard.py +++ b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/accounts/doctype/payment_gateway_account/test_payment_gateway_account.py b/erpnext/accounts/doctype/payment_gateway_account/test_payment_gateway_account.py index f76aa4a80f8..1895c12ad7c 100644 --- a/erpnext/accounts/doctype/payment_gateway_account/test_payment_gateway_account.py +++ b/erpnext/accounts/doctype/payment_gateway_account/test_payment_gateway_account.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/payment_order/payment_order.py b/erpnext/accounts/doctype/payment_order/payment_order.py index e9b5ad9dc4d..50a58b8a0ab 100644 --- a/erpnext/accounts/doctype/payment_order/payment_order.py +++ b/erpnext/accounts/doctype/payment_order/payment_order.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py b/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py index d9262be9b86..02da9793895 100644 --- a/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py +++ b/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/accounts/doctype/payment_order/test_payment_order.py b/erpnext/accounts/doctype/payment_order/test_payment_order.py index 6414473346b..3f4d89b4eaf 100644 --- a/erpnext/accounts/doctype/payment_order/test_payment_order.py +++ b/erpnext/accounts/doctype/payment_order/test_payment_order.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/payment_order_reference/payment_order_reference.py b/erpnext/accounts/doctype/payment_order_reference/payment_order_reference.py index 4bb98a3b61a..94704fcd16e 100644 --- a/erpnext/accounts/doctype/payment_order_reference/payment_order_reference.py +++ b/erpnext/accounts/doctype/payment_order_reference/payment_order_reference.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index 9de79aee58a..548571d1d76 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/accounts/doctype/payment_reconciliation_invoice/payment_reconciliation_invoice.py b/erpnext/accounts/doctype/payment_reconciliation_invoice/payment_reconciliation_invoice.py index 5ac1855c030..7665b75ff0f 100644 --- a/erpnext/accounts/doctype/payment_reconciliation_invoice/payment_reconciliation_invoice.py +++ b/erpnext/accounts/doctype/payment_reconciliation_invoice/payment_reconciliation_invoice.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.py b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.py index 78c84ff5a6a..c0e3fd641ad 100644 --- a/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.py +++ b/erpnext/accounts/doctype/payment_reconciliation_payment/payment_reconciliation_payment.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py index 2c967497d59..03bb72b6ae4 100644 --- a/erpnext/accounts/doctype/payment_request/payment_request.py +++ b/erpnext/accounts/doctype/payment_request/payment_request.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py index c97c873fc4e..f679ccfe4ff 100644 --- a/erpnext/accounts/doctype/payment_request/test_payment_request.py +++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/payment_schedule/payment_schedule.py b/erpnext/accounts/doctype/payment_schedule/payment_schedule.py index 33d5efa10e3..33e261f0efd 100644 --- a/erpnext/accounts/doctype/payment_schedule/payment_schedule.py +++ b/erpnext/accounts/doctype/payment_schedule/payment_schedule.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/payment_term/payment_term.py b/erpnext/accounts/doctype/payment_term/payment_term.py index a04c183bedc..956c2b13fd9 100644 --- a/erpnext/accounts/doctype/payment_term/payment_term.py +++ b/erpnext/accounts/doctype/payment_term/payment_term.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/payment_term/payment_term_dashboard.py b/erpnext/accounts/doctype/payment_term/payment_term_dashboard.py index d146fcdee38..7f5b96c8a8a 100644 --- a/erpnext/accounts/doctype/payment_term/payment_term_dashboard.py +++ b/erpnext/accounts/doctype/payment_term/payment_term_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/payment_term/test_payment_term.py b/erpnext/accounts/doctype/payment_term/test_payment_term.py index bc0645f9a62..820610c17c2 100644 --- a/erpnext/accounts/doctype/payment_term/test_payment_term.py +++ b/erpnext/accounts/doctype/payment_term/test_payment_term.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/payment_terms_template/payment_terms_template.py b/erpnext/accounts/doctype/payment_terms_template/payment_terms_template.py index 35685911324..3a6999c5799 100644 --- a/erpnext/accounts/doctype/payment_terms_template/payment_terms_template.py +++ b/erpnext/accounts/doctype/payment_terms_template/payment_terms_template.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/payment_terms_template/payment_terms_template_dashboard.py b/erpnext/accounts/doctype/payment_terms_template/payment_terms_template_dashboard.py index 5c8cb4fbdc1..aa5de2ca3f8 100644 --- a/erpnext/accounts/doctype/payment_terms_template/payment_terms_template_dashboard.py +++ b/erpnext/accounts/doctype/payment_terms_template/payment_terms_template_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/payment_terms_template/test_payment_terms_template.py b/erpnext/accounts/doctype/payment_terms_template/test_payment_terms_template.py index 2052a5093d2..8529ef5c3d5 100644 --- a/erpnext/accounts/doctype/payment_terms_template/test_payment_terms_template.py +++ b/erpnext/accounts/doctype/payment_terms_template/test_payment_terms_template.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/payment_terms_template_detail/payment_terms_template_detail.py b/erpnext/accounts/doctype/payment_terms_template_detail/payment_terms_template_detail.py index c857a88b9f5..710988bdf0e 100644 --- a/erpnext/accounts/doctype/payment_terms_template_detail/payment_terms_template_detail.py +++ b/erpnext/accounts/doctype/payment_terms_template_detail/payment_terms_template_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/period_closing_voucher/__init__.py b/erpnext/accounts/doctype/period_closing_voucher/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/__init__.py +++ b/erpnext/accounts/doctype/period_closing_voucher/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py index 888bf9fd940..34572fdfbf6 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py index 2d417a4cfba..0e29755aedd 100644 --- a/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py +++ b/erpnext/accounts/doctype/period_closing_voucher/test_period_closing_voucher.py @@ -2,7 +2,6 @@ # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py index 896ebdfd5e6..07059cb7aa3 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py +++ b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py index 44c87d6e41b..626bee0b496 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py +++ b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/pos_closing_entry_detail/pos_closing_entry_detail.py b/erpnext/accounts/doctype/pos_closing_entry_detail/pos_closing_entry_detail.py index 4293abdfdc1..2e34e44c92d 100644 --- a/erpnext/accounts/doctype/pos_closing_entry_detail/pos_closing_entry_detail.py +++ b/erpnext/accounts/doctype/pos_closing_entry_detail/pos_closing_entry_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/pos_closing_entry_taxes/pos_closing_entry_taxes.py b/erpnext/accounts/doctype/pos_closing_entry_taxes/pos_closing_entry_taxes.py index 74cf7540311..cfedeb3a9ab 100644 --- a/erpnext/accounts/doctype/pos_closing_entry_taxes/pos_closing_entry_taxes.py +++ b/erpnext/accounts/doctype/pos_closing_entry_taxes/pos_closing_entry_taxes.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/pos_customer_group/pos_customer_group.py b/erpnext/accounts/doctype/pos_customer_group/pos_customer_group.py index 570eb9ea177..5e532ae560b 100644 --- a/erpnext/accounts/doctype/pos_customer_group/pos_customer_group.py +++ b/erpnext/accounts/doctype/pos_customer_group/pos_customer_group.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/pos_field/pos_field.py b/erpnext/accounts/doctype/pos_field/pos_field.py index 00faebb7abb..4ef8827421f 100644 --- a/erpnext/accounts/doctype/pos_field/pos_field.py +++ b/erpnext/accounts/doctype/pos_field/pos_field.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index 27d678b212d..814372f6b35 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py index e6e0dd238f0..66963335376 100644 --- a/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/test_pos_invoice.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import copy import unittest diff --git a/erpnext/accounts/doctype/pos_invoice_item/pos_invoice_item.py b/erpnext/accounts/doctype/pos_invoice_item/pos_invoice_item.py index 99e471991c3..7e3ae82a8be 100644 --- a/erpnext/accounts/doctype/pos_invoice_item/pos_invoice_item.py +++ b/erpnext/accounts/doctype/pos_invoice_item/pos_invoice_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py index 28bd10283e7..02a0b266271 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py index c531bb9f079..3555da83a40 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import json import unittest diff --git a/erpnext/accounts/doctype/pos_invoice_reference/pos_invoice_reference.py b/erpnext/accounts/doctype/pos_invoice_reference/pos_invoice_reference.py index 9bce082c958..c1c36f8da87 100644 --- a/erpnext/accounts/doctype/pos_invoice_reference/pos_invoice_reference.py +++ b/erpnext/accounts/doctype/pos_invoice_reference/pos_invoice_reference.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/pos_item_group/pos_item_group.py b/erpnext/accounts/doctype/pos_item_group/pos_item_group.py index b5ff794ccc3..75fa08048d4 100644 --- a/erpnext/accounts/doctype/pos_item_group/pos_item_group.py +++ b/erpnext/accounts/doctype/pos_item_group/pos_item_group.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.py b/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.py index 979479ffb58..0b2e045e5a7 100644 --- a/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.py +++ b/erpnext/accounts/doctype/pos_opening_entry/pos_opening_entry.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/pos_opening_entry/test_pos_opening_entry.py b/erpnext/accounts/doctype/pos_opening_entry/test_pos_opening_entry.py index 35a2b5835fd..105d53d00e8 100644 --- a/erpnext/accounts/doctype/pos_opening_entry/test_pos_opening_entry.py +++ b/erpnext/accounts/doctype/pos_opening_entry/test_pos_opening_entry.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/pos_opening_entry_detail/pos_opening_entry_detail.py b/erpnext/accounts/doctype/pos_opening_entry_detail/pos_opening_entry_detail.py index be5d876a164..9108b9080b4 100644 --- a/erpnext/accounts/doctype/pos_opening_entry_detail/pos_opening_entry_detail.py +++ b/erpnext/accounts/doctype/pos_opening_entry_detail/pos_opening_entry_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/pos_payment_method/pos_payment_method.py b/erpnext/accounts/doctype/pos_payment_method/pos_payment_method.py index 851d8efde1d..589047d1d55 100644 --- a/erpnext/accounts/doctype/pos_payment_method/pos_payment_method.py +++ b/erpnext/accounts/doctype/pos_payment_method/pos_payment_method.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py index b64e2eda2db..d80c1b27cce 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.py +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/accounts/doctype/pos_profile/test_pos_profile.py b/erpnext/accounts/doctype/pos_profile/test_pos_profile.py index 7c53f4a0b07..c8cf0d2a0f1 100644 --- a/erpnext/accounts/doctype/pos_profile/test_pos_profile.py +++ b/erpnext/accounts/doctype/pos_profile/test_pos_profile.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py index 404c4ab6296..c92d5632250 100644 --- a/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py +++ b/erpnext/accounts/doctype/pos_profile_user/pos_profile_user.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/pos_profile_user/test_pos_profile_user.py b/erpnext/accounts/doctype/pos_profile_user/test_pos_profile_user.py index dca35564082..3aafb1df32c 100644 --- a/erpnext/accounts/doctype/pos_profile_user/test_pos_profile_user.py +++ b/erpnext/accounts/doctype/pos_profile_user/test_pos_profile_user.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/pos_search_fields/pos_search_fields.py b/erpnext/accounts/doctype/pos_search_fields/pos_search_fields.py index 32f9f9298b1..fd55dc85a7f 100644 --- a/erpnext/accounts/doctype/pos_search_fields/pos_search_fields.py +++ b/erpnext/accounts/doctype/pos_search_fields/pos_search_fields.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/pos_settings/pos_settings.py b/erpnext/accounts/doctype/pos_settings/pos_settings.py index 5c5aaa04ed3..2adecc0859d 100644 --- a/erpnext/accounts/doctype/pos_settings/pos_settings.py +++ b/erpnext/accounts/doctype/pos_settings/pos_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/pos_settings/test_pos_settings.py b/erpnext/accounts/doctype/pos_settings/test_pos_settings.py index 949fed775bf..630b30564ad 100644 --- a/erpnext/accounts/doctype/pos_settings/test_pos_settings.py +++ b/erpnext/accounts/doctype/pos_settings/test_pos_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index e5bf3b80641..23606cec53f 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -2,7 +2,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import copy import json diff --git a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py index 23ce4e4620b..e05e4a14e82 100644 --- a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py @@ -2,7 +2,6 @@ # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/pricing_rule/utils.py b/erpnext/accounts/doctype/pricing_rule/utils.py index ef44b414761..9655ac40b1a 100644 --- a/erpnext/accounts/doctype/pricing_rule/utils.py +++ b/erpnext/accounts/doctype/pricing_rule/utils.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import copy import json diff --git a/erpnext/accounts/doctype/pricing_rule_brand/pricing_rule_brand.py b/erpnext/accounts/doctype/pricing_rule_brand/pricing_rule_brand.py index 5e10b8411a4..fdd5be0f6c3 100644 --- a/erpnext/accounts/doctype/pricing_rule_brand/pricing_rule_brand.py +++ b/erpnext/accounts/doctype/pricing_rule_brand/pricing_rule_brand.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/pricing_rule_detail/pricing_rule_detail.py b/erpnext/accounts/doctype/pricing_rule_detail/pricing_rule_detail.py index a90ecbb6f7f..f48b5695089 100644 --- a/erpnext/accounts/doctype/pricing_rule_detail/pricing_rule_detail.py +++ b/erpnext/accounts/doctype/pricing_rule_detail/pricing_rule_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/pricing_rule_item_code/pricing_rule_item_code.py b/erpnext/accounts/doctype/pricing_rule_item_code/pricing_rule_item_code.py index 4746b39e175..f8a2c0e648c 100644 --- a/erpnext/accounts/doctype/pricing_rule_item_code/pricing_rule_item_code.py +++ b/erpnext/accounts/doctype/pricing_rule_item_code/pricing_rule_item_code.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/pricing_rule_item_group/pricing_rule_item_group.py b/erpnext/accounts/doctype/pricing_rule_item_group/pricing_rule_item_group.py index ff1ba75a60f..940350af902 100644 --- a/erpnext/accounts/doctype/pricing_rule_item_group/pricing_rule_item_group.py +++ b/erpnext/accounts/doctype/pricing_rule_item_group/pricing_rule_item_group.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/process_deferred_accounting/process_deferred_accounting.py b/erpnext/accounts/doctype/process_deferred_accounting/process_deferred_accounting.py index 72b7b23e149..d544f976d2a 100644 --- a/erpnext/accounts/doctype/process_deferred_accounting/process_deferred_accounting.py +++ b/erpnext/accounts/doctype/process_deferred_accounting/process_deferred_accounting.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/process_deferred_accounting/test_process_deferred_accounting.py b/erpnext/accounts/doctype/process_deferred_accounting/test_process_deferred_accounting.py index 69e2caa8e82..757d0fa3d01 100644 --- a/erpnext/accounts/doctype/process_deferred_accounting/test_process_deferred_accounting.py +++ b/erpnext/accounts/doctype/process_deferred_accounting/test_process_deferred_accounting.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py index 503fd0d6f80..09aa72352e4 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py +++ b/erpnext/accounts/doctype/process_statement_of_accounts/process_statement_of_accounts.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import copy diff --git a/erpnext/accounts/doctype/process_statement_of_accounts/test_process_statement_of_accounts.py b/erpnext/accounts/doctype/process_statement_of_accounts/test_process_statement_of_accounts.py index 7ddcd105af9..c281040aaf2 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts/test_process_statement_of_accounts.py +++ b/erpnext/accounts/doctype/process_statement_of_accounts/test_process_statement_of_accounts.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/accounts/doctype/process_statement_of_accounts_customer/process_statement_of_accounts_customer.py b/erpnext/accounts/doctype/process_statement_of_accounts_customer/process_statement_of_accounts_customer.py index fe940094071..94fcb78e310 100644 --- a/erpnext/accounts/doctype/process_statement_of_accounts_customer/process_statement_of_accounts_customer.py +++ b/erpnext/accounts/doctype/process_statement_of_accounts_customer/process_statement_of_accounts_customer.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py b/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py index f5391ca4cc9..e3fac072b42 100644 --- a/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py +++ b/erpnext/accounts/doctype/promotional_scheme/promotional_scheme.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/promotional_scheme/test_promotional_scheme.py b/erpnext/accounts/doctype/promotional_scheme/test_promotional_scheme.py index 190b734cc17..e1852ae2b24 100644 --- a/erpnext/accounts/doctype/promotional_scheme/test_promotional_scheme.py +++ b/erpnext/accounts/doctype/promotional_scheme/test_promotional_scheme.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.py b/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.py index ab8efc33141..a0e220004ee 100644 --- a/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.py +++ b/erpnext/accounts/doctype/promotional_scheme_price_discount/promotional_scheme_price_discount.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.py b/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.py index 85019b4e455..c9f6f863467 100644 --- a/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.py +++ b/erpnext/accounts/doctype/promotional_scheme_product_discount/promotional_scheme_product_discount.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/psoa_cost_center/psoa_cost_center.py b/erpnext/accounts/doctype/psoa_cost_center/psoa_cost_center.py index cb5aaa9c5e0..877998a187c 100644 --- a/erpnext/accounts/doctype/psoa_cost_center/psoa_cost_center.py +++ b/erpnext/accounts/doctype/psoa_cost_center/psoa_cost_center.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/psoa_project/psoa_project.py b/erpnext/accounts/doctype/psoa_project/psoa_project.py index 1cd995179d5..de22bb73047 100644 --- a/erpnext/accounts/doctype/psoa_project/psoa_project.py +++ b/erpnext/accounts/doctype/psoa_project/psoa_project.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/purchase_invoice/__init__.py b/erpnext/accounts/doctype/purchase_invoice/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/purchase_invoice/__init__.py +++ b/erpnext/accounts/doctype/purchase_invoice/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 508f728b72d..984d65be6fb 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1,8 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -# -*- coding: utf-8 -*- -from __future__ import unicode_literals import frappe from frappe import _, throw diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py index 4cc319d594f..f1878b480ed 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index 5cbeb562326..6e81c6d8b80 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -2,7 +2,6 @@ # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/purchase_invoice_advance/__init__.py b/erpnext/accounts/doctype/purchase_invoice_advance/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/purchase_invoice_advance/__init__.py +++ b/erpnext/accounts/doctype/purchase_invoice_advance/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py b/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py index ec2ce65168d..44e1f6d5685 100644 --- a/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py +++ b/erpnext/accounts/doctype/purchase_invoice_advance/purchase_invoice_advance.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/purchase_invoice_item/__init__.py b/erpnext/accounts/doctype/purchase_invoice_item/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/purchase_invoice_item/__init__.py +++ b/erpnext/accounts/doctype/purchase_invoice_item/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.py b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.py index ad2a24c0e2f..0e3c723178b 100644 --- a/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.py +++ b/erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges/__init__.py b/erpnext/accounts/doctype/purchase_taxes_and_charges/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/purchase_taxes_and_charges/__init__.py +++ b/erpnext/accounts/doctype/purchase_taxes_and_charges/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.py b/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.py index 34ac25753b3..262e7ebb5b6 100644 --- a/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.py +++ b/erpnext/accounts/doctype/purchase_taxes_and_charges/purchase_taxes_and_charges.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template.py b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template.py index 53b549f6829..f5eb404d0a4 100644 --- a/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template.py +++ b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template_dashboard.py b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template_dashboard.py index db9793d77a6..95a7a1c889b 100644 --- a/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template_dashboard.py +++ b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges_template/test_purchase_taxes_and_charges_template.py b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/test_purchase_taxes_and_charges_template.py index c60c81b7239..b5b4a67d759 100644 --- a/erpnext/accounts/doctype/purchase_taxes_and_charges_template/test_purchase_taxes_and_charges_template.py +++ b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/test_purchase_taxes_and_charges_template.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/salary_component_account/salary_component_account.py b/erpnext/accounts/doctype/salary_component_account/salary_component_account.py index d96ef62c293..b70179aa912 100644 --- a/erpnext/accounts/doctype/salary_component_account/salary_component_account.py +++ b/erpnext/accounts/doctype/salary_component_account/salary_component_account.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/sales_invoice/__init__.py b/erpnext/accounts/doctype/sales_invoice/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/sales_invoice/__init__.py +++ b/erpnext/accounts/doctype/sales_invoice/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index cd204ba523b..e77c4e16831 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint, throw diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py index 64b35b2987e..104d4f9b8aa 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 262c0834049..e98ff3f5285 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -1,6 +1,5 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import copy import unittest diff --git a/erpnext/accounts/doctype/sales_invoice_advance/__init__.py b/erpnext/accounts/doctype/sales_invoice_advance/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/sales_invoice_advance/__init__.py +++ b/erpnext/accounts/doctype/sales_invoice_advance/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py b/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py index ae69598a66a..6d4bd4633c3 100644 --- a/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py +++ b/erpnext/accounts/doctype/sales_invoice_advance/sales_invoice_advance.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/sales_invoice_item/__init__.py b/erpnext/accounts/doctype/sales_invoice_item/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/__init__.py +++ b/erpnext/accounts/doctype/sales_invoice_item/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py index 063c591f768..ebeaf8b5ef8 100644 --- a/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py +++ b/erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.py b/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.py index a980ece580b..d9b1dbe346a 100644 --- a/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.py +++ b/erpnext/accounts/doctype/sales_invoice_payment/sales_invoice_payment.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.py b/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.py index e8d4b114fef..e50b1c28614 100644 --- a/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.py +++ b/erpnext/accounts/doctype/sales_invoice_timesheet/sales_invoice_timesheet.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges/__init__.py b/erpnext/accounts/doctype/sales_taxes_and_charges/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/doctype/sales_taxes_and_charges/__init__.py +++ b/erpnext/accounts/doctype/sales_taxes_and_charges/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.py b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.py index 39872f33770..d412c1b7309 100644 --- a/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.py +++ b/erpnext/accounts/doctype/sales_taxes_and_charges/sales_taxes_and_charges.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template.py b/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template.py index 0a0bb3e00b9..b5909447dc8 100644 --- a/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template.py +++ b/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template_dashboard.py b/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template_dashboard.py index 522e282a170..5b9fbafed8d 100644 --- a/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template_dashboard.py +++ b/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges_template/test_sales_taxes_and_charges_template.py b/erpnext/accounts/doctype/sales_taxes_and_charges_template/test_sales_taxes_and_charges_template.py index 1cad4129f83..7b13c6c6925 100644 --- a/erpnext/accounts/doctype/sales_taxes_and_charges_template/test_sales_taxes_and_charges_template.py +++ b/erpnext/accounts/doctype/sales_taxes_and_charges_template/test_sales_taxes_and_charges_template.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/share_balance/share_balance.py b/erpnext/accounts/doctype/share_balance/share_balance.py index 0353e998237..4c9ec439eed 100644 --- a/erpnext/accounts/doctype/share_balance/share_balance.py +++ b/erpnext/accounts/doctype/share_balance/share_balance.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/share_transfer/share_transfer.py b/erpnext/accounts/doctype/share_transfer/share_transfer.py index 5117ef8b5b5..b543ad8204d 100644 --- a/erpnext/accounts/doctype/share_transfer/share_transfer.py +++ b/erpnext/accounts/doctype/share_transfer/share_transfer.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/share_transfer/test_share_transfer.py b/erpnext/accounts/doctype/share_transfer/test_share_transfer.py index b40e5fbbf8e..bc3a52167db 100644 --- a/erpnext/accounts/doctype/share_transfer/test_share_transfer.py +++ b/erpnext/accounts/doctype/share_transfer/test_share_transfer.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/share_type/share_type.py b/erpnext/accounts/doctype/share_type/share_type.py index 5b133aa34ab..80365aa2f21 100644 --- a/erpnext/accounts/doctype/share_type/share_type.py +++ b/erpnext/accounts/doctype/share_type/share_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/share_type/share_type_dashboard.py b/erpnext/accounts/doctype/share_type/share_type_dashboard.py index 455b022577a..fdb417ed6d0 100644 --- a/erpnext/accounts/doctype/share_type/share_type_dashboard.py +++ b/erpnext/accounts/doctype/share_type/share_type_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/share_type/test_share_type.py b/erpnext/accounts/doctype/share_type/test_share_type.py index a6f8d611c1b..b911c98388c 100644 --- a/erpnext/accounts/doctype/share_type/test_share_type.py +++ b/erpnext/accounts/doctype/share_type/test_share_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/shareholder/shareholder.py b/erpnext/accounts/doctype/shareholder/shareholder.py index 12c50c8283b..8a0fa85a692 100644 --- a/erpnext/accounts/doctype/shareholder/shareholder.py +++ b/erpnext/accounts/doctype/shareholder/shareholder.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.contacts.address_and_contact import ( delete_contact_and_address, diff --git a/erpnext/accounts/doctype/shareholder/shareholder_dashboard.py b/erpnext/accounts/doctype/shareholder/shareholder_dashboard.py index 0084f2567ab..44d5ec684fb 100644 --- a/erpnext/accounts/doctype/shareholder/shareholder_dashboard.py +++ b/erpnext/accounts/doctype/shareholder/shareholder_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/accounts/doctype/shareholder/test_shareholder.py b/erpnext/accounts/doctype/shareholder/test_shareholder.py index 6790fdd2ff7..376ea711526 100644 --- a/erpnext/accounts/doctype/shareholder/test_shareholder.py +++ b/erpnext/accounts/doctype/shareholder/test_shareholder.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/shipping_rule/shipping_rule.py b/erpnext/accounts/doctype/shipping_rule/shipping_rule.py index 28521014720..7e5129911e4 100644 --- a/erpnext/accounts/doctype/shipping_rule/shipping_rule.py +++ b/erpnext/accounts/doctype/shipping_rule/shipping_rule.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint, throw diff --git a/erpnext/accounts/doctype/shipping_rule/shipping_rule_dashboard.py b/erpnext/accounts/doctype/shipping_rule/shipping_rule_dashboard.py index 636ee5788d3..ef2a053227b 100644 --- a/erpnext/accounts/doctype/shipping_rule/shipping_rule_dashboard.py +++ b/erpnext/accounts/doctype/shipping_rule/shipping_rule_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/shipping_rule/test_shipping_rule.py b/erpnext/accounts/doctype/shipping_rule/test_shipping_rule.py index bdd9be3beda..c06dae09701 100644 --- a/erpnext/accounts/doctype/shipping_rule/test_shipping_rule.py +++ b/erpnext/accounts/doctype/shipping_rule/test_shipping_rule.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/shipping_rule_condition/shipping_rule_condition.py b/erpnext/accounts/doctype/shipping_rule_condition/shipping_rule_condition.py index 66cd269e51b..07f98deb23e 100644 --- a/erpnext/accounts/doctype/shipping_rule_condition/shipping_rule_condition.py +++ b/erpnext/accounts/doctype/shipping_rule_condition/shipping_rule_condition.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/shipping_rule_country/shipping_rule_country.py b/erpnext/accounts/doctype/shipping_rule_country/shipping_rule_country.py index 9576acd0aba..90123c1616e 100644 --- a/erpnext/accounts/doctype/shipping_rule_country/shipping_rule_country.py +++ b/erpnext/accounts/doctype/shipping_rule_country/shipping_rule_country.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/subscription/subscription.py b/erpnext/accounts/doctype/subscription/subscription.py index 050c3e7ea84..68d980257e4 100644 --- a/erpnext/accounts/doctype/subscription/subscription.py +++ b/erpnext/accounts/doctype/subscription/subscription.py @@ -1,9 +1,7 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/subscription/test_subscription.py b/erpnext/accounts/doctype/subscription/test_subscription.py index 0f7a0a86a4d..9dd370bd472 100644 --- a/erpnext/accounts/doctype/subscription/test_subscription.py +++ b/erpnext/accounts/doctype/subscription/test_subscription.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/subscription_invoice/subscription_invoice.py b/erpnext/accounts/doctype/subscription_invoice/subscription_invoice.py index 687c94cce2c..41f7f9f6f3e 100644 --- a/erpnext/accounts/doctype/subscription_invoice/subscription_invoice.py +++ b/erpnext/accounts/doctype/subscription_invoice/subscription_invoice.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/subscription_invoice/test_subscription_invoice.py b/erpnext/accounts/doctype/subscription_invoice/test_subscription_invoice.py index 2cc3038d913..5dc9e32c8e3 100644 --- a/erpnext/accounts/doctype/subscription_invoice/test_subscription_invoice.py +++ b/erpnext/accounts/doctype/subscription_invoice/test_subscription_invoice.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/subscription_plan/subscription_plan.py b/erpnext/accounts/doctype/subscription_plan/subscription_plan.py index c7bb58cb26d..1285343d196 100644 --- a/erpnext/accounts/doctype/subscription_plan/subscription_plan.py +++ b/erpnext/accounts/doctype/subscription_plan/subscription_plan.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/subscription_plan/subscription_plan_dashboard.py b/erpnext/accounts/doctype/subscription_plan/subscription_plan_dashboard.py index df3023335a3..15df62daa23 100644 --- a/erpnext/accounts/doctype/subscription_plan/subscription_plan_dashboard.py +++ b/erpnext/accounts/doctype/subscription_plan/subscription_plan_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/subscription_plan/test_subscription_plan.py b/erpnext/accounts/doctype/subscription_plan/test_subscription_plan.py index ba997632479..3b6ab605a45 100644 --- a/erpnext/accounts/doctype/subscription_plan/test_subscription_plan.py +++ b/erpnext/accounts/doctype/subscription_plan/test_subscription_plan.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/subscription_plan_detail/subscription_plan_detail.py b/erpnext/accounts/doctype/subscription_plan_detail/subscription_plan_detail.py index a63a27700cc..d22a73f25d7 100644 --- a/erpnext/accounts/doctype/subscription_plan_detail/subscription_plan_detail.py +++ b/erpnext/accounts/doctype/subscription_plan_detail/subscription_plan_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/subscription_settings/subscription_settings.py b/erpnext/accounts/doctype/subscription_settings/subscription_settings.py index 54735834baa..12580db1ede 100644 --- a/erpnext/accounts/doctype/subscription_settings/subscription_settings.py +++ b/erpnext/accounts/doctype/subscription_settings/subscription_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/subscription_settings/test_subscription_settings.py b/erpnext/accounts/doctype/subscription_settings/test_subscription_settings.py index 5875ee069ec..63eae3bfeb3 100644 --- a/erpnext/accounts/doctype/subscription_settings/test_subscription_settings.py +++ b/erpnext/accounts/doctype/subscription_settings/test_subscription_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/tax_category/tax_category.py b/erpnext/accounts/doctype/tax_category/tax_category.py index df31a5e45f9..18cf72ad59f 100644 --- a/erpnext/accounts/doctype/tax_category/tax_category.py +++ b/erpnext/accounts/doctype/tax_category/tax_category.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/tax_category/tax_category_dashboard.py b/erpnext/accounts/doctype/tax_category/tax_category_dashboard.py index d643efb090b..c9d52da78ad 100644 --- a/erpnext/accounts/doctype/tax_category/tax_category_dashboard.py +++ b/erpnext/accounts/doctype/tax_category/tax_category_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/doctype/tax_category/test_tax_category.py b/erpnext/accounts/doctype/tax_category/test_tax_category.py index 90931058f07..e3b3430ace5 100644 --- a/erpnext/accounts/doctype/tax_category/test_tax_category.py +++ b/erpnext/accounts/doctype/tax_category/test_tax_category.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/tax_rule/tax_rule.py b/erpnext/accounts/doctype/tax_rule/tax_rule.py index 150498d6acc..e1d630d0d75 100644 --- a/erpnext/accounts/doctype/tax_rule/tax_rule.py +++ b/erpnext/accounts/doctype/tax_rule/tax_rule.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import functools diff --git a/erpnext/accounts/doctype/tax_rule/test_tax_rule.py b/erpnext/accounts/doctype/tax_rule/test_tax_rule.py index f937274edf5..44344bb7635 100644 --- a/erpnext/accounts/doctype/tax_rule/test_tax_rule.py +++ b/erpnext/accounts/doctype/tax_rule/test_tax_rule.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/tax_withholding_account/tax_withholding_account.py b/erpnext/accounts/doctype/tax_withholding_account/tax_withholding_account.py index fd194829e56..c8d9d45ec75 100644 --- a/erpnext/accounts/doctype/tax_withholding_account/tax_withholding_account.py +++ b/erpnext/accounts/doctype/tax_withholding_account/tax_withholding_account.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index 51621820763..31dcb406d89 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category_dashboard.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category_dashboard.py index 152ee460814..46d0c2e487e 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category_dashboard.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py index 84b364b3427..a3fcf7da7a5 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/doctype/tax_withholding_rate/tax_withholding_rate.py b/erpnext/accounts/doctype/tax_withholding_rate/tax_withholding_rate.py index 6556277509a..16cbccc8bea 100644 --- a/erpnext/accounts/doctype/tax_withholding_rate/tax_withholding_rate.py +++ b/erpnext/accounts/doctype/tax_withholding_rate/tax_withholding_rate.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/accounts/general_ledger.py b/erpnext/accounts/general_ledger.py index 0cae16bc51a..8ef7d7e103c 100644 --- a/erpnext/accounts/general_ledger.py +++ b/erpnext/accounts/general_ledger.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.py b/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.py index f57de916dd1..19b550feea7 100644 --- a/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.py +++ b/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_context(context): diff --git a/erpnext/accounts/page/__init__.py b/erpnext/accounts/page/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/accounts/page/__init__.py +++ b/erpnext/accounts/page/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 7ea6ccee5b4..26ff2c6e04b 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint, scrub diff --git a/erpnext/accounts/report/account_balance/account_balance.py b/erpnext/accounts/report/account_balance/account_balance.py index 9ae61ddcfd2..a2c70a45f99 100644 --- a/erpnext/accounts/report/account_balance/account_balance.py +++ b/erpnext/accounts/report/account_balance/account_balance.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/account_balance/test_account_balance.py b/erpnext/accounts/report/account_balance/test_account_balance.py index 94c73f5264b..50b1a679b6c 100644 --- a/erpnext/accounts/report/account_balance/test_account_balance.py +++ b/erpnext/accounts/report/account_balance/test_account_balance.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/report/accounts_payable/accounts_payable.py b/erpnext/accounts/report/accounts_payable/accounts_payable.py index 0de573e4541..7b199949113 100644 --- a/erpnext/accounts/report/accounts_payable/accounts_payable.py +++ b/erpnext/accounts/report/accounts_payable/accounts_payable.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from erpnext.accounts.report.accounts_receivable.accounts_receivable import ReceivablePayableReport diff --git a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.py b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.py index 6034ec0d83b..65fe1de5689 100644 --- a/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.py +++ b/erpnext/accounts/report/accounts_payable_summary/accounts_payable_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from erpnext.accounts.report.accounts_receivable_summary.accounts_receivable_summary import ( AccountsReceivableSummary, diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 7f8eadea16d..88bcdad7102 100755 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from collections import OrderedDict diff --git a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py index 1d24561bb3f..b5408bd4c8f 100644 --- a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py index 106f224a740..a95bcf83ef7 100644 --- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py +++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _, scrub diff --git a/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py b/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py index 0fd4ca0f24a..98f5b74eaac 100644 --- a/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py +++ b/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py index d34bc854bba..0f9435f4a57 100644 --- a/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py +++ b/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/balance_sheet/balance_sheet.py b/erpnext/accounts/report/balance_sheet/balance_sheet.py index 78ee7cab9af..dc1f7aae42e 100644 --- a/erpnext/accounts/report/balance_sheet/balance_sheet.py +++ b/erpnext/accounts/report/balance_sheet/balance_sheet.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py index 1a1fa964fe0..b456e89f344 100644 --- a/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py +++ b/erpnext/accounts/report/bank_clearance_summary/bank_clearance_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py index b9843068a18..6c401fb8f3b 100644 --- a/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py +++ b/erpnext/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/billed_items_to_be_received/billed_items_to_be_received.py b/erpnext/accounts/report/billed_items_to_be_received/billed_items_to_be_received.py index 6c4cd671b24..1d7463c8920 100644 --- a/erpnext/accounts/report/billed_items_to_be_received/billed_items_to_be_received.py +++ b/erpnext/accounts/report/billed_items_to_be_received/billed_items_to_be_received.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/budget_variance_report/budget_variance_report.py b/erpnext/accounts/report/budget_variance_report/budget_variance_report.py index c204250377f..ead67766785 100644 --- a/erpnext/accounts/report/budget_variance_report/budget_variance_report.py +++ b/erpnext/accounts/report/budget_variance_report/budget_variance_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import datetime diff --git a/erpnext/accounts/report/cash_flow/cash_flow.py b/erpnext/accounts/report/cash_flow/cash_flow.py index bb8138bfc2e..75365b81f22 100644 --- a/erpnext/accounts/report/cash_flow/cash_flow.py +++ b/erpnext/accounts/report/cash_flow/cash_flow.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/cash_flow/custom_cash_flow.py b/erpnext/accounts/report/cash_flow/custom_cash_flow.py index bbc020e591f..45d147e7a21 100644 --- a/erpnext/accounts/report/cash_flow/custom_cash_flow.py +++ b/erpnext/accounts/report/cash_flow/custom_cash_flow.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py index 0475231a934..c71bc17ca79 100644 --- a/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py +++ b/erpnext/accounts/report/consolidated_financial_statement/consolidated_financial_statement.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from collections import defaultdict diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py index 603fbac5aa9..29546198464 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _, scrub diff --git a/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.py b/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.py index f096094296c..004d09250ab 100644 --- a/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.py +++ b/erpnext/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.py b/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.py index 4212137d7a6..c69bb3f70c5 100644 --- a/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.py +++ b/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 2cb8a6802a7..27294335b18 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -1,9 +1,7 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import functools import math diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 31416da4ac4..f538764873b 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from collections import OrderedDict diff --git a/erpnext/accounts/report/gross_and_net_profit_report/gross_and_net_profit_report.py b/erpnext/accounts/report/gross_and_net_profit_report/gross_and_net_profit_report.py index 49522d9c873..b18b940fd2b 100644 --- a/erpnext/accounts/report/gross_and_net_profit_report/gross_and_net_profit_report.py +++ b/erpnext/accounts/report/gross_and_net_profit_report/gross_and_net_profit_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import copy diff --git a/erpnext/accounts/report/gross_profit/gross_profit.py b/erpnext/accounts/report/gross_profit/gross_profit.py index f08bca9ddaa..9d5a24227c6 100644 --- a/erpnext/accounts/report/gross_profit/gross_profit.py +++ b/erpnext/accounts/report/gross_profit/gross_profit.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, scrub diff --git a/erpnext/accounts/report/inactive_sales_items/inactive_sales_items.py b/erpnext/accounts/report/inactive_sales_items/inactive_sales_items.py index 8f822711a7a..2f23c8ed1d6 100644 --- a/erpnext/accounts/report/inactive_sales_items/inactive_sales_items.py +++ b/erpnext/accounts/report/inactive_sales_items/inactive_sales_items.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py index cd25c050040..aaed58d070d 100644 --- a/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py +++ b/erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py index 847a127d365..9b35538bb68 100644 --- a/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py +++ b/erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/non_billed_report.py b/erpnext/accounts/report/non_billed_report.py index b61f87df5bf..a421bc5c206 100644 --- a/erpnext/accounts/report/non_billed_report.py +++ b/erpnext/accounts/report/non_billed_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.meta import get_field_precision diff --git a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py index 6c6af1cc5a2..6c12093763d 100644 --- a/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py +++ b/erpnext/accounts/report/payment_period_based_on_invoice_date/payment_period_based_on_invoice_date.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/pos_register/pos_register.py b/erpnext/accounts/report/pos_register/pos_register.py index c9463caa6db..77e7568533e 100644 --- a/erpnext/accounts/report/pos_register/pos_register.py +++ b/erpnext/accounts/report/pos_register/pos_register.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py index ef799f63bf9..882e411246b 100644 --- a/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py +++ b/erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/profitability_analysis/profitability_analysis.py b/erpnext/accounts/report/profitability_analysis/profitability_analysis.py index ad97808973b..3dcb86267c1 100644 --- a/erpnext/accounts/report/profitability_analysis/profitability_analysis.py +++ b/erpnext/accounts/report/profitability_analysis/profitability_analysis.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.py b/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.py index b26c733bc7e..406f7a50e8b 100644 --- a/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.py +++ b/erpnext/accounts/report/purchase_invoice_trends/purchase_invoice_trends.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from erpnext.controllers.trends import get_columns, get_data diff --git a/erpnext/accounts/report/purchase_register/purchase_register.py b/erpnext/accounts/report/purchase_register/purchase_register.py index 5d4a03ce60a..a9696bd104a 100644 --- a/erpnext/accounts/report/purchase_register/purchase_register.py +++ b/erpnext/accounts/report/purchase_register/purchase_register.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.py b/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.py index adf6b29ea8f..e88675bb8d6 100644 --- a/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.py +++ b/erpnext/accounts/report/received_items_to_be_billed/received_items_to_be_billed.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.py b/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.py index 0ec54c932b8..966b1d4fd01 100644 --- a/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.py +++ b/erpnext/accounts/report/sales_invoice_trends/sales_invoice_trends.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from erpnext.controllers.trends import get_columns, get_data diff --git a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py index 9ad7007a2cc..3b736282cf9 100644 --- a/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py +++ b/erpnext/accounts/report/sales_payment_summary/sales_payment_summary.py @@ -1,6 +1,5 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/sales_payment_summary/test_sales_payment_summary.py b/erpnext/accounts/report/sales_payment_summary/test_sales_payment_summary.py index 9fd7bc3de73..b3f6c72a3ef 100644 --- a/erpnext/accounts/report/sales_payment_summary/test_sales_payment_summary.py +++ b/erpnext/accounts/report/sales_payment_summary/test_sales_payment_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/report/sales_register/sales_register.py b/erpnext/accounts/report/sales_register/sales_register.py index 57b69aa8187..a9d0081bacc 100644 --- a/erpnext/accounts/report/sales_register/sales_register.py +++ b/erpnext/accounts/report/sales_register/sales_register.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/accounts/report/share_balance/share_balance.py b/erpnext/accounts/report/share_balance/share_balance.py index 03efc9ec33a..943c4e150f0 100644 --- a/erpnext/accounts/report/share_balance/share_balance.py +++ b/erpnext/accounts/report/share_balance/share_balance.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/share_ledger/share_ledger.py b/erpnext/accounts/report/share_ledger/share_ledger.py index 9be662220d0..b3ff6e48a6f 100644 --- a/erpnext/accounts/report/share_ledger/share_ledger.py +++ b/erpnext/accounts/report/share_ledger/share_ledger.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.py b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.py index 00316ba2652..52beeaf660c 100644 --- a/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.py +++ b/erpnext/accounts/report/supplier_ledger_summary/supplier_ledger_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from erpnext.accounts.report.customer_ledger_summary.customer_ledger_summary import ( PartyLedgerSummaryReport, diff --git a/erpnext/accounts/report/tax_detail/tax_detail.py b/erpnext/accounts/report/tax_detail/tax_detail.py index f03498d5b20..eeb8483586f 100644 --- a/erpnext/accounts/report/tax_detail/tax_detail.py +++ b/erpnext/accounts/report/tax_detail/tax_detail.py @@ -2,7 +2,6 @@ # For license information, please see license.txt # Contributed by Case Solved and sponsored by Nulight Studios -from __future__ import unicode_literals import json diff --git a/erpnext/accounts/report/tax_detail/test_tax_detail.py b/erpnext/accounts/report/tax_detail/test_tax_detail.py index e74b905db17..7292f2bde28 100644 --- a/erpnext/accounts/report/tax_detail/test_tax_detail.py +++ b/erpnext/accounts/report/tax_detail/test_tax_detail.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import datetime import json diff --git a/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.py b/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.py index 536df1f1a17..d576c273a27 100644 --- a/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.py +++ b/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py index 6a7f2e5b535..a3a45d1e79c 100644 --- a/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py +++ b/erpnext/accounts/report/tds_payable_monthly/tds_payable_monthly.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/trial_balance/trial_balance.py b/erpnext/accounts/report/trial_balance/trial_balance.py index d65bcc4ada3..bda44f66aa1 100644 --- a/erpnext/accounts/report/trial_balance/trial_balance.py +++ b/erpnext/accounts/report/trial_balance/trial_balance.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py b/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py index 8e245443c33..d843dfd3ce3 100644 --- a/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py +++ b/erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.py b/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.py index 71fe4a294a3..26b938966b3 100644 --- a/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.py +++ b/erpnext/accounts/report/unpaid_expense_claim/unpaid_expense_claim.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/accounts/report/utils.py b/erpnext/accounts/report/utils.py index 2f9e9578ccb..89cc0a8c8cc 100644 --- a/erpnext/accounts/report/utils.py +++ b/erpnext/accounts/report/utils.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.utils import flt, formatdate, get_datetime_str diff --git a/erpnext/accounts/test/test_utils.py b/erpnext/accounts/test/test_utils.py index c3f6d274437..4aca40cf6c0 100644 --- a/erpnext/accounts/test/test_utils.py +++ b/erpnext/accounts/test/test_utils.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import unittest diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index fb23d6fc499..4340840df0c 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from json import loads diff --git a/erpnext/agriculture/doctype/agriculture_analysis_criteria/agriculture_analysis_criteria.py b/erpnext/agriculture/doctype/agriculture_analysis_criteria/agriculture_analysis_criteria.py index b0441c236fc..19459927a5a 100644 --- a/erpnext/agriculture/doctype/agriculture_analysis_criteria/agriculture_analysis_criteria.py +++ b/erpnext/agriculture/doctype/agriculture_analysis_criteria/agriculture_analysis_criteria.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/agriculture/doctype/agriculture_analysis_criteria/test_agriculture_analysis_criteria.py b/erpnext/agriculture/doctype/agriculture_analysis_criteria/test_agriculture_analysis_criteria.py index 4213e45c078..91e6f3fa0c9 100644 --- a/erpnext/agriculture/doctype/agriculture_analysis_criteria/test_agriculture_analysis_criteria.py +++ b/erpnext/agriculture/doctype/agriculture_analysis_criteria/test_agriculture_analysis_criteria.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/agriculture/doctype/agriculture_task/agriculture_task.py b/erpnext/agriculture/doctype/agriculture_task/agriculture_task.py index 642f49189da..dab29989351 100644 --- a/erpnext/agriculture/doctype/agriculture_task/agriculture_task.py +++ b/erpnext/agriculture/doctype/agriculture_task/agriculture_task.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/agriculture/doctype/agriculture_task/test_agriculture_task.py b/erpnext/agriculture/doctype/agriculture_task/test_agriculture_task.py index 2b3c3386972..94d7915d628 100644 --- a/erpnext/agriculture/doctype/agriculture_task/test_agriculture_task.py +++ b/erpnext/agriculture/doctype/agriculture_task/test_agriculture_task.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/agriculture/doctype/crop/crop.py b/erpnext/agriculture/doctype/crop/crop.py index ef02613d3d9..ed2073cebf8 100644 --- a/erpnext/agriculture/doctype/crop/crop.py +++ b/erpnext/agriculture/doctype/crop/crop.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/agriculture/doctype/crop/crop_dashboard.py b/erpnext/agriculture/doctype/crop/crop_dashboard.py index 02b937a74b2..772ed611373 100644 --- a/erpnext/agriculture/doctype/crop/crop_dashboard.py +++ b/erpnext/agriculture/doctype/crop/crop_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/agriculture/doctype/crop/test_crop.py b/erpnext/agriculture/doctype/crop/test_crop.py index 1968a04796d..c79a3672199 100644 --- a/erpnext/agriculture/doctype/crop/test_crop.py +++ b/erpnext/agriculture/doctype/crop/test_crop.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/agriculture/doctype/crop_cycle/crop_cycle.py b/erpnext/agriculture/doctype/crop_cycle/crop_cycle.py index 9000dea913b..43c5bbde82f 100644 --- a/erpnext/agriculture/doctype/crop_cycle/crop_cycle.py +++ b/erpnext/agriculture/doctype/crop_cycle/crop_cycle.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import ast diff --git a/erpnext/agriculture/doctype/crop_cycle/test_crop_cycle.py b/erpnext/agriculture/doctype/crop_cycle/test_crop_cycle.py index 763b4036c3a..e4765a57c0b 100644 --- a/erpnext/agriculture/doctype/crop_cycle/test_crop_cycle.py +++ b/erpnext/agriculture/doctype/crop_cycle/test_crop_cycle.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/agriculture/doctype/detected_disease/detected_disease.py b/erpnext/agriculture/doctype/detected_disease/detected_disease.py index b73fc32f7fd..e507add7f92 100644 --- a/erpnext/agriculture/doctype/detected_disease/detected_disease.py +++ b/erpnext/agriculture/doctype/detected_disease/detected_disease.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/agriculture/doctype/disease/disease.py b/erpnext/agriculture/doctype/disease/disease.py index e474efe5153..30ab298376a 100644 --- a/erpnext/agriculture/doctype/disease/disease.py +++ b/erpnext/agriculture/doctype/disease/disease.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/agriculture/doctype/disease/test_disease.py b/erpnext/agriculture/doctype/disease/test_disease.py index 1959d1f8112..6a6f1e70a94 100644 --- a/erpnext/agriculture/doctype/disease/test_disease.py +++ b/erpnext/agriculture/doctype/disease/test_disease.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/agriculture/doctype/fertilizer/fertilizer.py b/erpnext/agriculture/doctype/fertilizer/fertilizer.py index 75c2542b85a..2408302bd18 100644 --- a/erpnext/agriculture/doctype/fertilizer/fertilizer.py +++ b/erpnext/agriculture/doctype/fertilizer/fertilizer.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/agriculture/doctype/fertilizer/test_fertilizer.py b/erpnext/agriculture/doctype/fertilizer/test_fertilizer.py index c11c61afec2..c8630ef1f87 100644 --- a/erpnext/agriculture/doctype/fertilizer/test_fertilizer.py +++ b/erpnext/agriculture/doctype/fertilizer/test_fertilizer.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/agriculture/doctype/fertilizer_content/fertilizer_content.py b/erpnext/agriculture/doctype/fertilizer_content/fertilizer_content.py index a050b710107..967c3e02de6 100644 --- a/erpnext/agriculture/doctype/fertilizer_content/fertilizer_content.py +++ b/erpnext/agriculture/doctype/fertilizer_content/fertilizer_content.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/agriculture/doctype/linked_location/linked_location.py b/erpnext/agriculture/doctype/linked_location/linked_location.py index e622e84dc32..e1257f3db16 100644 --- a/erpnext/agriculture/doctype/linked_location/linked_location.py +++ b/erpnext/agriculture/doctype/linked_location/linked_location.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/agriculture/doctype/linked_plant_analysis/linked_plant_analysis.py b/erpnext/agriculture/doctype/linked_plant_analysis/linked_plant_analysis.py index 608bf8c5e3a..0bc04af6406 100644 --- a/erpnext/agriculture/doctype/linked_plant_analysis/linked_plant_analysis.py +++ b/erpnext/agriculture/doctype/linked_plant_analysis/linked_plant_analysis.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/agriculture/doctype/linked_soil_analysis/linked_soil_analysis.py b/erpnext/agriculture/doctype/linked_soil_analysis/linked_soil_analysis.py index 02eb133de91..0d290556bf9 100644 --- a/erpnext/agriculture/doctype/linked_soil_analysis/linked_soil_analysis.py +++ b/erpnext/agriculture/doctype/linked_soil_analysis/linked_soil_analysis.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/agriculture/doctype/linked_soil_texture/linked_soil_texture.py b/erpnext/agriculture/doctype/linked_soil_texture/linked_soil_texture.py index f580e165762..1438853690a 100644 --- a/erpnext/agriculture/doctype/linked_soil_texture/linked_soil_texture.py +++ b/erpnext/agriculture/doctype/linked_soil_texture/linked_soil_texture.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/agriculture/doctype/plant_analysis/plant_analysis.py b/erpnext/agriculture/doctype/plant_analysis/plant_analysis.py index 62382500166..9a939cde0b4 100644 --- a/erpnext/agriculture/doctype/plant_analysis/plant_analysis.py +++ b/erpnext/agriculture/doctype/plant_analysis/plant_analysis.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/agriculture/doctype/plant_analysis/test_plant_analysis.py b/erpnext/agriculture/doctype/plant_analysis/test_plant_analysis.py index 6b6e8436124..cee241f53ae 100644 --- a/erpnext/agriculture/doctype/plant_analysis/test_plant_analysis.py +++ b/erpnext/agriculture/doctype/plant_analysis/test_plant_analysis.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/agriculture/doctype/plant_analysis_criteria/plant_analysis_criteria.py b/erpnext/agriculture/doctype/plant_analysis_criteria/plant_analysis_criteria.py index 9f719874ed2..7e6571c4a3d 100644 --- a/erpnext/agriculture/doctype/plant_analysis_criteria/plant_analysis_criteria.py +++ b/erpnext/agriculture/doctype/plant_analysis_criteria/plant_analysis_criteria.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/agriculture/doctype/soil_analysis/soil_analysis.py b/erpnext/agriculture/doctype/soil_analysis/soil_analysis.py index e0c8177e630..03667fbcae9 100644 --- a/erpnext/agriculture/doctype/soil_analysis/soil_analysis.py +++ b/erpnext/agriculture/doctype/soil_analysis/soil_analysis.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/agriculture/doctype/soil_analysis/test_soil_analysis.py b/erpnext/agriculture/doctype/soil_analysis/test_soil_analysis.py index 24fe0748d38..bb99363ffd9 100644 --- a/erpnext/agriculture/doctype/soil_analysis/test_soil_analysis.py +++ b/erpnext/agriculture/doctype/soil_analysis/test_soil_analysis.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/agriculture/doctype/soil_analysis_criteria/soil_analysis_criteria.py b/erpnext/agriculture/doctype/soil_analysis_criteria/soil_analysis_criteria.py index 09b917c549a..f5018203287 100644 --- a/erpnext/agriculture/doctype/soil_analysis_criteria/soil_analysis_criteria.py +++ b/erpnext/agriculture/doctype/soil_analysis_criteria/soil_analysis_criteria.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/agriculture/doctype/soil_texture/soil_texture.py b/erpnext/agriculture/doctype/soil_texture/soil_texture.py index 636af77f4f8..b1fc9a063d0 100644 --- a/erpnext/agriculture/doctype/soil_texture/soil_texture.py +++ b/erpnext/agriculture/doctype/soil_texture/soil_texture.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/agriculture/doctype/soil_texture/test_soil_texture.py b/erpnext/agriculture/doctype/soil_texture/test_soil_texture.py index c701eb8f271..45497675cec 100644 --- a/erpnext/agriculture/doctype/soil_texture/test_soil_texture.py +++ b/erpnext/agriculture/doctype/soil_texture/test_soil_texture.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/agriculture/doctype/soil_texture_criteria/soil_texture_criteria.py b/erpnext/agriculture/doctype/soil_texture_criteria/soil_texture_criteria.py index 9980e8b0cae..92a0cf9aec4 100644 --- a/erpnext/agriculture/doctype/soil_texture_criteria/soil_texture_criteria.py +++ b/erpnext/agriculture/doctype/soil_texture_criteria/soil_texture_criteria.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/agriculture/doctype/water_analysis/test_water_analysis.py b/erpnext/agriculture/doctype/water_analysis/test_water_analysis.py index 5cddeeb1616..ae144ccb210 100644 --- a/erpnext/agriculture/doctype/water_analysis/test_water_analysis.py +++ b/erpnext/agriculture/doctype/water_analysis/test_water_analysis.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/agriculture/doctype/water_analysis/water_analysis.py b/erpnext/agriculture/doctype/water_analysis/water_analysis.py index 228ae340f20..434acecc6e3 100644 --- a/erpnext/agriculture/doctype/water_analysis/water_analysis.py +++ b/erpnext/agriculture/doctype/water_analysis/water_analysis.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/agriculture/doctype/water_analysis_criteria/water_analysis_criteria.py b/erpnext/agriculture/doctype/water_analysis_criteria/water_analysis_criteria.py index 8771733213c..225c4f6529d 100644 --- a/erpnext/agriculture/doctype/water_analysis_criteria/water_analysis_criteria.py +++ b/erpnext/agriculture/doctype/water_analysis_criteria/water_analysis_criteria.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/agriculture/doctype/weather/test_weather.py b/erpnext/agriculture/doctype/weather/test_weather.py index 1b4bab9a53a..345baa9e99d 100644 --- a/erpnext/agriculture/doctype/weather/test_weather.py +++ b/erpnext/agriculture/doctype/weather/test_weather.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/agriculture/doctype/weather/weather.py b/erpnext/agriculture/doctype/weather/weather.py index b41964dafda..8750709c564 100644 --- a/erpnext/agriculture/doctype/weather/weather.py +++ b/erpnext/agriculture/doctype/weather/weather.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/agriculture/doctype/weather_parameter/weather_parameter.py b/erpnext/agriculture/doctype/weather_parameter/weather_parameter.py index 42fcbcb719a..7f02ab39aec 100644 --- a/erpnext/agriculture/doctype/weather_parameter/weather_parameter.py +++ b/erpnext/agriculture/doctype/weather_parameter/weather_parameter.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/agriculture/setup.py b/erpnext/agriculture/setup.py index 75f07be5de2..70931b9ad59 100644 --- a/erpnext/agriculture/setup.py +++ b/erpnext/agriculture/setup.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe import _ from erpnext.setup.utils import insert_record diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index cf62f496ea6..cfe7edca710 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json import math diff --git a/erpnext/assets/doctype/asset/asset_dashboard.py b/erpnext/assets/doctype/asset/asset_dashboard.py index cd04e1d8f04..c9efe3d0848 100644 --- a/erpnext/assets/doctype/asset/asset_dashboard.py +++ b/erpnext/assets/doctype/asset/asset_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/assets/doctype/asset/depreciation.py b/erpnext/assets/doctype/asset/depreciation.py index 609791012a2..ca10b1db19a 100644 --- a/erpnext/assets/doctype/asset/depreciation.py +++ b/erpnext/assets/doctype/asset/depreciation.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/assets/doctype/asset/test_asset.py b/erpnext/assets/doctype/asset/test_asset.py index f162d9f39dc..d1d4527ec70 100644 --- a/erpnext/assets/doctype/asset/test_asset.py +++ b/erpnext/assets/doctype/asset/test_asset.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/assets/doctype/asset_category/asset_category.py b/erpnext/assets/doctype/asset_category/asset_category.py index 1e56c010c46..e2f3ca318f6 100644 --- a/erpnext/assets/doctype/asset_category/asset_category.py +++ b/erpnext/assets/doctype/asset_category/asset_category.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/assets/doctype/asset_category/test_asset_category.py b/erpnext/assets/doctype/asset_category/test_asset_category.py index 53ec4ed38ef..3d19fa39d1e 100644 --- a/erpnext/assets/doctype/asset_category/test_asset_category.py +++ b/erpnext/assets/doctype/asset_category/test_asset_category.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/assets/doctype/asset_category_account/asset_category_account.py b/erpnext/assets/doctype/asset_category_account/asset_category_account.py index 66280acb2e8..e06d2335678 100644 --- a/erpnext/assets/doctype/asset_category_account/asset_category_account.py +++ b/erpnext/assets/doctype/asset_category_account/asset_category_account.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/assets/doctype/asset_finance_book/asset_finance_book.py b/erpnext/assets/doctype/asset_finance_book/asset_finance_book.py index c4f095305c5..292ca138fd9 100644 --- a/erpnext/assets/doctype/asset_finance_book/asset_finance_book.py +++ b/erpnext/assets/doctype/asset_finance_book/asset_finance_book.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py b/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py index ec55fa4efcb..4fc4c4cb993 100644 --- a/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py +++ b/erpnext/assets/doctype/asset_maintenance/asset_maintenance.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _, throw diff --git a/erpnext/assets/doctype/asset_maintenance/test_asset_maintenance.py b/erpnext/assets/doctype/asset_maintenance/test_asset_maintenance.py index 0f915086a9f..8acb61b9671 100644 --- a/erpnext/assets/doctype/asset_maintenance/test_asset_maintenance.py +++ b/erpnext/assets/doctype/asset_maintenance/test_asset_maintenance.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.py b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.py index 1f2393649d0..7d3453fc982 100644 --- a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.py +++ b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/assets/doctype/asset_maintenance_log/test_asset_maintenance_log.py b/erpnext/assets/doctype/asset_maintenance_log/test_asset_maintenance_log.py index 7ad69e92aba..9980ff31f62 100644 --- a/erpnext/assets/doctype/asset_maintenance_log/test_asset_maintenance_log.py +++ b/erpnext/assets/doctype/asset_maintenance_log/test_asset_maintenance_log.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/assets/doctype/asset_maintenance_task/asset_maintenance_task.py b/erpnext/assets/doctype/asset_maintenance_task/asset_maintenance_task.py index 2280f557284..1078208b2fc 100644 --- a/erpnext/assets/doctype/asset_maintenance_task/asset_maintenance_task.py +++ b/erpnext/assets/doctype/asset_maintenance_task/asset_maintenance_task.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/assets/doctype/asset_maintenance_team/asset_maintenance_team.py b/erpnext/assets/doctype/asset_maintenance_team/asset_maintenance_team.py index 46e9029941c..938c99b4f6b 100644 --- a/erpnext/assets/doctype/asset_maintenance_team/asset_maintenance_team.py +++ b/erpnext/assets/doctype/asset_maintenance_team/asset_maintenance_team.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/assets/doctype/asset_maintenance_team/test_asset_maintenance_team.py b/erpnext/assets/doctype/asset_maintenance_team/test_asset_maintenance_team.py index 8d757b74c06..732ab4ae484 100644 --- a/erpnext/assets/doctype/asset_maintenance_team/test_asset_maintenance_team.py +++ b/erpnext/assets/doctype/asset_maintenance_team/test_asset_maintenance_team.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/assets/doctype/asset_movement/asset_movement.py b/erpnext/assets/doctype/asset_movement/asset_movement.py index 901bdb5c001..07bea616da6 100644 --- a/erpnext/assets/doctype/asset_movement/asset_movement.py +++ b/erpnext/assets/doctype/asset_movement/asset_movement.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/assets/doctype/asset_movement/test_asset_movement.py b/erpnext/assets/doctype/asset_movement/test_asset_movement.py index 058bbd1abd6..025facc4fda 100644 --- a/erpnext/assets/doctype/asset_movement/test_asset_movement.py +++ b/erpnext/assets/doctype/asset_movement/test_asset_movement.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/assets/doctype/asset_movement_item/asset_movement_item.py b/erpnext/assets/doctype/asset_movement_item/asset_movement_item.py index 24da37176e8..e25226d580d 100644 --- a/erpnext/assets/doctype/asset_movement_item/asset_movement_item.py +++ b/erpnext/assets/doctype/asset_movement_item/asset_movement_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/assets/doctype/asset_repair/asset_repair.py b/erpnext/assets/doctype/asset_repair/asset_repair.py index 99a7d9bfbf8..d780c18ad02 100644 --- a/erpnext/assets/doctype/asset_repair/asset_repair.py +++ b/erpnext/assets/doctype/asset_repair/asset_repair.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/assets/doctype/asset_repair/test_asset_repair.py b/erpnext/assets/doctype/asset_repair/test_asset_repair.py index 30e3a5296e0..81b4f6c4499 100644 --- a/erpnext/assets/doctype/asset_repair/test_asset_repair.py +++ b/erpnext/assets/doctype/asset_repair/test_asset_repair.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.py b/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.py index 2c11018caa9..b93f474a789 100644 --- a/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.py +++ b/erpnext/assets/doctype/asset_value_adjustment/asset_value_adjustment.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/assets/doctype/asset_value_adjustment/test_asset_value_adjustment.py b/erpnext/assets/doctype/asset_value_adjustment/test_asset_value_adjustment.py index 52728d6fd69..ef13c5617f5 100644 --- a/erpnext/assets/doctype/asset_value_adjustment/test_asset_value_adjustment.py +++ b/erpnext/assets/doctype/asset_value_adjustment/test_asset_value_adjustment.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/assets/doctype/depreciation_schedule/depreciation_schedule.py b/erpnext/assets/doctype/depreciation_schedule/depreciation_schedule.py index 3199b7dc8dc..b597c587522 100644 --- a/erpnext/assets/doctype/depreciation_schedule/depreciation_schedule.py +++ b/erpnext/assets/doctype/depreciation_schedule/depreciation_schedule.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/assets/doctype/linked_location/linked_location.py b/erpnext/assets/doctype/linked_location/linked_location.py index e622e84dc32..e1257f3db16 100644 --- a/erpnext/assets/doctype/linked_location/linked_location.py +++ b/erpnext/assets/doctype/linked_location/linked_location.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/assets/doctype/location/location.py b/erpnext/assets/doctype/location/location.py index 1430306bec1..abc7325cf6c 100644 --- a/erpnext/assets/doctype/location/location.py +++ b/erpnext/assets/doctype/location/location.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json import math diff --git a/erpnext/assets/doctype/location/test_location.py b/erpnext/assets/doctype/location/test_location.py index c98b0b0936c..36e1dd4ce4b 100644 --- a/erpnext/assets/doctype/location/test_location.py +++ b/erpnext/assets/doctype/location/test_location.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import json import unittest diff --git a/erpnext/assets/doctype/maintenance_team_member/maintenance_team_member.py b/erpnext/assets/doctype/maintenance_team_member/maintenance_team_member.py index 8fc5c9c43c1..c3ede94bc68 100644 --- a/erpnext/assets/doctype/maintenance_team_member/maintenance_team_member.py +++ b/erpnext/assets/doctype/maintenance_team_member/maintenance_team_member.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/assets/doctype/maintenance_team_member/test_maintenance_team_member.py b/erpnext/assets/doctype/maintenance_team_member/test_maintenance_team_member.py index f8958c6bbef..911a6544e9a 100644 --- a/erpnext/assets/doctype/maintenance_team_member/test_maintenance_team_member.py +++ b/erpnext/assets/doctype/maintenance_team_member/test_maintenance_team_member.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py b/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py index 63685fef465..db513364f49 100644 --- a/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py +++ b/erpnext/assets/report/fixed_asset_register/fixed_asset_register.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/buying/__init__.py b/erpnext/buying/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/buying/__init__.py +++ b/erpnext/buying/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/buying/doctype/__init__.py b/erpnext/buying/doctype/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/buying/doctype/__init__.py +++ b/erpnext/buying/doctype/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/buying/doctype/buying_settings/buying_settings.py b/erpnext/buying/doctype/buying_settings/buying_settings.py index 9e72c1890c5..2b6ff43530f 100644 --- a/erpnext/buying/doctype/buying_settings/buying_settings.py +++ b/erpnext/buying/doctype/buying_settings/buying_settings.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/buying/doctype/buying_settings/test_buying_settings.py b/erpnext/buying/doctype/buying_settings/test_buying_settings.py index 4998aebd6bb..cdb691de0c3 100644 --- a/erpnext/buying/doctype/buying_settings/test_buying_settings.py +++ b/erpnext/buying/doctype/buying_settings/test_buying_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/buying/doctype/purchase_order/__init__.py b/erpnext/buying/doctype/purchase_order/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/buying/doctype/purchase_order/__init__.py +++ b/erpnext/buying/doctype/purchase_order/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index ac86337b257..5eab21bd9d3 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py b/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py index af1dceb4070..8588c002d5e 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/buying/doctype/purchase_order/test_purchase_order.py b/erpnext/buying/doctype/purchase_order/test_purchase_order.py index 1453b8e7e4d..9a63afc1303 100644 --- a/erpnext/buying/doctype/purchase_order/test_purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/test_purchase_order.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json import unittest diff --git a/erpnext/buying/doctype/purchase_order_item/__init__.py b/erpnext/buying/doctype/purchase_order_item/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/buying/doctype/purchase_order_item/__init__.py +++ b/erpnext/buying/doctype/purchase_order_item/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py index a391a3d0688..0cef0deee55 100644 --- a/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py +++ b/erpnext/buying/doctype/purchase_order_item/purchase_order_item.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/buying/doctype/purchase_order_item_supplied/__init__.py b/erpnext/buying/doctype/purchase_order_item_supplied/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/buying/doctype/purchase_order_item_supplied/__init__.py +++ b/erpnext/buying/doctype/purchase_order_item_supplied/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.py b/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.py index 909faeca6ad..c69b5ed7a4c 100644 --- a/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.py +++ b/erpnext/buying/doctype/purchase_order_item_supplied/purchase_order_item_supplied.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/buying/doctype/purchase_receipt_item_supplied/__init__.py b/erpnext/buying/doctype/purchase_receipt_item_supplied/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/buying/doctype/purchase_receipt_item_supplied/__init__.py +++ b/erpnext/buying/doctype/purchase_receipt_item_supplied/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.py b/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.py index caec4e8b7aa..7b67921232a 100644 --- a/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.py +++ b/erpnext/buying/doctype/purchase_receipt_item_supplied/purchase_receipt_item_supplied.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py index 5aa2d1374e2..b670bd58d48 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation_dashboard.py b/erpnext/buying/doctype/request_for_quotation/request_for_quotation_dashboard.py index 0708cab30a1..21ef33294e3 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation_dashboard.py +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/buying/doctype/request_for_quotation/test_request_for_quotation.py b/erpnext/buying/doctype/request_for_quotation/test_request_for_quotation.py index 33fde8e6dc8..51901991b5a 100644 --- a/erpnext/buying/doctype/request_for_quotation/test_request_for_quotation.py +++ b/erpnext/buying/doctype/request_for_quotation/test_request_for_quotation.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/buying/doctype/request_for_quotation_item/request_for_quotation_item.py b/erpnext/buying/doctype/request_for_quotation_item/request_for_quotation_item.py index 35f3305b8ef..096aedee32a 100644 --- a/erpnext/buying/doctype/request_for_quotation_item/request_for_quotation_item.py +++ b/erpnext/buying/doctype/request_for_quotation_item/request_for_quotation_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.py b/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.py index 47c0deb39f3..dbaad478a3c 100644 --- a/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.py +++ b/erpnext/buying/doctype/request_for_quotation_supplier/request_for_quotation_supplier.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/buying/doctype/supplier/__init__.py b/erpnext/buying/doctype/supplier/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/buying/doctype/supplier/__init__.py +++ b/erpnext/buying/doctype/supplier/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/buying/doctype/supplier/supplier.py b/erpnext/buying/doctype/supplier/supplier.py index 0ab01712e32..32659d607b0 100644 --- a/erpnext/buying/doctype/supplier/supplier.py +++ b/erpnext/buying/doctype/supplier/supplier.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe import frappe.defaults diff --git a/erpnext/buying/doctype/supplier/supplier_dashboard.py b/erpnext/buying/doctype/supplier/supplier_dashboard.py index 16251035bd3..cfa0375e2ed 100644 --- a/erpnext/buying/doctype/supplier/supplier_dashboard.py +++ b/erpnext/buying/doctype/supplier/supplier_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/buying/doctype/supplier/test_supplier.py b/erpnext/buying/doctype/supplier/test_supplier.py index 8a4eefa4fd3..13fe9df13ee 100644 --- a/erpnext/buying/doctype/supplier/test_supplier.py +++ b/erpnext/buying/doctype/supplier/test_supplier.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/buying/doctype/supplier_quotation/__init__.py b/erpnext/buying/doctype/supplier_quotation/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/buying/doctype/supplier_quotation/__init__.py +++ b/erpnext/buying/doctype/supplier_quotation/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py index af462fc6859..d65ab94a6d3 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py b/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py index 014b1025dd3..1680efc53c7 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py b/erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py index 2db8e22f08b..d48ac7eb3b4 100644 --- a/erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py +++ b/erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py @@ -2,7 +2,6 @@ # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/buying/doctype/supplier_quotation_item/__init__.py b/erpnext/buying/doctype/supplier_quotation_item/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/buying/doctype/supplier_quotation_item/__init__.py +++ b/erpnext/buying/doctype/supplier_quotation_item/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.py b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.py index 03adab54626..672de1ac284 100644 --- a/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.py +++ b/erpnext/buying/doctype/supplier_quotation_item/supplier_quotation_item.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard.py b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard.py index f944fe44665..3bcc0debae9 100644 --- a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard.py +++ b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import time from datetime import timedelta diff --git a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py index 7186e01d084..e021c9c6be1 100644 --- a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py +++ b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/buying/doctype/supplier_scorecard/test_supplier_scorecard.py b/erpnext/buying/doctype/supplier_scorecard/test_supplier_scorecard.py index ef7fae3f111..49e33517e6f 100644 --- a/erpnext/buying/doctype/supplier_scorecard/test_supplier_scorecard.py +++ b/erpnext/buying/doctype/supplier_scorecard/test_supplier_scorecard.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/buying/doctype/supplier_scorecard_criteria/supplier_scorecard_criteria.py b/erpnext/buying/doctype/supplier_scorecard_criteria/supplier_scorecard_criteria.py index c456377d9b7..7cd18c31e8b 100644 --- a/erpnext/buying/doctype/supplier_scorecard_criteria/supplier_scorecard_criteria.py +++ b/erpnext/buying/doctype/supplier_scorecard_criteria/supplier_scorecard_criteria.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import re diff --git a/erpnext/buying/doctype/supplier_scorecard_criteria/test_supplier_scorecard_criteria.py b/erpnext/buying/doctype/supplier_scorecard_criteria/test_supplier_scorecard_criteria.py index 9fca9a9f17a..dacc982420e 100644 --- a/erpnext/buying/doctype/supplier_scorecard_criteria/test_supplier_scorecard_criteria.py +++ b/erpnext/buying/doctype/supplier_scorecard_criteria/test_supplier_scorecard_criteria.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/buying/doctype/supplier_scorecard_period/supplier_scorecard_period.py b/erpnext/buying/doctype/supplier_scorecard_period/supplier_scorecard_period.py index b03d216ce23..c247241cf35 100644 --- a/erpnext/buying/doctype/supplier_scorecard_period/supplier_scorecard_period.py +++ b/erpnext/buying/doctype/supplier_scorecard_period/supplier_scorecard_period.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _, throw diff --git a/erpnext/buying/doctype/supplier_scorecard_period/test_supplier_scorecard_period.py b/erpnext/buying/doctype/supplier_scorecard_period/test_supplier_scorecard_period.py index de8bc0a0272..005cd791700 100644 --- a/erpnext/buying/doctype/supplier_scorecard_period/test_supplier_scorecard_period.py +++ b/erpnext/buying/doctype/supplier_scorecard_period/test_supplier_scorecard_period.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/buying/doctype/supplier_scorecard_scoring_criteria/supplier_scorecard_scoring_criteria.py b/erpnext/buying/doctype/supplier_scorecard_scoring_criteria/supplier_scorecard_scoring_criteria.py index 79d5082ab6a..3a6de59f34b 100644 --- a/erpnext/buying/doctype/supplier_scorecard_scoring_criteria/supplier_scorecard_scoring_criteria.py +++ b/erpnext/buying/doctype/supplier_scorecard_scoring_criteria/supplier_scorecard_scoring_criteria.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/buying/doctype/supplier_scorecard_scoring_standing/supplier_scorecard_scoring_standing.py b/erpnext/buying/doctype/supplier_scorecard_scoring_standing/supplier_scorecard_scoring_standing.py index 5063b20ddbb..8d66e6414b7 100644 --- a/erpnext/buying/doctype/supplier_scorecard_scoring_standing/supplier_scorecard_scoring_standing.py +++ b/erpnext/buying/doctype/supplier_scorecard_scoring_standing/supplier_scorecard_scoring_standing.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/buying/doctype/supplier_scorecard_scoring_variable/supplier_scorecard_scoring_variable.py b/erpnext/buying/doctype/supplier_scorecard_scoring_variable/supplier_scorecard_scoring_variable.py index 476cb35e8cd..f13eb5b420c 100644 --- a/erpnext/buying/doctype/supplier_scorecard_scoring_variable/supplier_scorecard_scoring_variable.py +++ b/erpnext/buying/doctype/supplier_scorecard_scoring_variable/supplier_scorecard_scoring_variable.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/buying/doctype/supplier_scorecard_standing/supplier_scorecard_standing.py b/erpnext/buying/doctype/supplier_scorecard_standing/supplier_scorecard_standing.py index 4fc45e89c7b..11ebe6da13c 100644 --- a/erpnext/buying/doctype/supplier_scorecard_standing/supplier_scorecard_standing.py +++ b/erpnext/buying/doctype/supplier_scorecard_standing/supplier_scorecard_standing.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/buying/doctype/supplier_scorecard_standing/test_supplier_scorecard_standing.py b/erpnext/buying/doctype/supplier_scorecard_standing/test_supplier_scorecard_standing.py index 5ac5927d081..bd1b0ad7f61 100644 --- a/erpnext/buying/doctype/supplier_scorecard_standing/test_supplier_scorecard_standing.py +++ b/erpnext/buying/doctype/supplier_scorecard_standing/test_supplier_scorecard_standing.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/buying/doctype/supplier_scorecard_variable/supplier_scorecard_variable.py b/erpnext/buying/doctype/supplier_scorecard_variable/supplier_scorecard_variable.py index 30b2a1893f1..217aadba6bd 100644 --- a/erpnext/buying/doctype/supplier_scorecard_variable/supplier_scorecard_variable.py +++ b/erpnext/buying/doctype/supplier_scorecard_variable/supplier_scorecard_variable.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import sys diff --git a/erpnext/buying/doctype/supplier_scorecard_variable/test_supplier_scorecard_variable.py b/erpnext/buying/doctype/supplier_scorecard_variable/test_supplier_scorecard_variable.py index 990413cd404..4d75981125f 100644 --- a/erpnext/buying/doctype/supplier_scorecard_variable/test_supplier_scorecard_variable.py +++ b/erpnext/buying/doctype/supplier_scorecard_variable/test_supplier_scorecard_variable.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/buying/page/__init__.py b/erpnext/buying/page/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/buying/page/__init__.py +++ b/erpnext/buying/page/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/buying/report/procurement_tracker/procurement_tracker.py b/erpnext/buying/report/procurement_tracker/procurement_tracker.py index cb992342820..295a19d052e 100644 --- a/erpnext/buying/report/procurement_tracker/procurement_tracker.py +++ b/erpnext/buying/report/procurement_tracker/procurement_tracker.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/buying/report/procurement_tracker/test_procurement_tracker.py b/erpnext/buying/report/procurement_tracker/test_procurement_tracker.py index fd23795287f..84de8c67438 100644 --- a/erpnext/buying/report/procurement_tracker/test_procurement_tracker.py +++ b/erpnext/buying/report/procurement_tracker/test_procurement_tracker.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import unittest from datetime import datetime diff --git a/erpnext/buying/report/purchase_analytics/purchase_analytics.py b/erpnext/buying/report/purchase_analytics/purchase_analytics.py index bef66da4818..6a84d913227 100644 --- a/erpnext/buying/report/purchase_analytics/purchase_analytics.py +++ b/erpnext/buying/report/purchase_analytics/purchase_analytics.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from erpnext.selling.report.sales_analytics.sales_analytics import Analytics diff --git a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py index a566d568119..9dd912118ff 100644 --- a/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py +++ b/erpnext/buying/report/purchase_order_analysis/purchase_order_analysis.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import copy diff --git a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.py b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.py index 9781480afa7..21643a896b7 100644 --- a/erpnext/buying/report/purchase_order_trends/purchase_order_trends.py +++ b/erpnext/buying/report/purchase_order_trends/purchase_order_trends.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/buying/report/requested_items_to_order_and_receive/requested_items_to_order_and_receive.py b/erpnext/buying/report/requested_items_to_order_and_receive/requested_items_to_order_and_receive.py index 42cc6ebc0a6..f98e5f12c2d 100644 --- a/erpnext/buying/report/requested_items_to_order_and_receive/requested_items_to_order_and_receive.py +++ b/erpnext/buying/report/requested_items_to_order_and_receive/requested_items_to_order_and_receive.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import copy diff --git a/erpnext/buying/report/subcontract_order_summary/subcontract_order_summary.py b/erpnext/buying/report/subcontract_order_summary/subcontract_order_summary.py index 202d3641859..8e5c2f9a30d 100644 --- a/erpnext/buying/report/subcontract_order_summary/subcontract_order_summary.py +++ b/erpnext/buying/report/subcontract_order_summary/subcontract_order_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/buying/report/subcontracted_item_to_be_received/subcontracted_item_to_be_received.py b/erpnext/buying/report/subcontracted_item_to_be_received/subcontracted_item_to_be_received.py index 9299cca0da4..67e275f9851 100644 --- a/erpnext/buying/report/subcontracted_item_to_be_received/subcontracted_item_to_be_received.py +++ b/erpnext/buying/report/subcontracted_item_to_be_received/subcontracted_item_to_be_received.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/buying/report/subcontracted_item_to_be_received/test_subcontracted_item_to_be_received.py b/erpnext/buying/report/subcontracted_item_to_be_received/test_subcontracted_item_to_be_received.py index 7aeae451645..144523ad522 100644 --- a/erpnext/buying/report/subcontracted_item_to_be_received/test_subcontracted_item_to_be_received.py +++ b/erpnext/buying/report/subcontracted_item_to_be_received/test_subcontracted_item_to_be_received.py @@ -2,7 +2,6 @@ # Embedded file name: /Users/anuragmishra/frappe-develop/apps/erpnext/erpnext/buying/report/subcontracted_item_to_be_received/test_subcontracted_item_to_be_received.py # Compiled at: 2019-05-06 09:51:46 # Decompiled by https://python-decompiler.com -from __future__ import unicode_literals import unittest diff --git a/erpnext/buying/report/subcontracted_raw_materials_to_be_transferred/subcontracted_raw_materials_to_be_transferred.py b/erpnext/buying/report/subcontracted_raw_materials_to_be_transferred/subcontracted_raw_materials_to_be_transferred.py index a8fad967d40..6b605add4c7 100644 --- a/erpnext/buying/report/subcontracted_raw_materials_to_be_transferred/subcontracted_raw_materials_to_be_transferred.py +++ b/erpnext/buying/report/subcontracted_raw_materials_to_be_transferred/subcontracted_raw_materials_to_be_transferred.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/buying/report/subcontracted_raw_materials_to_be_transferred/test_subcontracted_raw_materials_to_be_transferred.py b/erpnext/buying/report/subcontracted_raw_materials_to_be_transferred/test_subcontracted_raw_materials_to_be_transferred.py index dcdc5e36abe..3c203ac23fa 100644 --- a/erpnext/buying/report/subcontracted_raw_materials_to_be_transferred/test_subcontracted_raw_materials_to_be_transferred.py +++ b/erpnext/buying/report/subcontracted_raw_materials_to_be_transferred/test_subcontracted_raw_materials_to_be_transferred.py @@ -2,7 +2,6 @@ # Embedded file name: /Users/anuragmishra/frappe-develop/apps/erpnext/erpnext/buying/report/subcontracted_raw_materials_to_be_transferred/test_subcontracted_raw_materials_to_be_transferred.py # Compiled at: 2019-05-06 10:24:35 # Decompiled by https://python-decompiler.com -from __future__ import unicode_literals import json import unittest diff --git a/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.py b/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.py index 62b83ede04b..65f9ce3c57e 100644 --- a/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.py +++ b/erpnext/buying/report/supplier_quotation_comparison/supplier_quotation_comparison.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from collections import defaultdict diff --git a/erpnext/buying/utils.py b/erpnext/buying/utils.py index 81d995ce8de..66c60d56379 100644 --- a/erpnext/buying/utils.py +++ b/erpnext/buying/utils.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/commands/__init__.py b/erpnext/commands/__init__.py index f3bf11ad652..59311192148 100644 --- a/erpnext/commands/__init__.py +++ b/erpnext/commands/__init__.py @@ -1,8 +1,6 @@ # Copyright (c) 2015, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt -from __future__ import absolute_import, print_function, unicode_literals - import click import frappe from frappe.commands import get_site, pass_context diff --git a/erpnext/communication/doctype/communication_medium/communication_medium.py b/erpnext/communication/doctype/communication_medium/communication_medium.py index b15c3bed71b..6dfdb73b858 100644 --- a/erpnext/communication/doctype/communication_medium/communication_medium.py +++ b/erpnext/communication/doctype/communication_medium/communication_medium.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/communication/doctype/communication_medium_timeslot/communication_medium_timeslot.py b/erpnext/communication/doctype/communication_medium_timeslot/communication_medium_timeslot.py index 5189b09dc3e..b65eba75ed0 100644 --- a/erpnext/communication/doctype/communication_medium_timeslot/communication_medium_timeslot.py +++ b/erpnext/communication/doctype/communication_medium_timeslot/communication_medium_timeslot.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/config/education.py b/erpnext/config/education.py index ecd771f608c..3ead3ef9572 100644 --- a/erpnext/config/education.py +++ b/erpnext/config/education.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/config/projects.py b/erpnext/config/projects.py index d4d4a72a5d1..168dead9bf4 100644 --- a/erpnext/config/projects.py +++ b/erpnext/config/projects.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 37b8f9d6d30..1b85871cf9a 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index e0b3ad801ec..9965c87c810 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py index 1b56ae9d4dc..2d6510854ed 100644 --- a/erpnext/controllers/item_variant.py +++ b/erpnext/controllers/item_variant.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import copy import json diff --git a/erpnext/controllers/print_settings.py b/erpnext/controllers/print_settings.py index f6e061bcdcf..cf9de52d4cd 100644 --- a/erpnext/controllers/print_settings.py +++ b/erpnext/controllers/print_settings.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals def set_print_templates_for_item_table(doc, settings): diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index 05ece4defee..22e02b4a745 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json from collections import defaultdict diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 5f2fbeb0c93..df3c5f10c1b 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index bb269f3db22..dad3ed70933 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, bold, throw diff --git a/erpnext/controllers/status_updater.py b/erpnext/controllers/status_updater.py index 49a76da6976..76a7cdab516 100644 --- a/erpnext/controllers/status_updater.py +++ b/erpnext/controllers/status_updater.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index 7e7f598bc43..aac72ab10e5 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/controllers/tests/test_item_variant.py b/erpnext/controllers/tests/test_item_variant.py index b3633e6ff09..391b5ec8819 100644 --- a/erpnext/controllers/tests/test_item_variant.py +++ b/erpnext/controllers/tests/test_item_variant.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import json import unittest diff --git a/erpnext/controllers/tests/test_mapper.py b/erpnext/controllers/tests/test_mapper.py index 2d1ae43f074..0d8789abef6 100644 --- a/erpnext/controllers/tests/test_mapper.py +++ b/erpnext/controllers/tests/test_mapper.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import json import unittest diff --git a/erpnext/controllers/tests/test_qty_based_taxes.py b/erpnext/controllers/tests/test_qty_based_taxes.py index 41673d1e6fb..226778db014 100644 --- a/erpnext/controllers/tests/test_qty_based_taxes.py +++ b/erpnext/controllers/tests/test_qty_based_taxes.py @@ -1,4 +1,3 @@ -from __future__ import print_function, unicode_literals import unittest from uuid import uuid4 as _uuid4 diff --git a/erpnext/controllers/trends.py b/erpnext/controllers/trends.py index 05d900d0f04..1cb101f214a 100644 --- a/erpnext/controllers/trends.py +++ b/erpnext/controllers/trends.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/controllers/website_list_for_contact.py b/erpnext/controllers/website_list_for_contact.py index 8e5952c4a38..23463abe0ae 100644 --- a/erpnext/controllers/website_list_for_contact.py +++ b/erpnext/controllers/website_list_for_contact.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/crm/doctype/appointment/appointment.py b/erpnext/crm/doctype/appointment/appointment.py index f2055349bd2..20fb987c601 100644 --- a/erpnext/crm/doctype/appointment/appointment.py +++ b/erpnext/crm/doctype/appointment/appointment.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from collections import Counter diff --git a/erpnext/crm/doctype/appointment/test_appointment.py b/erpnext/crm/doctype/appointment/test_appointment.py index 59138a9ea9b..f4086dc37c8 100644 --- a/erpnext/crm/doctype/appointment/test_appointment.py +++ b/erpnext/crm/doctype/appointment/test_appointment.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import datetime import unittest diff --git a/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.py b/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.py index 7e1da677312..1431b03a2ef 100644 --- a/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.py +++ b/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import datetime diff --git a/erpnext/crm/doctype/appointment_booking_settings/test_appointment_booking_settings.py b/erpnext/crm/doctype/appointment_booking_settings/test_appointment_booking_settings.py index 5c5432c5246..bc68bbd86c6 100644 --- a/erpnext/crm/doctype/appointment_booking_settings/test_appointment_booking_settings.py +++ b/erpnext/crm/doctype/appointment_booking_settings/test_appointment_booking_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/crm/doctype/appointment_booking_slots/appointment_booking_slots.py b/erpnext/crm/doctype/appointment_booking_slots/appointment_booking_slots.py index 4741c8af5a1..756c8495e0a 100644 --- a/erpnext/crm/doctype/appointment_booking_slots/appointment_booking_slots.py +++ b/erpnext/crm/doctype/appointment_booking_slots/appointment_booking_slots.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/crm/doctype/availability_of_slots/availability_of_slots.py b/erpnext/crm/doctype/availability_of_slots/availability_of_slots.py index e33d87b1939..4294e6da2d2 100644 --- a/erpnext/crm/doctype/availability_of_slots/availability_of_slots.py +++ b/erpnext/crm/doctype/availability_of_slots/availability_of_slots.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/crm/doctype/campaign_email_schedule/campaign_email_schedule.py b/erpnext/crm/doctype/campaign_email_schedule/campaign_email_schedule.py index f053e6e7e4f..de9b5a1192c 100644 --- a/erpnext/crm/doctype/campaign_email_schedule/campaign_email_schedule.py +++ b/erpnext/crm/doctype/campaign_email_schedule/campaign_email_schedule.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/crm/doctype/contract/contract.py b/erpnext/crm/doctype/contract/contract.py index 9654613f041..e21f46a3837 100644 --- a/erpnext/crm/doctype/contract/contract.py +++ b/erpnext/crm/doctype/contract/contract.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/crm/doctype/contract/test_contract.py b/erpnext/crm/doctype/contract/test_contract.py index 87716368177..e685362a494 100644 --- a/erpnext/crm/doctype/contract/test_contract.py +++ b/erpnext/crm/doctype/contract/test_contract.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/crm/doctype/contract_fulfilment_checklist/contract_fulfilment_checklist.py b/erpnext/crm/doctype/contract_fulfilment_checklist/contract_fulfilment_checklist.py index ae56f93fc84..4e4e9986d6b 100644 --- a/erpnext/crm/doctype/contract_fulfilment_checklist/contract_fulfilment_checklist.py +++ b/erpnext/crm/doctype/contract_fulfilment_checklist/contract_fulfilment_checklist.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/crm/doctype/contract_fulfilment_checklist/test_contract_fulfilment_checklist.py b/erpnext/crm/doctype/contract_fulfilment_checklist/test_contract_fulfilment_checklist.py index 82e7ad35c9e..dfcbdfc9f96 100644 --- a/erpnext/crm/doctype/contract_fulfilment_checklist/test_contract_fulfilment_checklist.py +++ b/erpnext/crm/doctype/contract_fulfilment_checklist/test_contract_fulfilment_checklist.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/crm/doctype/contract_template/contract_template.py b/erpnext/crm/doctype/contract_template/contract_template.py index fc1845c372d..8adbb4e25e4 100644 --- a/erpnext/crm/doctype/contract_template/contract_template.py +++ b/erpnext/crm/doctype/contract_template/contract_template.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/crm/doctype/contract_template/test_contract_template.py b/erpnext/crm/doctype/contract_template/test_contract_template.py index 50655054c85..773d81e6584 100644 --- a/erpnext/crm/doctype/contract_template/test_contract_template.py +++ b/erpnext/crm/doctype/contract_template/test_contract_template.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/crm/doctype/contract_template_fulfilment_terms/contract_template_fulfilment_terms.py b/erpnext/crm/doctype/contract_template_fulfilment_terms/contract_template_fulfilment_terms.py index 28f844d0970..18600d9918a 100644 --- a/erpnext/crm/doctype/contract_template_fulfilment_terms/contract_template_fulfilment_terms.py +++ b/erpnext/crm/doctype/contract_template_fulfilment_terms/contract_template_fulfilment_terms.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/crm/doctype/email_campaign/email_campaign.py b/erpnext/crm/doctype/email_campaign/email_campaign.py index 4b74f25ead7..d44443237e8 100644 --- a/erpnext/crm/doctype/email_campaign/email_campaign.py +++ b/erpnext/crm/doctype/email_campaign/email_campaign.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/crm/doctype/email_campaign/test_email_campaign.py b/erpnext/crm/doctype/email_campaign/test_email_campaign.py index f68b8c6d290..997d903c578 100644 --- a/erpnext/crm/doctype/email_campaign/test_email_campaign.py +++ b/erpnext/crm/doctype/email_campaign/test_email_campaign.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/crm/doctype/lead/lead.py b/erpnext/crm/doctype/lead/lead.py index 5cf110ff27b..c590523a4f8 100644 --- a/erpnext/crm/doctype/lead/lead.py +++ b/erpnext/crm/doctype/lead/lead.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/crm/doctype/lead/lead_dashboard.py b/erpnext/crm/doctype/lead/lead_dashboard.py index 5edf2b62382..37e28e0e1ac 100644 --- a/erpnext/crm/doctype/lead/lead_dashboard.py +++ b/erpnext/crm/doctype/lead/lead_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/crm/doctype/lead/test_lead.py b/erpnext/crm/doctype/lead/test_lead.py index 833c43e0596..56bfc8f1457 100644 --- a/erpnext/crm/doctype/lead/test_lead.py +++ b/erpnext/crm/doctype/lead/test_lead.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/crm/doctype/lead_source/lead_source.py b/erpnext/crm/doctype/lead_source/lead_source.py index 8de1c4301b1..d9e00286513 100644 --- a/erpnext/crm/doctype/lead_source/lead_source.py +++ b/erpnext/crm/doctype/lead_source/lead_source.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/crm/doctype/lead_source/test_lead_source.py b/erpnext/crm/doctype/lead_source/test_lead_source.py index ecf61171e99..1363d1f4649 100644 --- a/erpnext/crm/doctype/lead_source/test_lead_source.py +++ b/erpnext/crm/doctype/lead_source/test_lead_source.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/crm/doctype/linkedin_settings/linkedin_settings.py b/erpnext/crm/doctype/linkedin_settings/linkedin_settings.py index 03c9d9c762c..8fd4978715f 100644 --- a/erpnext/crm/doctype/linkedin_settings/linkedin_settings.py +++ b/erpnext/crm/doctype/linkedin_settings/linkedin_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe import requests diff --git a/erpnext/crm/doctype/linkedin_settings/test_linkedin_settings.py b/erpnext/crm/doctype/linkedin_settings/test_linkedin_settings.py index 1d86f0c66fe..09732e405ee 100644 --- a/erpnext/crm/doctype/linkedin_settings/test_linkedin_settings.py +++ b/erpnext/crm/doctype/linkedin_settings/test_linkedin_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/crm/doctype/lost_reason_detail/lost_reason_detail.py b/erpnext/crm/doctype/lost_reason_detail/lost_reason_detail.py index 88abd423cfa..51e4d5c506c 100644 --- a/erpnext/crm/doctype/lost_reason_detail/lost_reason_detail.py +++ b/erpnext/crm/doctype/lost_reason_detail/lost_reason_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/crm/doctype/market_segment/market_segment.py b/erpnext/crm/doctype/market_segment/market_segment.py index 92adf56876c..766be857040 100644 --- a/erpnext/crm/doctype/market_segment/market_segment.py +++ b/erpnext/crm/doctype/market_segment/market_segment.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/crm/doctype/market_segment/test_market_segment.py b/erpnext/crm/doctype/market_segment/test_market_segment.py index b95cc4cde0d..20b73b15311 100644 --- a/erpnext/crm/doctype/market_segment/test_market_segment.py +++ b/erpnext/crm/doctype/market_segment/test_market_segment.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index 0e469ac6421..90eae8dcb94 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/crm/doctype/opportunity/opportunity_dashboard.py b/erpnext/crm/doctype/opportunity/opportunity_dashboard.py index 693a86cfcdf..5d42482c02c 100644 --- a/erpnext/crm/doctype/opportunity/opportunity_dashboard.py +++ b/erpnext/crm/doctype/opportunity/opportunity_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/crm/doctype/opportunity/test_opportunity.py b/erpnext/crm/doctype/opportunity/test_opportunity.py index 65d6cb308dd..6e6fed58cbe 100644 --- a/erpnext/crm/doctype/opportunity/test_opportunity.py +++ b/erpnext/crm/doctype/opportunity/test_opportunity.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/crm/doctype/opportunity_item/opportunity_item.py b/erpnext/crm/doctype/opportunity_item/opportunity_item.py index 225cfe9d324..4d285870ce5 100644 --- a/erpnext/crm/doctype/opportunity_item/opportunity_item.py +++ b/erpnext/crm/doctype/opportunity_item/opportunity_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/crm/doctype/opportunity_lost_reason/opportunity_lost_reason.py b/erpnext/crm/doctype/opportunity_lost_reason/opportunity_lost_reason.py index b25f02afffd..84a9a52b5b8 100644 --- a/erpnext/crm/doctype/opportunity_lost_reason/opportunity_lost_reason.py +++ b/erpnext/crm/doctype/opportunity_lost_reason/opportunity_lost_reason.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/crm/doctype/opportunity_lost_reason_detail/opportunity_lost_reason_detail.py b/erpnext/crm/doctype/opportunity_lost_reason_detail/opportunity_lost_reason_detail.py index 4bb5c54b1d9..d5721850d0c 100644 --- a/erpnext/crm/doctype/opportunity_lost_reason_detail/opportunity_lost_reason_detail.py +++ b/erpnext/crm/doctype/opportunity_lost_reason_detail/opportunity_lost_reason_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/crm/doctype/opportunity_type/opportunity_type.py b/erpnext/crm/doctype/opportunity_type/opportunity_type.py index 5b64e980965..1bb31ec859a 100644 --- a/erpnext/crm/doctype/opportunity_type/opportunity_type.py +++ b/erpnext/crm/doctype/opportunity_type/opportunity_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/crm/doctype/opportunity_type/test_opportunity_type.py b/erpnext/crm/doctype/opportunity_type/test_opportunity_type.py index f86a70e8cfa..ae0d7827cc7 100644 --- a/erpnext/crm/doctype/opportunity_type/test_opportunity_type.py +++ b/erpnext/crm/doctype/opportunity_type/test_opportunity_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/crm/doctype/sales_stage/sales_stage.py b/erpnext/crm/doctype/sales_stage/sales_stage.py index e9e176f0871..d2099edd052 100644 --- a/erpnext/crm/doctype/sales_stage/sales_stage.py +++ b/erpnext/crm/doctype/sales_stage/sales_stage.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/crm/doctype/sales_stage/test_sales_stage.py b/erpnext/crm/doctype/sales_stage/test_sales_stage.py index 83d1f269fd7..d088f968f52 100644 --- a/erpnext/crm/doctype/sales_stage/test_sales_stage.py +++ b/erpnext/crm/doctype/sales_stage/test_sales_stage.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/crm/doctype/social_media_post/social_media_post.py b/erpnext/crm/doctype/social_media_post/social_media_post.py index 14d4521e1e6..3f63c1dfaaa 100644 --- a/erpnext/crm/doctype/social_media_post/social_media_post.py +++ b/erpnext/crm/doctype/social_media_post/social_media_post.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import datetime diff --git a/erpnext/crm/doctype/social_media_post/test_social_media_post.py b/erpnext/crm/doctype/social_media_post/test_social_media_post.py index c2d041898aa..75744767dca 100644 --- a/erpnext/crm/doctype/social_media_post/test_social_media_post.py +++ b/erpnext/crm/doctype/social_media_post/test_social_media_post.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/crm/doctype/twitter_settings/test_twitter_settings.py b/erpnext/crm/doctype/twitter_settings/test_twitter_settings.py index ff3163c559b..9dbce8f8aba 100644 --- a/erpnext/crm/doctype/twitter_settings/test_twitter_settings.py +++ b/erpnext/crm/doctype/twitter_settings/test_twitter_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/crm/doctype/twitter_settings/twitter_settings.py b/erpnext/crm/doctype/twitter_settings/twitter_settings.py index 0205cca2b92..be7d9145c53 100644 --- a/erpnext/crm/doctype/twitter_settings/twitter_settings.py +++ b/erpnext/crm/doctype/twitter_settings/twitter_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/crm/report/campaign_efficiency/campaign_efficiency.py b/erpnext/crm/report/campaign_efficiency/campaign_efficiency.py index 87f516b8c72..6f3e311f392 100644 --- a/erpnext/crm/report/campaign_efficiency/campaign_efficiency.py +++ b/erpnext/crm/report/campaign_efficiency/campaign_efficiency.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/crm/report/first_response_time_for_opportunity/first_response_time_for_opportunity.py b/erpnext/crm/report/first_response_time_for_opportunity/first_response_time_for_opportunity.py index df57893ef49..ed6cefb2a32 100644 --- a/erpnext/crm/report/first_response_time_for_opportunity/first_response_time_for_opportunity.py +++ b/erpnext/crm/report/first_response_time_for_opportunity/first_response_time_for_opportunity.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/crm/report/lead_conversion_time/lead_conversion_time.py b/erpnext/crm/report/lead_conversion_time/lead_conversion_time.py index 71efdb96e75..1f43fa0c476 100644 --- a/erpnext/crm/report/lead_conversion_time/lead_conversion_time.py +++ b/erpnext/crm/report/lead_conversion_time/lead_conversion_time.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/crm/report/lead_details/lead_details.py b/erpnext/crm/report/lead_details/lead_details.py index 11e82764278..09eba7c38a6 100644 --- a/erpnext/crm/report/lead_details/lead_details.py +++ b/erpnext/crm/report/lead_details/lead_details.py @@ -1,7 +1,6 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.py b/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.py index 5406eba6d8e..29322119ee4 100644 --- a/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.py +++ b/erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/crm/report/lost_opportunity/lost_opportunity.py b/erpnext/crm/report/lost_opportunity/lost_opportunity.py index b308ceb272d..60d4be85648 100644 --- a/erpnext/crm/report/lost_opportunity/lost_opportunity.py +++ b/erpnext/crm/report/lost_opportunity/lost_opportunity.py @@ -1,7 +1,6 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/crm/report/prospects_engaged_but_not_converted/prospects_engaged_but_not_converted.py b/erpnext/crm/report/prospects_engaged_but_not_converted/prospects_engaged_but_not_converted.py index 4a16f3d5396..41cb4422a59 100644 --- a/erpnext/crm/report/prospects_engaged_but_not_converted/prospects_engaged_but_not_converted.py +++ b/erpnext/crm/report/prospects_engaged_but_not_converted/prospects_engaged_but_not_converted.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/demo/demo.py b/erpnext/demo/demo.py index bd744b2546c..e1bf8d0fdd9 100644 --- a/erpnext/demo/demo.py +++ b/erpnext/demo/demo.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import sys diff --git a/erpnext/demo/domains.py b/erpnext/demo/domains.py index 7f48b925701..89bd9ab34a9 100644 --- a/erpnext/demo/domains.py +++ b/erpnext/demo/domains.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals data = { 'Manufacturing': { diff --git a/erpnext/demo/setup/education.py b/erpnext/demo/setup/education.py index 304bc3d2c3c..eb833f4e0c0 100644 --- a/erpnext/demo/setup/education.py +++ b/erpnext/demo/setup/education.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json import random diff --git a/erpnext/demo/setup/manufacture.py b/erpnext/demo/setup/manufacture.py index 5db3519c2ce..ec6d2810b74 100644 --- a/erpnext/demo/setup/manufacture.py +++ b/erpnext/demo/setup/manufacture.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import json import random diff --git a/erpnext/demo/setup/retail.py b/erpnext/demo/setup/retail.py index d94d2d6763a..3d2c8b6e822 100644 --- a/erpnext/demo/setup/retail.py +++ b/erpnext/demo/setup/retail.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import json diff --git a/erpnext/demo/setup/setup_data.py b/erpnext/demo/setup/setup_data.py index af53043385b..1ce995a3a9b 100644 --- a/erpnext/demo/setup/setup_data.py +++ b/erpnext/demo/setup/setup_data.py @@ -1,4 +1,3 @@ -from __future__ import print_function, unicode_literals import json import random diff --git a/erpnext/demo/user/accounts.py b/erpnext/demo/user/accounts.py index 2a248244850..f0ac173a4a9 100644 --- a/erpnext/demo/user/accounts.py +++ b/erpnext/demo/user/accounts.py @@ -2,7 +2,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import random diff --git a/erpnext/demo/user/education.py b/erpnext/demo/user/education.py index adc0463a7ff..270333c1d2c 100644 --- a/erpnext/demo/user/education.py +++ b/erpnext/demo/user/education.py @@ -2,7 +2,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import random from datetime import timedelta diff --git a/erpnext/demo/user/fixed_asset.py b/erpnext/demo/user/fixed_asset.py index ec0e4c818ba..0e66ec04051 100644 --- a/erpnext/demo/user/fixed_asset.py +++ b/erpnext/demo/user/fixed_asset.py @@ -2,7 +2,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.utils.make_random import get_random diff --git a/erpnext/demo/user/hr.py b/erpnext/demo/user/hr.py index 17d5829f908..3d1a013956a 100644 --- a/erpnext/demo/user/hr.py +++ b/erpnext/demo/user/hr.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import datetime import random diff --git a/erpnext/demo/user/manufacturing.py b/erpnext/demo/user/manufacturing.py index 6e01f0f5a67..6b617761719 100644 --- a/erpnext/demo/user/manufacturing.py +++ b/erpnext/demo/user/manufacturing.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import random from datetime import timedelta diff --git a/erpnext/demo/user/projects.py b/erpnext/demo/user/projects.py index b6b99de532d..1203be44084 100644 --- a/erpnext/demo/user/projects.py +++ b/erpnext/demo/user/projects.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.utils import flt diff --git a/erpnext/demo/user/purchase.py b/erpnext/demo/user/purchase.py index ec32f973dae..61f081c26f9 100644 --- a/erpnext/demo/user/purchase.py +++ b/erpnext/demo/user/purchase.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json import random diff --git a/erpnext/demo/user/sales.py b/erpnext/demo/user/sales.py index 95494ee3242..ef6e4c42cd8 100644 --- a/erpnext/demo/user/sales.py +++ b/erpnext/demo/user/sales.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import random diff --git a/erpnext/demo/user/stock.py b/erpnext/demo/user/stock.py index 188fc13f24d..de379753b3d 100644 --- a/erpnext/demo/user/stock.py +++ b/erpnext/demo/user/stock.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import print_function, unicode_literals import random diff --git a/erpnext/domains/agriculture.py b/erpnext/domains/agriculture.py index 9212d2ea719..de27a7a2c24 100644 --- a/erpnext/domains/agriculture.py +++ b/erpnext/domains/agriculture.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals data = { 'desktop_icons': [ diff --git a/erpnext/domains/distribution.py b/erpnext/domains/distribution.py index 3661260f9b4..68ac0c3ec5e 100644 --- a/erpnext/domains/distribution.py +++ b/erpnext/domains/distribution.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals data = { 'desktop_icons': [ diff --git a/erpnext/domains/education.py b/erpnext/domains/education.py index 870624ab3b2..d0e597e7b7f 100644 --- a/erpnext/domains/education.py +++ b/erpnext/domains/education.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals data = { 'desktop_icons': [ diff --git a/erpnext/domains/hospitality.py b/erpnext/domains/hospitality.py index 2a2d0c60ef6..5d2a22597e3 100644 --- a/erpnext/domains/hospitality.py +++ b/erpnext/domains/hospitality.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals data = { 'desktop_icons': [ diff --git a/erpnext/domains/manufacturing.py b/erpnext/domains/manufacturing.py index b9ad49e772b..0cd51cf7926 100644 --- a/erpnext/domains/manufacturing.py +++ b/erpnext/domains/manufacturing.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals data = { 'desktop_icons': [ diff --git a/erpnext/domains/non_profit.py b/erpnext/domains/non_profit.py index 7c4f6b1f9de..22f05c9e7df 100644 --- a/erpnext/domains/non_profit.py +++ b/erpnext/domains/non_profit.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals data = { 'desktop_icons': [ diff --git a/erpnext/domains/retail.py b/erpnext/domains/retail.py index 73607615f33..17578d7ddcd 100644 --- a/erpnext/domains/retail.py +++ b/erpnext/domains/retail.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals data = { 'desktop_icons': [ diff --git a/erpnext/domains/services.py b/erpnext/domains/services.py index 89213720767..39a554f29df 100644 --- a/erpnext/domains/services.py +++ b/erpnext/domains/services.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals data = { 'desktop_icons': [ diff --git a/erpnext/education/__init__.py b/erpnext/education/__init__.py index a3164b25970..cf8efde7df3 100644 --- a/erpnext/education/__init__.py +++ b/erpnext/education/__init__.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/api.py b/erpnext/education/api.py index d2a8805c897..53d1482f951 100644 --- a/erpnext/education/api.py +++ b/erpnext/education/api.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/education/doctype/academic_term/academic_term.py b/erpnext/education/doctype/academic_term/academic_term.py index b8e22b68c62..93861ca78af 100644 --- a/erpnext/education/doctype/academic_term/academic_term.py +++ b/erpnext/education/doctype/academic_term/academic_term.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/academic_term/academic_term_dashboard.py b/erpnext/education/doctype/academic_term/academic_term_dashboard.py index a1087b8fc42..97f581a1e02 100644 --- a/erpnext/education/doctype/academic_term/academic_term_dashboard.py +++ b/erpnext/education/doctype/academic_term/academic_term_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/education/doctype/academic_term/test_academic_term.py b/erpnext/education/doctype/academic_term/test_academic_term.py index 6329103870f..0e39fb03d47 100644 --- a/erpnext/education/doctype/academic_term/test_academic_term.py +++ b/erpnext/education/doctype/academic_term/test_academic_term.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/academic_year/academic_year.py b/erpnext/education/doctype/academic_year/academic_year.py index 77b67d8a5d7..e2010fb1b05 100644 --- a/erpnext/education/doctype/academic_year/academic_year.py +++ b/erpnext/education/doctype/academic_year/academic_year.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/academic_year/academic_year_dashboard.py b/erpnext/education/doctype/academic_year/academic_year_dashboard.py index 49d68c3af28..3615fd1c374 100644 --- a/erpnext/education/doctype/academic_year/academic_year_dashboard.py +++ b/erpnext/education/doctype/academic_year/academic_year_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/education/doctype/academic_year/test_academic_year.py b/erpnext/education/doctype/academic_year/test_academic_year.py index 31135c40f38..6d33fe6d7d5 100644 --- a/erpnext/education/doctype/academic_year/test_academic_year.py +++ b/erpnext/education/doctype/academic_year/test_academic_year.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/article/article.py b/erpnext/education/doctype/article/article.py index f3c77880fc1..8f1a2e33b34 100644 --- a/erpnext/education/doctype/article/article.py +++ b/erpnext/education/doctype/article/article.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/education/doctype/article/test_article.py b/erpnext/education/doctype/article/test_article.py index cda79ad4579..2ea5c82a8b7 100644 --- a/erpnext/education/doctype/article/test_article.py +++ b/erpnext/education/doctype/article/test_article.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/assessment_criteria/assessment_criteria.py b/erpnext/education/doctype/assessment_criteria/assessment_criteria.py index f8f04bf5135..58448ea9418 100644 --- a/erpnext/education/doctype/assessment_criteria/assessment_criteria.py +++ b/erpnext/education/doctype/assessment_criteria/assessment_criteria.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/assessment_criteria/test_assessment_criteria.py b/erpnext/education/doctype/assessment_criteria/test_assessment_criteria.py index 1098d0369fb..40ba0e7816a 100644 --- a/erpnext/education/doctype/assessment_criteria/test_assessment_criteria.py +++ b/erpnext/education/doctype/assessment_criteria/test_assessment_criteria.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/assessment_criteria_group/assessment_criteria_group.py b/erpnext/education/doctype/assessment_criteria_group/assessment_criteria_group.py index e62c0305520..d284db595c1 100644 --- a/erpnext/education/doctype/assessment_criteria_group/assessment_criteria_group.py +++ b/erpnext/education/doctype/assessment_criteria_group/assessment_criteria_group.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/assessment_criteria_group/test_assessment_criteria_group.py b/erpnext/education/doctype/assessment_criteria_group/test_assessment_criteria_group.py index d65f1e78d1d..ccf82bad04a 100644 --- a/erpnext/education/doctype/assessment_criteria_group/test_assessment_criteria_group.py +++ b/erpnext/education/doctype/assessment_criteria_group/test_assessment_criteria_group.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/assessment_group/assessment_group.py b/erpnext/education/doctype/assessment_group/assessment_group.py index 3425109331f..d606ffb41a2 100644 --- a/erpnext/education/doctype/assessment_group/assessment_group.py +++ b/erpnext/education/doctype/assessment_group/assessment_group.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/assessment_group/assessment_group_dashboard.py b/erpnext/education/doctype/assessment_group/assessment_group_dashboard.py index 83438c0ed74..956809179bc 100644 --- a/erpnext/education/doctype/assessment_group/assessment_group_dashboard.py +++ b/erpnext/education/doctype/assessment_group/assessment_group_dashboard.py @@ -1,6 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/education/doctype/assessment_group/test_assessment_group.py b/erpnext/education/doctype/assessment_group/test_assessment_group.py index 822d65c9bb7..6e840aa2510 100644 --- a/erpnext/education/doctype/assessment_group/test_assessment_group.py +++ b/erpnext/education/doctype/assessment_group/test_assessment_group.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/assessment_plan/assessment_plan.py b/erpnext/education/doctype/assessment_plan/assessment_plan.py index 2a58a313cdd..82a28de1cb9 100644 --- a/erpnext/education/doctype/assessment_plan/assessment_plan.py +++ b/erpnext/education/doctype/assessment_plan/assessment_plan.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/assessment_plan/assessment_plan_dashboard.py b/erpnext/education/doctype/assessment_plan/assessment_plan_dashboard.py index 672953852ed..31b9509f191 100644 --- a/erpnext/education/doctype/assessment_plan/assessment_plan_dashboard.py +++ b/erpnext/education/doctype/assessment_plan/assessment_plan_dashboard.py @@ -1,6 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/education/doctype/assessment_plan/test_assessment_plan.py b/erpnext/education/doctype/assessment_plan/test_assessment_plan.py index 9a6b8860358..9f55a78667b 100644 --- a/erpnext/education/doctype/assessment_plan/test_assessment_plan.py +++ b/erpnext/education/doctype/assessment_plan/test_assessment_plan.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/assessment_plan_criteria/assessment_plan_criteria.py b/erpnext/education/doctype/assessment_plan_criteria/assessment_plan_criteria.py index 795462d6308..2cd17d6b950 100644 --- a/erpnext/education/doctype/assessment_plan_criteria/assessment_plan_criteria.py +++ b/erpnext/education/doctype/assessment_plan_criteria/assessment_plan_criteria.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/assessment_result/assessment_result.py b/erpnext/education/doctype/assessment_result/assessment_result.py index 01f483f8b0b..8278b9eebab 100644 --- a/erpnext/education/doctype/assessment_result/assessment_result.py +++ b/erpnext/education/doctype/assessment_result/assessment_result.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/assessment_result/assessment_result_dashboard.py b/erpnext/education/doctype/assessment_result/assessment_result_dashboard.py index f9e2008ebc7..3b07417b88d 100644 --- a/erpnext/education/doctype/assessment_result/assessment_result_dashboard.py +++ b/erpnext/education/doctype/assessment_result/assessment_result_dashboard.py @@ -1,6 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/education/doctype/assessment_result/test_assessment_result.py b/erpnext/education/doctype/assessment_result/test_assessment_result.py index fa0ad1f692c..c0872dfb06d 100644 --- a/erpnext/education/doctype/assessment_result/test_assessment_result.py +++ b/erpnext/education/doctype/assessment_result/test_assessment_result.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/assessment_result_detail/assessment_result_detail.py b/erpnext/education/doctype/assessment_result_detail/assessment_result_detail.py index 234dff044f5..5ef11297eb2 100644 --- a/erpnext/education/doctype/assessment_result_detail/assessment_result_detail.py +++ b/erpnext/education/doctype/assessment_result_detail/assessment_result_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.py b/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.py index 83b4f5634e9..4b953bec15f 100644 --- a/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.py +++ b/erpnext/education/doctype/assessment_result_tool/assessment_result_tool.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/assessment_result_tool/test_assessment_result_tool.py b/erpnext/education/doctype/assessment_result_tool/test_assessment_result_tool.py index bcc57220e78..49e0be08f0a 100644 --- a/erpnext/education/doctype/assessment_result_tool/test_assessment_result_tool.py +++ b/erpnext/education/doctype/assessment_result_tool/test_assessment_result_tool.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/content_activity/content_activity.py b/erpnext/education/doctype/content_activity/content_activity.py index 076e2d37c00..f30cb87a9e6 100644 --- a/erpnext/education/doctype/content_activity/content_activity.py +++ b/erpnext/education/doctype/content_activity/content_activity.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/content_question/content_question.py b/erpnext/education/doctype/content_question/content_question.py index 9c2491697de..f52f0c85d38 100644 --- a/erpnext/education/doctype/content_question/content_question.py +++ b/erpnext/education/doctype/content_question/content_question.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/content_question/test_content_question.py b/erpnext/education/doctype/content_question/test_content_question.py index f6bd49bb802..63a5a96700c 100644 --- a/erpnext/education/doctype/content_question/test_content_question.py +++ b/erpnext/education/doctype/content_question/test_content_question.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/course/course.py b/erpnext/education/doctype/course/course.py index 9cc373a5fe2..2d4f28226a6 100644 --- a/erpnext/education/doctype/course/course.py +++ b/erpnext/education/doctype/course/course.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/education/doctype/course/course_dashboard.py b/erpnext/education/doctype/course/course_dashboard.py index 8eca2a13509..276830f38ae 100644 --- a/erpnext/education/doctype/course/course_dashboard.py +++ b/erpnext/education/doctype/course/course_dashboard.py @@ -1,6 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/education/doctype/course/test_course.py b/erpnext/education/doctype/course/test_course.py index dd43ef447c2..6381cdb11b2 100644 --- a/erpnext/education/doctype/course/test_course.py +++ b/erpnext/education/doctype/course/test_course.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/course_activity/course_activity.py b/erpnext/education/doctype/course_activity/course_activity.py index 61b51a05a16..c1d82427dd5 100644 --- a/erpnext/education/doctype/course_activity/course_activity.py +++ b/erpnext/education/doctype/course_activity/course_activity.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/course_activity/test_course_activity.py b/erpnext/education/doctype/course_activity/test_course_activity.py index 778cefecab1..9514ff1bda9 100644 --- a/erpnext/education/doctype/course_activity/test_course_activity.py +++ b/erpnext/education/doctype/course_activity/test_course_activity.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/course_assessment_criteria/course_assessment_criteria.py b/erpnext/education/doctype/course_assessment_criteria/course_assessment_criteria.py index df384c53143..4223741f030 100644 --- a/erpnext/education/doctype/course_assessment_criteria/course_assessment_criteria.py +++ b/erpnext/education/doctype/course_assessment_criteria/course_assessment_criteria.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/course_content/course_content.py b/erpnext/education/doctype/course_content/course_content.py index 1dd08adbb01..abc370ecbef 100644 --- a/erpnext/education/doctype/course_content/course_content.py +++ b/erpnext/education/doctype/course_content/course_content.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/course_content/test_course_content.py b/erpnext/education/doctype/course_content/test_course_content.py index 320fa111f7e..49f042e8650 100644 --- a/erpnext/education/doctype/course_content/test_course_content.py +++ b/erpnext/education/doctype/course_content/test_course_content.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/course_enrollment/course_enrollment.py b/erpnext/education/doctype/course_enrollment/course_enrollment.py index 21e74516f89..79212847533 100644 --- a/erpnext/education/doctype/course_enrollment/course_enrollment.py +++ b/erpnext/education/doctype/course_enrollment/course_enrollment.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from functools import reduce diff --git a/erpnext/education/doctype/course_enrollment/course_enrollment_dashboard.py b/erpnext/education/doctype/course_enrollment/course_enrollment_dashboard.py index 253325c586e..14a7a8fde12 100644 --- a/erpnext/education/doctype/course_enrollment/course_enrollment_dashboard.py +++ b/erpnext/education/doctype/course_enrollment/course_enrollment_dashboard.py @@ -1,6 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/education/doctype/course_enrollment/test_course_enrollment.py b/erpnext/education/doctype/course_enrollment/test_course_enrollment.py index e5feb1b7f7c..e74d510e521 100644 --- a/erpnext/education/doctype/course_enrollment/test_course_enrollment.py +++ b/erpnext/education/doctype/course_enrollment/test_course_enrollment.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/course_schedule/course_schedule.py b/erpnext/education/doctype/course_schedule/course_schedule.py index 38379e4c778..335b6d28d0c 100644 --- a/erpnext/education/doctype/course_schedule/course_schedule.py +++ b/erpnext/education/doctype/course_schedule/course_schedule.py @@ -2,7 +2,6 @@ # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/course_schedule/course_schedule_dashboard.py b/erpnext/education/doctype/course_schedule/course_schedule_dashboard.py index 12a1735f4ea..256e40b3b18 100644 --- a/erpnext/education/doctype/course_schedule/course_schedule_dashboard.py +++ b/erpnext/education/doctype/course_schedule/course_schedule_dashboard.py @@ -1,6 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/education/doctype/course_schedule/test_course_schedule.py b/erpnext/education/doctype/course_schedule/test_course_schedule.py index 1b45ceda484..a7324195557 100644 --- a/erpnext/education/doctype/course_schedule/test_course_schedule.py +++ b/erpnext/education/doctype/course_schedule/test_course_schedule.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt -from __future__ import unicode_literals import datetime import unittest diff --git a/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.py b/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.py index 4f7ed368211..a309e4694c8 100644 --- a/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.py +++ b/erpnext/education/doctype/course_scheduling_tool/course_scheduling_tool.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import calendar diff --git a/erpnext/education/doctype/course_scheduling_tool/test_course_scheduling_tool.py b/erpnext/education/doctype/course_scheduling_tool/test_course_scheduling_tool.py index 27379b70e1c..559214bc92d 100644 --- a/erpnext/education/doctype/course_scheduling_tool/test_course_scheduling_tool.py +++ b/erpnext/education/doctype/course_scheduling_tool/test_course_scheduling_tool.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/course_topic/course_topic.py b/erpnext/education/doctype/course_topic/course_topic.py index 11eb457b7c3..3c1cabf7953 100644 --- a/erpnext/education/doctype/course_topic/course_topic.py +++ b/erpnext/education/doctype/course_topic/course_topic.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/course_topic/test_course_topic.py b/erpnext/education/doctype/course_topic/test_course_topic.py index 0bba7f54788..a4d370c83d7 100644 --- a/erpnext/education/doctype/course_topic/test_course_topic.py +++ b/erpnext/education/doctype/course_topic/test_course_topic.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/education_settings/education_settings.py b/erpnext/education/doctype/education_settings/education_settings.py index 71d13f733bd..13123be78a3 100644 --- a/erpnext/education/doctype/education_settings/education_settings.py +++ b/erpnext/education/doctype/education_settings/education_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe import frappe.defaults diff --git a/erpnext/education/doctype/education_settings/test_education_settings.py b/erpnext/education/doctype/education_settings/test_education_settings.py index 3611cbef21a..223e8386b39 100644 --- a/erpnext/education/doctype/education_settings/test_education_settings.py +++ b/erpnext/education/doctype/education_settings/test_education_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/fee_category/fee_category.py b/erpnext/education/doctype/fee_category/fee_category.py index f531f8af6ee..1faa0c5e959 100644 --- a/erpnext/education/doctype/fee_category/fee_category.py +++ b/erpnext/education/doctype/fee_category/fee_category.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/fee_category/test_fee_category.py b/erpnext/education/doctype/fee_category/test_fee_category.py index 875568416f5..9e74c7de11e 100644 --- a/erpnext/education/doctype/fee_category/test_fee_category.py +++ b/erpnext/education/doctype/fee_category/test_fee_category.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/fee_component/fee_component.py b/erpnext/education/doctype/fee_component/fee_component.py index dba39af5948..c5cf7d9331e 100644 --- a/erpnext/education/doctype/fee_component/fee_component.py +++ b/erpnext/education/doctype/fee_component/fee_component.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/fee_schedule/fee_schedule.py b/erpnext/education/doctype/fee_schedule/fee_schedule.py index 6bf46671790..a122fe88564 100644 --- a/erpnext/education/doctype/fee_schedule/fee_schedule.py +++ b/erpnext/education/doctype/fee_schedule/fee_schedule.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/fee_schedule/fee_schedule_dashboard.py b/erpnext/education/doctype/fee_schedule/fee_schedule_dashboard.py index 34f870578fd..f5d1dee98b4 100644 --- a/erpnext/education/doctype/fee_schedule/fee_schedule_dashboard.py +++ b/erpnext/education/doctype/fee_schedule/fee_schedule_dashboard.py @@ -1,6 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/education/doctype/fee_schedule/test_fee_schedule.py b/erpnext/education/doctype/fee_schedule/test_fee_schedule.py index 86b74de3421..c291aed3106 100644 --- a/erpnext/education/doctype/fee_schedule/test_fee_schedule.py +++ b/erpnext/education/doctype/fee_schedule/test_fee_schedule.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/fee_schedule_program/fee_schedule_program.py b/erpnext/education/doctype/fee_schedule_program/fee_schedule_program.py index 5e9ed61ba82..ad7af3a3ab6 100644 --- a/erpnext/education/doctype/fee_schedule_program/fee_schedule_program.py +++ b/erpnext/education/doctype/fee_schedule_program/fee_schedule_program.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/fee_schedule_student_group/fee_schedule_student_group.py b/erpnext/education/doctype/fee_schedule_student_group/fee_schedule_student_group.py index ba30a91516f..24e54041778 100644 --- a/erpnext/education/doctype/fee_schedule_student_group/fee_schedule_student_group.py +++ b/erpnext/education/doctype/fee_schedule_student_group/fee_schedule_student_group.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/fee_structure/fee_structure.py b/erpnext/education/doctype/fee_structure/fee_structure.py index a6cc7019215..9090a6b9d54 100644 --- a/erpnext/education/doctype/fee_structure/fee_structure.py +++ b/erpnext/education/doctype/fee_structure/fee_structure.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/education/doctype/fee_structure/fee_structure_dashboard.py b/erpnext/education/doctype/fee_structure/fee_structure_dashboard.py index c053b4ea4ba..27ce06b29b3 100644 --- a/erpnext/education/doctype/fee_structure/fee_structure_dashboard.py +++ b/erpnext/education/doctype/fee_structure/fee_structure_dashboard.py @@ -1,6 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/education/doctype/fee_structure/test_fee_structure.py b/erpnext/education/doctype/fee_structure/test_fee_structure.py index 1311f13997e..61381a6289c 100644 --- a/erpnext/education/doctype/fee_structure/test_fee_structure.py +++ b/erpnext/education/doctype/fee_structure/test_fee_structure.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/fees/fees.py b/erpnext/education/doctype/fees/fees.py index a5dc0dca31c..41d428d23de 100644 --- a/erpnext/education/doctype/fees/fees.py +++ b/erpnext/education/doctype/fees/fees.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/fees/test_fees.py b/erpnext/education/doctype/fees/test_fees.py index fbf7a571fe8..72f1d113962 100644 --- a/erpnext/education/doctype/fees/test_fees.py +++ b/erpnext/education/doctype/fees/test_fees.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/grading_scale/grading_scale.py b/erpnext/education/doctype/grading_scale/grading_scale.py index ed75f31d841..c4bd1589b26 100644 --- a/erpnext/education/doctype/grading_scale/grading_scale.py +++ b/erpnext/education/doctype/grading_scale/grading_scale.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/grading_scale/grading_scale_dashboard.py b/erpnext/education/doctype/grading_scale/grading_scale_dashboard.py index 268871a04e8..44313f2bbca 100644 --- a/erpnext/education/doctype/grading_scale/grading_scale_dashboard.py +++ b/erpnext/education/doctype/grading_scale/grading_scale_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/education/doctype/grading_scale/test_grading_scale.py b/erpnext/education/doctype/grading_scale/test_grading_scale.py index e5d83c20c12..3ebefda22fc 100644 --- a/erpnext/education/doctype/grading_scale/test_grading_scale.py +++ b/erpnext/education/doctype/grading_scale/test_grading_scale.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/grading_scale_interval/grading_scale_interval.py b/erpnext/education/doctype/grading_scale_interval/grading_scale_interval.py index 6e55aac40ba..b4101bdcc28 100644 --- a/erpnext/education/doctype/grading_scale_interval/grading_scale_interval.py +++ b/erpnext/education/doctype/grading_scale_interval/grading_scale_interval.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/guardian/guardian.py b/erpnext/education/doctype/guardian/guardian.py index f79e1310345..aae651b8550 100644 --- a/erpnext/education/doctype/guardian/guardian.py +++ b/erpnext/education/doctype/guardian/guardian.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/guardian/test_guardian.py b/erpnext/education/doctype/guardian/test_guardian.py index 446e2612215..f474ed5e06e 100644 --- a/erpnext/education/doctype/guardian/test_guardian.py +++ b/erpnext/education/doctype/guardian/test_guardian.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/guardian_interest/guardian_interest.py b/erpnext/education/doctype/guardian_interest/guardian_interest.py index 4a3040f0600..6cd1e55d831 100644 --- a/erpnext/education/doctype/guardian_interest/guardian_interest.py +++ b/erpnext/education/doctype/guardian_interest/guardian_interest.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/guardian_student/guardian_student.py b/erpnext/education/doctype/guardian_student/guardian_student.py index 62867d89089..4c29575bee1 100644 --- a/erpnext/education/doctype/guardian_student/guardian_student.py +++ b/erpnext/education/doctype/guardian_student/guardian_student.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/instructor/instructor.py b/erpnext/education/doctype/instructor/instructor.py index 92fb8b04b90..0076240f86f 100644 --- a/erpnext/education/doctype/instructor/instructor.py +++ b/erpnext/education/doctype/instructor/instructor.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/instructor/instructor_dashboard.py b/erpnext/education/doctype/instructor/instructor_dashboard.py index bb08a54903c..eae67acabfd 100644 --- a/erpnext/education/doctype/instructor/instructor_dashboard.py +++ b/erpnext/education/doctype/instructor/instructor_dashboard.py @@ -1,6 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/education/doctype/instructor/test_instructor.py b/erpnext/education/doctype/instructor/test_instructor.py index b698a20e111..4eab37ae01f 100644 --- a/erpnext/education/doctype/instructor/test_instructor.py +++ b/erpnext/education/doctype/instructor/test_instructor.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/instructor_log/instructor_log.py b/erpnext/education/doctype/instructor_log/instructor_log.py index 68ab7a639e9..12d11ba005e 100644 --- a/erpnext/education/doctype/instructor_log/instructor_log.py +++ b/erpnext/education/doctype/instructor_log/instructor_log.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/options/options.py b/erpnext/education/doctype/options/options.py index a064384129b..968a7729009 100644 --- a/erpnext/education/doctype/options/options.py +++ b/erpnext/education/doctype/options/options.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/program/program.py b/erpnext/education/doctype/program/program.py index 7de34cf30fb..a9ce64409ab 100644 --- a/erpnext/education/doctype/program/program.py +++ b/erpnext/education/doctype/program/program.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/education/doctype/program/test_program.py b/erpnext/education/doctype/program/test_program.py index 3222aa6004b..cb8926bcf7e 100644 --- a/erpnext/education/doctype/program/test_program.py +++ b/erpnext/education/doctype/program/test_program.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/program_course/program_course.py b/erpnext/education/doctype/program_course/program_course.py index d5236a109a4..dec392c42cc 100644 --- a/erpnext/education/doctype/program_course/program_course.py +++ b/erpnext/education/doctype/program_course/program_course.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/program_enrollment/program_enrollment.py b/erpnext/education/doctype/program_enrollment/program_enrollment.py index 79c5a14d8c8..a23d49267e6 100644 --- a/erpnext/education/doctype/program_enrollment/program_enrollment.py +++ b/erpnext/education/doctype/program_enrollment/program_enrollment.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/education/doctype/program_enrollment/program_enrollment_dashboard.py b/erpnext/education/doctype/program_enrollment/program_enrollment_dashboard.py index f829276dac9..81bb30b1da5 100644 --- a/erpnext/education/doctype/program_enrollment/program_enrollment_dashboard.py +++ b/erpnext/education/doctype/program_enrollment/program_enrollment_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/education/doctype/program_enrollment/test_program_enrollment.py b/erpnext/education/doctype/program_enrollment/test_program_enrollment.py index 65de38af2dd..dda2465eafd 100644 --- a/erpnext/education/doctype/program_enrollment/test_program_enrollment.py +++ b/erpnext/education/doctype/program_enrollment/test_program_enrollment.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/program_enrollment_course/program_enrollment_course.py b/erpnext/education/doctype/program_enrollment_course/program_enrollment_course.py index 5c0706dbce1..8b2d82c5ee4 100644 --- a/erpnext/education/doctype/program_enrollment_course/program_enrollment_course.py +++ b/erpnext/education/doctype/program_enrollment_course/program_enrollment_course.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/program_enrollment_fee/program_enrollment_fee.py b/erpnext/education/doctype/program_enrollment_fee/program_enrollment_fee.py index 53bae7c1504..17d410f7b28 100644 --- a/erpnext/education/doctype/program_enrollment_fee/program_enrollment_fee.py +++ b/erpnext/education/doctype/program_enrollment_fee/program_enrollment_fee.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/program_enrollment_tool/program_enrollment_tool.py b/erpnext/education/doctype/program_enrollment_tool/program_enrollment_tool.py index 69fa66558d3..7ffa077534a 100644 --- a/erpnext/education/doctype/program_enrollment_tool/program_enrollment_tool.py +++ b/erpnext/education/doctype/program_enrollment_tool/program_enrollment_tool.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/program_enrollment_tool/test_program_enrollment_tool.py b/erpnext/education/doctype/program_enrollment_tool/test_program_enrollment_tool.py index 55734cbc94b..e806792eecd 100644 --- a/erpnext/education/doctype/program_enrollment_tool/test_program_enrollment_tool.py +++ b/erpnext/education/doctype/program_enrollment_tool/test_program_enrollment_tool.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/program_enrollment_tool_student/program_enrollment_tool_student.py b/erpnext/education/doctype/program_enrollment_tool_student/program_enrollment_tool_student.py index 67653458f5f..b37e5d343eb 100644 --- a/erpnext/education/doctype/program_enrollment_tool_student/program_enrollment_tool_student.py +++ b/erpnext/education/doctype/program_enrollment_tool_student/program_enrollment_tool_student.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/program_fee/program_fee.py b/erpnext/education/doctype/program_fee/program_fee.py index 70105ee6be9..e9a0be102cd 100644 --- a/erpnext/education/doctype/program_fee/program_fee.py +++ b/erpnext/education/doctype/program_fee/program_fee.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/question/question.py b/erpnext/education/doctype/question/question.py index e74aa93ad8e..aa6cf9f38d0 100644 --- a/erpnext/education/doctype/question/question.py +++ b/erpnext/education/doctype/question/question.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/question/test_question.py b/erpnext/education/doctype/question/test_question.py index 1ce10c0cb83..7506d84a098 100644 --- a/erpnext/education/doctype/question/test_question.py +++ b/erpnext/education/doctype/question/test_question.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/quiz/quiz.py b/erpnext/education/doctype/quiz/quiz.py index 474bea111b9..9ad7252db62 100644 --- a/erpnext/education/doctype/quiz/quiz.py +++ b/erpnext/education/doctype/quiz/quiz.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/quiz/test_quiz.py b/erpnext/education/doctype/quiz/test_quiz.py index 22eb23d4fda..a69a0c1d580 100644 --- a/erpnext/education/doctype/quiz/test_quiz.py +++ b/erpnext/education/doctype/quiz/test_quiz.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/quiz_activity/quiz_activity.py b/erpnext/education/doctype/quiz_activity/quiz_activity.py index 0fc76032283..a67f82fe07e 100644 --- a/erpnext/education/doctype/quiz_activity/quiz_activity.py +++ b/erpnext/education/doctype/quiz_activity/quiz_activity.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/quiz_activity/test_quiz_activity.py b/erpnext/education/doctype/quiz_activity/test_quiz_activity.py index 44e3a3f92ba..1040c1a869c 100644 --- a/erpnext/education/doctype/quiz_activity/test_quiz_activity.py +++ b/erpnext/education/doctype/quiz_activity/test_quiz_activity.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/quiz_question/quiz_question.py b/erpnext/education/doctype/quiz_question/quiz_question.py index 20cb9f7b38c..91641ebb301 100644 --- a/erpnext/education/doctype/quiz_question/quiz_question.py +++ b/erpnext/education/doctype/quiz_question/quiz_question.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/quiz_result/quiz_result.py b/erpnext/education/doctype/quiz_result/quiz_result.py index 059d294cff6..615281bad21 100644 --- a/erpnext/education/doctype/quiz_result/quiz_result.py +++ b/erpnext/education/doctype/quiz_result/quiz_result.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/quiz_result/test_quiz_result.py b/erpnext/education/doctype/quiz_result/test_quiz_result.py index 08ac4811bca..12098a77ffc 100644 --- a/erpnext/education/doctype/quiz_result/test_quiz_result.py +++ b/erpnext/education/doctype/quiz_result/test_quiz_result.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/room/room.py b/erpnext/education/doctype/room/room.py index dc68a0dd0cf..a2a89805a8c 100644 --- a/erpnext/education/doctype/room/room.py +++ b/erpnext/education/doctype/room/room.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/room/room_dashboard.py b/erpnext/education/doctype/room/room_dashboard.py index 6a43b6037f8..b710722f55d 100644 --- a/erpnext/education/doctype/room/room_dashboard.py +++ b/erpnext/education/doctype/room/room_dashboard.py @@ -1,6 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/education/doctype/room/test_room.py b/erpnext/education/doctype/room/test_room.py index 5718d51d658..68c97c7a008 100644 --- a/erpnext/education/doctype/room/test_room.py +++ b/erpnext/education/doctype/room/test_room.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/school_house/school_house.py b/erpnext/education/doctype/school_house/school_house.py index 2f9c5f46a80..52e05087585 100644 --- a/erpnext/education/doctype/school_house/school_house.py +++ b/erpnext/education/doctype/school_house/school_house.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/school_house/test_school_house.py b/erpnext/education/doctype/school_house/test_school_house.py index b58b7d49ce1..7fe12d74366 100644 --- a/erpnext/education/doctype/school_house/test_school_house.py +++ b/erpnext/education/doctype/school_house/test_school_house.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/student/student.py b/erpnext/education/doctype/student/student.py index be4ee560a51..44a327777bf 100644 --- a/erpnext/education/doctype/student/student.py +++ b/erpnext/education/doctype/student/student.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/student/student_dashboard.py b/erpnext/education/doctype/student/student_dashboard.py index efff2e64907..efd5dc9104a 100644 --- a/erpnext/education/doctype/student/student_dashboard.py +++ b/erpnext/education/doctype/student/student_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/education/doctype/student/test_student.py b/erpnext/education/doctype/student/test_student.py index ec6abb56efb..0a85708152c 100644 --- a/erpnext/education/doctype/student/test_student.py +++ b/erpnext/education/doctype/student/test_student.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/student_admission/student_admission.py b/erpnext/education/doctype/student_admission/student_admission.py index 67ef67b4aa2..b1fd780d8cc 100644 --- a/erpnext/education/doctype/student_admission/student_admission.py +++ b/erpnext/education/doctype/student_admission/student_admission.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/student_admission/test_student_admission.py b/erpnext/education/doctype/student_admission/test_student_admission.py index c9cfbca14a7..03867e2ce0e 100644 --- a/erpnext/education/doctype/student_admission/test_student_admission.py +++ b/erpnext/education/doctype/student_admission/test_student_admission.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/student_admission_program/student_admission_program.py b/erpnext/education/doctype/student_admission_program/student_admission_program.py index 2377d2648da..eba22391480 100644 --- a/erpnext/education/doctype/student_admission_program/student_admission_program.py +++ b/erpnext/education/doctype/student_admission_program/student_admission_program.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/student_applicant/student_applicant.py b/erpnext/education/doctype/student_applicant/student_applicant.py index 36a0757531b..62407bef028 100644 --- a/erpnext/education/doctype/student_applicant/student_applicant.py +++ b/erpnext/education/doctype/student_applicant/student_applicant.py @@ -2,7 +2,6 @@ # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import print_function, unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/student_applicant/test_student_applicant.py b/erpnext/education/doctype/student_applicant/test_student_applicant.py index b7258a4ae1d..ba2e9c18863 100644 --- a/erpnext/education/doctype/student_applicant/test_student_applicant.py +++ b/erpnext/education/doctype/student_applicant/test_student_applicant.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/student_attendance/student_attendance.py b/erpnext/education/doctype/student_attendance/student_attendance.py index 3826afb0492..db0fd3719da 100644 --- a/erpnext/education/doctype/student_attendance/student_attendance.py +++ b/erpnext/education/doctype/student_attendance/student_attendance.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/student_attendance/student_attendance_dashboard.py b/erpnext/education/doctype/student_attendance/student_attendance_dashboard.py index 489f64d6804..97547992043 100644 --- a/erpnext/education/doctype/student_attendance/student_attendance_dashboard.py +++ b/erpnext/education/doctype/student_attendance/student_attendance_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/education/doctype/student_attendance/test_student_attendance.py b/erpnext/education/doctype/student_attendance/test_student_attendance.py index d453aeda1c6..6a43e30a33c 100644 --- a/erpnext/education/doctype/student_attendance/test_student_attendance.py +++ b/erpnext/education/doctype/student_attendance/test_student_attendance.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/student_attendance_tool/student_attendance_tool.py b/erpnext/education/doctype/student_attendance_tool/student_attendance_tool.py index 96767deb6d2..4e3f98d6558 100644 --- a/erpnext/education/doctype/student_attendance_tool/student_attendance_tool.py +++ b/erpnext/education/doctype/student_attendance_tool/student_attendance_tool.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/education/doctype/student_attendance_tool/test_student_attendance_tool.py b/erpnext/education/doctype/student_attendance_tool/test_student_attendance_tool.py index a94a3f235df..c15036fe031 100644 --- a/erpnext/education/doctype/student_attendance_tool/test_student_attendance_tool.py +++ b/erpnext/education/doctype/student_attendance_tool/test_student_attendance_tool.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/student_batch_name/student_batch_name.py b/erpnext/education/doctype/student_batch_name/student_batch_name.py index ce507160e05..ae59291dcf7 100644 --- a/erpnext/education/doctype/student_batch_name/student_batch_name.py +++ b/erpnext/education/doctype/student_batch_name/student_batch_name.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/student_batch_name/test_student_batch_name.py b/erpnext/education/doctype/student_batch_name/test_student_batch_name.py index 75ebeb29b80..ad9b545e744 100644 --- a/erpnext/education/doctype/student_batch_name/test_student_batch_name.py +++ b/erpnext/education/doctype/student_batch_name/test_student_batch_name.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/student_category/student_category.py b/erpnext/education/doctype/student_category/student_category.py index bb362d5834a..0d7185967ed 100644 --- a/erpnext/education/doctype/student_category/student_category.py +++ b/erpnext/education/doctype/student_category/student_category.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/student_category/student_category_dashboard.py b/erpnext/education/doctype/student_category/student_category_dashboard.py index 92386237883..be1e0054915 100644 --- a/erpnext/education/doctype/student_category/student_category_dashboard.py +++ b/erpnext/education/doctype/student_category/student_category_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/education/doctype/student_category/test_student_category.py b/erpnext/education/doctype/student_category/test_student_category.py index 0893769045e..76469fff250 100644 --- a/erpnext/education/doctype/student_category/test_student_category.py +++ b/erpnext/education/doctype/student_category/test_student_category.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/student_group/student_group.py b/erpnext/education/doctype/student_group/student_group.py index 2347d317317..ceae036e3ed 100644 --- a/erpnext/education/doctype/student_group/student_group.py +++ b/erpnext/education/doctype/student_group/student_group.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/student_group/student_group_dashboard.py b/erpnext/education/doctype/student_group/student_group_dashboard.py index 36329bd8d85..d5b930237f4 100644 --- a/erpnext/education/doctype/student_group/student_group_dashboard.py +++ b/erpnext/education/doctype/student_group/student_group_dashboard.py @@ -1,6 +1,5 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/education/doctype/student_group/test_student_group.py b/erpnext/education/doctype/student_group/test_student_group.py index 06022511e5b..807c63280f2 100644 --- a/erpnext/education/doctype/student_group/test_student_group.py +++ b/erpnext/education/doctype/student_group/test_student_group.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/student_group_creation_tool/student_group_creation_tool.py b/erpnext/education/doctype/student_group_creation_tool/student_group_creation_tool.py index 2007f8aa7cc..8fbfcec3b57 100644 --- a/erpnext/education/doctype/student_group_creation_tool/student_group_creation_tool.py +++ b/erpnext/education/doctype/student_group_creation_tool/student_group_creation_tool.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/doctype/student_group_creation_tool/test_student_group_creation_tool.py b/erpnext/education/doctype/student_group_creation_tool/test_student_group_creation_tool.py index 432da090134..8722f973a84 100644 --- a/erpnext/education/doctype/student_group_creation_tool/test_student_group_creation_tool.py +++ b/erpnext/education/doctype/student_group_creation_tool/test_student_group_creation_tool.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/student_group_creation_tool_course/student_group_creation_tool_course.py b/erpnext/education/doctype/student_group_creation_tool_course/student_group_creation_tool_course.py index b9d1e0d7fe7..78e45411fd2 100644 --- a/erpnext/education/doctype/student_group_creation_tool_course/student_group_creation_tool_course.py +++ b/erpnext/education/doctype/student_group_creation_tool_course/student_group_creation_tool_course.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/student_group_instructor/student_group_instructor.py b/erpnext/education/doctype/student_group_instructor/student_group_instructor.py index 81a7ed25af5..05ef6fc1164 100644 --- a/erpnext/education/doctype/student_group_instructor/student_group_instructor.py +++ b/erpnext/education/doctype/student_group_instructor/student_group_instructor.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/student_group_student/student_group_student.py b/erpnext/education/doctype/student_group_student/student_group_student.py index 7ee4caec5e3..f9d00abde0b 100644 --- a/erpnext/education/doctype/student_group_student/student_group_student.py +++ b/erpnext/education/doctype/student_group_student/student_group_student.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/student_guardian/student_guardian.py b/erpnext/education/doctype/student_guardian/student_guardian.py index 56d7df7d0a8..0843acfd50a 100644 --- a/erpnext/education/doctype/student_guardian/student_guardian.py +++ b/erpnext/education/doctype/student_guardian/student_guardian.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/student_language/student_language.py b/erpnext/education/doctype/student_language/student_language.py index 6ec0b1fc6e1..d578c9a0b66 100644 --- a/erpnext/education/doctype/student_language/student_language.py +++ b/erpnext/education/doctype/student_language/student_language.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/student_language/test_student_language.py b/erpnext/education/doctype/student_language/test_student_language.py index 1d7c003ae5e..718896c6c51 100644 --- a/erpnext/education/doctype/student_language/test_student_language.py +++ b/erpnext/education/doctype/student_language/test_student_language.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/student_leave_application/student_leave_application.py b/erpnext/education/doctype/student_leave_application/student_leave_application.py index 50c14aae22b..b1eda9a3c10 100644 --- a/erpnext/education/doctype/student_leave_application/student_leave_application.py +++ b/erpnext/education/doctype/student_leave_application/student_leave_application.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from datetime import timedelta diff --git a/erpnext/education/doctype/student_leave_application/student_leave_application_dashboard.py b/erpnext/education/doctype/student_leave_application/student_leave_application_dashboard.py index 2674f5415d9..fca5ad6ed56 100644 --- a/erpnext/education/doctype/student_leave_application/student_leave_application_dashboard.py +++ b/erpnext/education/doctype/student_leave_application/student_leave_application_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/education/doctype/student_leave_application/test_student_leave_application.py b/erpnext/education/doctype/student_leave_application/test_student_leave_application.py index 506dc738d88..92e82c5b8a1 100644 --- a/erpnext/education/doctype/student_leave_application/test_student_leave_application.py +++ b/erpnext/education/doctype/student_leave_application/test_student_leave_application.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/student_log/student_log.py b/erpnext/education/doctype/student_log/student_log.py index 2ca49ca12d3..b95f34e0493 100644 --- a/erpnext/education/doctype/student_log/student_log.py +++ b/erpnext/education/doctype/student_log/student_log.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/student_log/test_student_log.py b/erpnext/education/doctype/student_log/test_student_log.py index 533191f3b47..91fdb3c8167 100644 --- a/erpnext/education/doctype/student_log/test_student_log.py +++ b/erpnext/education/doctype/student_log/test_student_log.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.py b/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.py index 1cf79213150..43802abea65 100644 --- a/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.py +++ b/erpnext/education/doctype/student_report_generation_tool/student_report_generation_tool.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/education/doctype/student_report_generation_tool/test_student_report_generation_tool.py b/erpnext/education/doctype/student_report_generation_tool/test_student_report_generation_tool.py index f6227136d9d..e37881f0125 100644 --- a/erpnext/education/doctype/student_report_generation_tool/test_student_report_generation_tool.py +++ b/erpnext/education/doctype/student_report_generation_tool/test_student_report_generation_tool.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/student_sibling/student_sibling.py b/erpnext/education/doctype/student_sibling/student_sibling.py index b36cf59dbb3..9ee0667d14e 100644 --- a/erpnext/education/doctype/student_sibling/student_sibling.py +++ b/erpnext/education/doctype/student_sibling/student_sibling.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/student_siblings/student_siblings.py b/erpnext/education/doctype/student_siblings/student_siblings.py index 412cf050c16..ee89f4f1575 100644 --- a/erpnext/education/doctype/student_siblings/student_siblings.py +++ b/erpnext/education/doctype/student_siblings/student_siblings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/doctype/topic/test_topic.py b/erpnext/education/doctype/topic/test_topic.py index b6c6c7516fa..d1d664bb21a 100644 --- a/erpnext/education/doctype/topic/test_topic.py +++ b/erpnext/education/doctype/topic/test_topic.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/topic/topic.py b/erpnext/education/doctype/topic/topic.py index 1834b2e060c..146f57453ad 100644 --- a/erpnext/education/doctype/topic/topic.py +++ b/erpnext/education/doctype/topic/topic.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/education/doctype/topic_content/test_topic_content.py b/erpnext/education/doctype/topic_content/test_topic_content.py index 6fdcbdae717..56bb40968ca 100644 --- a/erpnext/education/doctype/topic_content/test_topic_content.py +++ b/erpnext/education/doctype/topic_content/test_topic_content.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/education/doctype/topic_content/topic_content.py b/erpnext/education/doctype/topic_content/topic_content.py index 9339bbde5aa..88d0eee73ab 100644 --- a/erpnext/education/doctype/topic_content/topic_content.py +++ b/erpnext/education/doctype/topic_content/topic_content.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/education/report/absent_student_report/absent_student_report.py b/erpnext/education/report/absent_student_report/absent_student_report.py index d5b66757fcd..c274d333492 100644 --- a/erpnext/education/report/absent_student_report/absent_student_report.py +++ b/erpnext/education/report/absent_student_report/absent_student_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/education/report/assessment_plan_status/assessment_plan_status.py b/erpnext/education/report/assessment_plan_status/assessment_plan_status.py index 64ceb42731a..86f2451cbf0 100644 --- a/erpnext/education/report/assessment_plan_status/assessment_plan_status.py +++ b/erpnext/education/report/assessment_plan_status/assessment_plan_status.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from itertools import groupby diff --git a/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.py b/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.py index ad07ee1949c..38eef68d0e7 100644 --- a/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.py +++ b/erpnext/education/report/course_wise_assessment_report/course_wise_assessment_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from collections import OrderedDict, defaultdict diff --git a/erpnext/education/report/final_assessment_grades/final_assessment_grades.py b/erpnext/education/report/final_assessment_grades/final_assessment_grades.py index ae7f34b5e1c..b0428678045 100644 --- a/erpnext/education/report/final_assessment_grades/final_assessment_grades.py +++ b/erpnext/education/report/final_assessment_grades/final_assessment_grades.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from collections import defaultdict diff --git a/erpnext/education/report/program_wise_fee_collection/program_wise_fee_collection.py b/erpnext/education/report/program_wise_fee_collection/program_wise_fee_collection.py index 1717ed55aec..0599dadf934 100644 --- a/erpnext/education/report/program_wise_fee_collection/program_wise_fee_collection.py +++ b/erpnext/education/report/program_wise_fee_collection/program_wise_fee_collection.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/report/student_and_guardian_contact_details/student_and_guardian_contact_details.py b/erpnext/education/report/student_and_guardian_contact_details/student_and_guardian_contact_details.py index a21a93686ef..7097b8072b2 100644 --- a/erpnext/education/report/student_and_guardian_contact_details/student_and_guardian_contact_details.py +++ b/erpnext/education/report/student_and_guardian_contact_details/student_and_guardian_contact_details.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/report/student_batch_wise_attendance/student_batch_wise_attendance.py b/erpnext/education/report/student_batch_wise_attendance/student_batch_wise_attendance.py index b65350f1b22..52055dceb8c 100644 --- a/erpnext/education/report/student_batch_wise_attendance/student_batch_wise_attendance.py +++ b/erpnext/education/report/student_batch_wise_attendance/student_batch_wise_attendance.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/education/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py b/erpnext/education/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py index f6d9c5a012e..1166a75b2cc 100644 --- a/erpnext/education/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py +++ b/erpnext/education/report/student_monthly_attendance_sheet/student_monthly_attendance_sheet.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/education/setup.py b/erpnext/education/setup.py index 5c4092849a7..b7169261764 100644 --- a/erpnext/education/setup.py +++ b/erpnext/education/setup.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from erpnext.setup.utils import insert_record diff --git a/erpnext/education/utils.py b/erpnext/education/utils.py index 33394e17963..a7a15d18ce8 100644 --- a/erpnext/education/utils.py +++ b/erpnext/education/utils.py @@ -1,8 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors -from __future__ import division, unicode_literals - import frappe from frappe import _ diff --git a/erpnext/education/web_form/student_applicant/student_applicant.py b/erpnext/education/web_form/student_applicant/student_applicant.py index f57de916dd1..19b550feea7 100644 --- a/erpnext/education/web_form/student_applicant/student_applicant.py +++ b/erpnext/education/web_form/student_applicant/student_applicant.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_context(context): diff --git a/erpnext/erpnext_integrations/connectors/github_connection.py b/erpnext/erpnext_integrations/connectors/github_connection.py index ab7708df305..f28065e7248 100644 --- a/erpnext/erpnext_integrations/connectors/github_connection.py +++ b/erpnext/erpnext_integrations/connectors/github_connection.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.data_migration.doctype.data_migration_connector.connectors.base import BaseConnection from github import Github diff --git a/erpnext/erpnext_integrations/connectors/woocommerce_connection.py b/erpnext/erpnext_integrations/connectors/woocommerce_connection.py index 192ec147e36..fdeb32da7a8 100644 --- a/erpnext/erpnext_integrations/connectors/woocommerce_connection.py +++ b/erpnext/erpnext_integrations/connectors/woocommerce_connection.py @@ -1,5 +1,4 @@ -from __future__ import unicode_literals import base64 import hashlib diff --git a/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/__init__.py b/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/__init__.py index 5a4a57c2e25..d7ebf59ea8e 100644 --- a/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/__init__.py +++ b/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/__init__.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/__init__.py b/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/__init__.py index bab8031e024..7dd0c8658d1 100644 --- a/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/__init__.py +++ b/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/__init__.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def pre_process(milestone): diff --git a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_methods.py b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_methods.py index a757a43b59c..7feca83e0f0 100644 --- a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_methods.py +++ b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_methods.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import csv import math diff --git a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_api.py b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_api.py index 652fa9200d9..4caf137455a 100755 --- a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_api.py +++ b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_api.py @@ -1,10 +1,8 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # # Basic interface to Amazon MWS # Based on http://code.google.com/p/amazon-mws-python # Extended to include finances object -from __future__ import unicode_literals import base64 import hashlib diff --git a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_settings.py b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_settings.py index ac59eb7925c..c1f460f49b6 100644 --- a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_settings.py +++ b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import dateutil import frappe diff --git a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/test_amazon_mws_settings.py b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/test_amazon_mws_settings.py index 844df59576a..4be7960deda 100644 --- a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/test_amazon_mws_settings.py +++ b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/test_amazon_mws_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/xml_utils.py b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/xml_utils.py index 88ef64d307c..d9dfc6f72d4 100644 --- a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/xml_utils.py +++ b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/xml_utils.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Created on Tue Jun 26 15:42:07 2012 @@ -6,7 +5,6 @@ Borrowed from https://github.com/timotheus/ebaysdk-python @author: pierre """ -from __future__ import unicode_literals import re import xml.etree.ElementTree as ET diff --git a/erpnext/erpnext_integrations/doctype/exotel_settings/exotel_settings.py b/erpnext/erpnext_integrations/doctype/exotel_settings/exotel_settings.py index f1314fc122f..e84093cae09 100644 --- a/erpnext/erpnext_integrations/doctype/exotel_settings/exotel_settings.py +++ b/erpnext/erpnext_integrations/doctype/exotel_settings/exotel_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe import requests diff --git a/erpnext/erpnext_integrations/doctype/gocardless_mandate/gocardless_mandate.py b/erpnext/erpnext_integrations/doctype/gocardless_mandate/gocardless_mandate.py index b416ce8808f..bceb3caebdf 100644 --- a/erpnext/erpnext_integrations/doctype/gocardless_mandate/gocardless_mandate.py +++ b/erpnext/erpnext_integrations/doctype/gocardless_mandate/gocardless_mandate.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/erpnext_integrations/doctype/gocardless_mandate/test_gocardless_mandate.py b/erpnext/erpnext_integrations/doctype/gocardless_mandate/test_gocardless_mandate.py index 1b76ee5afc7..0c1952a16a9 100644 --- a/erpnext/erpnext_integrations/doctype/gocardless_mandate/test_gocardless_mandate.py +++ b/erpnext/erpnext_integrations/doctype/gocardless_mandate/test_gocardless_mandate.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/erpnext_integrations/doctype/gocardless_settings/__init__.py b/erpnext/erpnext_integrations/doctype/gocardless_settings/__init__.py index d003edb9b0e..bb62c395a5b 100644 --- a/erpnext/erpnext_integrations/doctype/gocardless_settings/__init__.py +++ b/erpnext/erpnext_integrations/doctype/gocardless_settings/__init__.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import hashlib import hmac diff --git a/erpnext/erpnext_integrations/doctype/gocardless_settings/gocardless_settings.py b/erpnext/erpnext_integrations/doctype/gocardless_settings/gocardless_settings.py index 6484973106a..e242ace60f7 100644 --- a/erpnext/erpnext_integrations/doctype/gocardless_settings/gocardless_settings.py +++ b/erpnext/erpnext_integrations/doctype/gocardless_settings/gocardless_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe import gocardless_pro diff --git a/erpnext/erpnext_integrations/doctype/gocardless_settings/test_gocardless_settings.py b/erpnext/erpnext_integrations/doctype/gocardless_settings/test_gocardless_settings.py index b17aef50986..379afe51ddc 100644 --- a/erpnext/erpnext_integrations/doctype/gocardless_settings/test_gocardless_settings.py +++ b/erpnext/erpnext_integrations/doctype/gocardless_settings/test_gocardless_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py index 4ce85e58a61..d2b6190a299 100644 --- a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py +++ b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py @@ -1,9 +1,7 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals from json import dumps, loads diff --git a/erpnext/erpnext_integrations/doctype/mpesa_settings/test_mpesa_settings.py b/erpnext/erpnext_integrations/doctype/mpesa_settings/test_mpesa_settings.py index de81b821321..3945afab69a 100644 --- a/erpnext/erpnext_integrations/doctype/mpesa_settings/test_mpesa_settings.py +++ b/erpnext/erpnext_integrations/doctype/mpesa_settings/test_mpesa_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest from json import dumps diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py index d4cf56af6b2..0b552f9bbf4 100644 --- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py index 310afed4811..7e6f146ce3f 100644 --- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/test_plaid_settings.py b/erpnext/erpnext_integrations/doctype/plaid_settings/test_plaid_settings.py index 32b5b8f2657..535d7fa7997 100644 --- a/erpnext/erpnext_integrations/doctype/plaid_settings/test_plaid_settings.py +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/test_plaid_settings.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt diff --git a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py b/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py index 39b9bb232e0..5de568272a0 100644 --- a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py +++ b/erpnext/erpnext_integrations/doctype/quickbooks_migrator/quickbooks_migrator.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json import traceback diff --git a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/test_quickbooks_migrator.py b/erpnext/erpnext_integrations/doctype/quickbooks_migrator/test_quickbooks_migrator.py index 5604b40d140..92e79ec8a4a 100644 --- a/erpnext/erpnext_integrations/doctype/quickbooks_migrator/test_quickbooks_migrator.py +++ b/erpnext/erpnext_integrations/doctype/quickbooks_migrator/test_quickbooks_migrator.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py b/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py index e1e7f62df4e..54ed6f7d115 100644 --- a/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py +++ b/erpnext/erpnext_integrations/doctype/tally_migration/tally_migration.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json import re diff --git a/erpnext/erpnext_integrations/doctype/tally_migration/test_tally_migration.py b/erpnext/erpnext_integrations/doctype/tally_migration/test_tally_migration.py index aae8f6d4db0..7a61abaee63 100644 --- a/erpnext/erpnext_integrations/doctype/tally_migration/test_tally_migration.py +++ b/erpnext/erpnext_integrations/doctype/tally_migration/test_tally_migration.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py index f430a9e9bae..bfc5e6f98df 100644 --- a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py +++ b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json import os diff --git a/erpnext/erpnext_integrations/doctype/taxjar_settings/test_taxjar_settings.py b/erpnext/erpnext_integrations/doctype/taxjar_settings/test_taxjar_settings.py index c871b05642b..d6f8eea1e0e 100644 --- a/erpnext/erpnext_integrations/doctype/taxjar_settings/test_taxjar_settings.py +++ b/erpnext/erpnext_integrations/doctype/taxjar_settings/test_taxjar_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/erpnext_integrations/doctype/woocommerce_settings/test_woocommerce_settings.py b/erpnext/erpnext_integrations/doctype/woocommerce_settings/test_woocommerce_settings.py index 3d184584361..9945823bf73 100644 --- a/erpnext/erpnext_integrations/doctype/woocommerce_settings/test_woocommerce_settings.py +++ b/erpnext/erpnext_integrations/doctype/woocommerce_settings/test_woocommerce_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/erpnext_integrations/doctype/woocommerce_settings/woocommerce_settings.py b/erpnext/erpnext_integrations/doctype/woocommerce_settings/woocommerce_settings.py index 2e15fab0d3f..8da52f49f1c 100644 --- a/erpnext/erpnext_integrations/doctype/woocommerce_settings/woocommerce_settings.py +++ b/erpnext/erpnext_integrations/doctype/woocommerce_settings/woocommerce_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/erpnext_integrations/stripe_integration.py b/erpnext/erpnext_integrations/stripe_integration.py index f0315eb7eef..502cb5f00a4 100644 --- a/erpnext/erpnext_integrations/stripe_integration.py +++ b/erpnext/erpnext_integrations/stripe_integration.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt diff --git a/erpnext/erpnext_integrations/utils.py b/erpnext/erpnext_integrations/utils.py index bb5c0c2dd10..57c43675ffa 100644 --- a/erpnext/erpnext_integrations/utils.py +++ b/erpnext/erpnext_integrations/utils.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import base64 import hashlib diff --git a/erpnext/exceptions.py b/erpnext/exceptions.py index 9c6b13f8035..cfd2a7ce049 100644 --- a/erpnext/exceptions.py +++ b/erpnext/exceptions.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/hooks.py b/erpnext/hooks.py index 05f07f515c4..bc8ef820e92 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/hotels/doctype/hotel_room/hotel_room.py b/erpnext/hotels/doctype/hotel_room/hotel_room.py index 93a62c98e79..e4bd1c88462 100644 --- a/erpnext/hotels/doctype/hotel_room/hotel_room.py +++ b/erpnext/hotels/doctype/hotel_room/hotel_room.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/hotels/doctype/hotel_room/test_hotel_room.py b/erpnext/hotels/doctype/hotel_room/test_hotel_room.py index 4fedbd42a92..95efe2c6068 100644 --- a/erpnext/hotels/doctype/hotel_room/test_hotel_room.py +++ b/erpnext/hotels/doctype/hotel_room/test_hotel_room.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hotels/doctype/hotel_room_amenity/hotel_room_amenity.py b/erpnext/hotels/doctype/hotel_room_amenity/hotel_room_amenity.py index 982b3ef911d..166493124a7 100644 --- a/erpnext/hotels/doctype/hotel_room_amenity/hotel_room_amenity.py +++ b/erpnext/hotels/doctype/hotel_room_amenity/hotel_room_amenity.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hotels/doctype/hotel_room_package/hotel_room_package.py b/erpnext/hotels/doctype/hotel_room_package/hotel_room_package.py index 1864081842d..aedc83a8468 100644 --- a/erpnext/hotels/doctype/hotel_room_package/hotel_room_package.py +++ b/erpnext/hotels/doctype/hotel_room_package/hotel_room_package.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/hotels/doctype/hotel_room_package/test_hotel_room_package.py b/erpnext/hotels/doctype/hotel_room_package/test_hotel_room_package.py index fe5d79dcc32..749731f4918 100644 --- a/erpnext/hotels/doctype/hotel_room_package/test_hotel_room_package.py +++ b/erpnext/hotels/doctype/hotel_room_package/test_hotel_room_package.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hotels/doctype/hotel_room_pricing/hotel_room_pricing.py b/erpnext/hotels/doctype/hotel_room_pricing/hotel_room_pricing.py index 5797fef30db..d28e5734264 100644 --- a/erpnext/hotels/doctype/hotel_room_pricing/hotel_room_pricing.py +++ b/erpnext/hotels/doctype/hotel_room_pricing/hotel_room_pricing.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hotels/doctype/hotel_room_pricing/test_hotel_room_pricing.py b/erpnext/hotels/doctype/hotel_room_pricing/test_hotel_room_pricing.py index 72030c69397..34550096dd9 100644 --- a/erpnext/hotels/doctype/hotel_room_pricing/test_hotel_room_pricing.py +++ b/erpnext/hotels/doctype/hotel_room_pricing/test_hotel_room_pricing.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hotels/doctype/hotel_room_pricing_item/hotel_room_pricing_item.py b/erpnext/hotels/doctype/hotel_room_pricing_item/hotel_room_pricing_item.py index 4a344df8485..2e6bb5fac29 100644 --- a/erpnext/hotels/doctype/hotel_room_pricing_item/hotel_room_pricing_item.py +++ b/erpnext/hotels/doctype/hotel_room_pricing_item/hotel_room_pricing_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hotels/doctype/hotel_room_pricing_package/hotel_room_pricing_package.py b/erpnext/hotels/doctype/hotel_room_pricing_package/hotel_room_pricing_package.py index f594ac709ec..ebbdb6ec6c5 100644 --- a/erpnext/hotels/doctype/hotel_room_pricing_package/hotel_room_pricing_package.py +++ b/erpnext/hotels/doctype/hotel_room_pricing_package/hotel_room_pricing_package.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hotels/doctype/hotel_room_pricing_package/test_hotel_room_pricing_package.py b/erpnext/hotels/doctype/hotel_room_pricing_package/test_hotel_room_pricing_package.py index ea258ccb75d..196e6504b51 100644 --- a/erpnext/hotels/doctype/hotel_room_pricing_package/test_hotel_room_pricing_package.py +++ b/erpnext/hotels/doctype/hotel_room_pricing_package/test_hotel_room_pricing_package.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hotels/doctype/hotel_room_reservation/hotel_room_reservation.py b/erpnext/hotels/doctype/hotel_room_reservation/hotel_room_reservation.py index 4944862284a..7725955396b 100644 --- a/erpnext/hotels/doctype/hotel_room_reservation/hotel_room_reservation.py +++ b/erpnext/hotels/doctype/hotel_room_reservation/hotel_room_reservation.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/hotels/doctype/hotel_room_reservation/test_hotel_room_reservation.py b/erpnext/hotels/doctype/hotel_room_reservation/test_hotel_room_reservation.py index e03005cf042..bb32a27fa7c 100644 --- a/erpnext/hotels/doctype/hotel_room_reservation/test_hotel_room_reservation.py +++ b/erpnext/hotels/doctype/hotel_room_reservation/test_hotel_room_reservation.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hotels/doctype/hotel_room_reservation_item/hotel_room_reservation_item.py b/erpnext/hotels/doctype/hotel_room_reservation_item/hotel_room_reservation_item.py index 0cf854722e1..41d86ddca65 100644 --- a/erpnext/hotels/doctype/hotel_room_reservation_item/hotel_room_reservation_item.py +++ b/erpnext/hotels/doctype/hotel_room_reservation_item/hotel_room_reservation_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hotels/doctype/hotel_room_type/hotel_room_type.py b/erpnext/hotels/doctype/hotel_room_type/hotel_room_type.py index 610cf181c1d..7ab529fee96 100644 --- a/erpnext/hotels/doctype/hotel_room_type/hotel_room_type.py +++ b/erpnext/hotels/doctype/hotel_room_type/hotel_room_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hotels/doctype/hotel_room_type/test_hotel_room_type.py b/erpnext/hotels/doctype/hotel_room_type/test_hotel_room_type.py index 6dba7b7407b..8d1147d0f20 100644 --- a/erpnext/hotels/doctype/hotel_room_type/test_hotel_room_type.py +++ b/erpnext/hotels/doctype/hotel_room_type/test_hotel_room_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hotels/doctype/hotel_settings/hotel_settings.py b/erpnext/hotels/doctype/hotel_settings/hotel_settings.py index f8f8fe964da..8376d509693 100644 --- a/erpnext/hotels/doctype/hotel_settings/hotel_settings.py +++ b/erpnext/hotels/doctype/hotel_settings/hotel_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hotels/doctype/hotel_settings/test_hotel_settings.py b/erpnext/hotels/doctype/hotel_settings/test_hotel_settings.py index 5cf58b994e1..e76c00ce101 100644 --- a/erpnext/hotels/doctype/hotel_settings/test_hotel_settings.py +++ b/erpnext/hotels/doctype/hotel_settings/test_hotel_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hotels/report/hotel_room_occupancy/hotel_room_occupancy.py b/erpnext/hotels/report/hotel_room_occupancy/hotel_room_occupancy.py index f02baebdf6f..c43589d2a8d 100644 --- a/erpnext/hotels/report/hotel_room_occupancy/hotel_room_occupancy.py +++ b/erpnext/hotels/report/hotel_room_occupancy/hotel_room_occupancy.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/__init__.py b/erpnext/hr/doctype/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/__init__.py +++ b/erpnext/hr/doctype/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/appointment_letter/appointment_letter.py b/erpnext/hr/doctype/appointment_letter/appointment_letter.py index b9a8ec63017..0120188d31c 100644 --- a/erpnext/hr/doctype/appointment_letter/appointment_letter.py +++ b/erpnext/hr/doctype/appointment_letter/appointment_letter.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/hr/doctype/appointment_letter/test_appointment_letter.py b/erpnext/hr/doctype/appointment_letter/test_appointment_letter.py index 88637b9fe93..e0f65b45d48 100644 --- a/erpnext/hr/doctype/appointment_letter/test_appointment_letter.py +++ b/erpnext/hr/doctype/appointment_letter/test_appointment_letter.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/hr/doctype/appointment_letter_content/appointment_letter_content.py b/erpnext/hr/doctype/appointment_letter_content/appointment_letter_content.py index f4db456af38..d158013d746 100644 --- a/erpnext/hr/doctype/appointment_letter_content/appointment_letter_content.py +++ b/erpnext/hr/doctype/appointment_letter_content/appointment_letter_content.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/hr/doctype/appointment_letter_template/appointment_letter_template.py b/erpnext/hr/doctype/appointment_letter_template/appointment_letter_template.py index acb5c1f6924..9ac726e06d3 100644 --- a/erpnext/hr/doctype/appointment_letter_template/appointment_letter_template.py +++ b/erpnext/hr/doctype/appointment_letter_template/appointment_letter_template.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/hr/doctype/appointment_letter_template/test_appointment_letter_template.py b/erpnext/hr/doctype/appointment_letter_template/test_appointment_letter_template.py index 46dd3e12727..aa87da323fc 100644 --- a/erpnext/hr/doctype/appointment_letter_template/test_appointment_letter_template.py +++ b/erpnext/hr/doctype/appointment_letter_template/test_appointment_letter_template.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/hr/doctype/appraisal/__init__.py b/erpnext/hr/doctype/appraisal/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/appraisal/__init__.py +++ b/erpnext/hr/doctype/appraisal/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/appraisal/appraisal.py b/erpnext/hr/doctype/appraisal/appraisal.py index 96a4ffa524a..83273f86544 100644 --- a/erpnext/hr/doctype/appraisal/appraisal.py +++ b/erpnext/hr/doctype/appraisal/appraisal.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/appraisal/test_appraisal.py b/erpnext/hr/doctype/appraisal/test_appraisal.py index cf2bd7c2427..90c30ef3475 100644 --- a/erpnext/hr/doctype/appraisal/test_appraisal.py +++ b/erpnext/hr/doctype/appraisal/test_appraisal.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/appraisal_goal/__init__.py b/erpnext/hr/doctype/appraisal_goal/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/appraisal_goal/__init__.py +++ b/erpnext/hr/doctype/appraisal_goal/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/appraisal_goal/appraisal_goal.py b/erpnext/hr/doctype/appraisal_goal/appraisal_goal.py index d9789a028bd..3cbc9188eee 100644 --- a/erpnext/hr/doctype/appraisal_goal/appraisal_goal.py +++ b/erpnext/hr/doctype/appraisal_goal/appraisal_goal.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/appraisal_template/__init__.py b/erpnext/hr/doctype/appraisal_template/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/appraisal_template/__init__.py +++ b/erpnext/hr/doctype/appraisal_template/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/appraisal_template/appraisal_template.py b/erpnext/hr/doctype/appraisal_template/appraisal_template.py index d10a0de3bce..6b5921e6a6e 100644 --- a/erpnext/hr/doctype/appraisal_template/appraisal_template.py +++ b/erpnext/hr/doctype/appraisal_template/appraisal_template.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/appraisal_template/appraisal_template_dashboard.py b/erpnext/hr/doctype/appraisal_template/appraisal_template_dashboard.py index b8d04944edb..f52e2b027ca 100644 --- a/erpnext/hr/doctype/appraisal_template/appraisal_template_dashboard.py +++ b/erpnext/hr/doctype/appraisal_template/appraisal_template_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/appraisal_template/test_appraisal_template.py b/erpnext/hr/doctype/appraisal_template/test_appraisal_template.py index a814ec8d5b2..d0e81a7dc5b 100644 --- a/erpnext/hr/doctype/appraisal_template/test_appraisal_template.py +++ b/erpnext/hr/doctype/appraisal_template/test_appraisal_template.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/appraisal_template_goal/__init__.py b/erpnext/hr/doctype/appraisal_template_goal/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/appraisal_template_goal/__init__.py +++ b/erpnext/hr/doctype/appraisal_template_goal/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.py b/erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.py index 1b15fbd51e1..e6c5f64e08e 100644 --- a/erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.py +++ b/erpnext/hr/doctype/appraisal_template_goal/appraisal_template_goal.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/attendance/__init__.py b/erpnext/hr/doctype/attendance/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/attendance/__init__.py +++ b/erpnext/hr/doctype/attendance/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/attendance/attendance.py b/erpnext/hr/doctype/attendance/attendance.py index 002f9bbcac2..7dcfac249f4 100644 --- a/erpnext/hr/doctype/attendance/attendance.py +++ b/erpnext/hr/doctype/attendance/attendance.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/attendance/attendance_dashboard.py b/erpnext/hr/doctype/attendance/attendance_dashboard.py index bbe67dfcc8f..f466534d2c7 100644 --- a/erpnext/hr/doctype/attendance/attendance_dashboard.py +++ b/erpnext/hr/doctype/attendance/attendance_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/attendance/test_attendance.py b/erpnext/hr/doctype/attendance/test_attendance.py index ab443774212..a770d70ffa9 100644 --- a/erpnext/hr/doctype/attendance/test_attendance.py +++ b/erpnext/hr/doctype/attendance/test_attendance.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/attendance_request/attendance_request.py b/erpnext/hr/doctype/attendance_request/attendance_request.py index 1e7429656d2..8fbe7c7a9ad 100644 --- a/erpnext/hr/doctype/attendance_request/attendance_request.py +++ b/erpnext/hr/doctype/attendance_request/attendance_request.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py b/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py index 8feb6f2f23e..b23e0fd93a2 100644 --- a/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py +++ b/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/attendance_request/test_attendance_request.py b/erpnext/hr/doctype/attendance_request/test_attendance_request.py index a9db74cbf75..3f0442c7d69 100644 --- a/erpnext/hr/doctype/attendance_request/test_attendance_request.py +++ b/erpnext/hr/doctype/attendance_request/test_attendance_request.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest from datetime import date diff --git a/erpnext/hr/doctype/branch/__init__.py b/erpnext/hr/doctype/branch/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/branch/__init__.py +++ b/erpnext/hr/doctype/branch/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/branch/branch.py b/erpnext/hr/doctype/branch/branch.py index c770dc34090..133ada05bf0 100644 --- a/erpnext/hr/doctype/branch/branch.py +++ b/erpnext/hr/doctype/branch/branch.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/branch/test_branch.py b/erpnext/hr/doctype/branch/test_branch.py index 7bf9b395308..e84c6e4c60e 100644 --- a/erpnext/hr/doctype/branch/test_branch.py +++ b/erpnext/hr/doctype/branch/test_branch.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/hr/doctype/compensatory_leave_request/compensatory_leave_request.py b/erpnext/hr/doctype/compensatory_leave_request/compensatory_leave_request.py index f24483bf827..7d6051508ad 100644 --- a/erpnext/hr/doctype/compensatory_leave_request/compensatory_leave_request.py +++ b/erpnext/hr/doctype/compensatory_leave_request/compensatory_leave_request.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/compensatory_leave_request/test_compensatory_leave_request.py b/erpnext/hr/doctype/compensatory_leave_request/test_compensatory_leave_request.py index 95bdd514ef3..5e51879328b 100644 --- a/erpnext/hr/doctype/compensatory_leave_request/test_compensatory_leave_request.py +++ b/erpnext/hr/doctype/compensatory_leave_request/test_compensatory_leave_request.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py b/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py index 92cf6aac851..38e1f54ba96 100644 --- a/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py +++ b/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from email_reply_parser import EmailReplyParser diff --git a/erpnext/hr/doctype/daily_work_summary/test_daily_work_summary.py b/erpnext/hr/doctype/daily_work_summary/test_daily_work_summary.py index 8a23682ad47..5edfb315564 100644 --- a/erpnext/hr/doctype/daily_work_summary/test_daily_work_summary.py +++ b/erpnext/hr/doctype/daily_work_summary/test_daily_work_summary.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import os import unittest diff --git a/erpnext/hr/doctype/daily_work_summary_group/daily_work_summary_group.py b/erpnext/hr/doctype/daily_work_summary_group/daily_work_summary_group.py index 152b1a9c7c5..306f43a418f 100644 --- a/erpnext/hr/doctype/daily_work_summary_group/daily_work_summary_group.py +++ b/erpnext/hr/doctype/daily_work_summary_group/daily_work_summary_group.py @@ -2,7 +2,6 @@ # # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # # For license information, please see license.txt -from __future__ import unicode_literals import frappe import frappe.utils diff --git a/erpnext/hr/doctype/daily_work_summary_group_user/daily_work_summary_group_user.py b/erpnext/hr/doctype/daily_work_summary_group_user/daily_work_summary_group_user.py index d69a7fbf987..6e0809af332 100644 --- a/erpnext/hr/doctype/daily_work_summary_group_user/daily_work_summary_group_user.py +++ b/erpnext/hr/doctype/daily_work_summary_group_user/daily_work_summary_group_user.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/department/__init__.py b/erpnext/hr/doctype/department/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/department/__init__.py +++ b/erpnext/hr/doctype/department/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/department/department.py b/erpnext/hr/doctype/department/department.py index b4771b3fed0..ed0bfcf0d5a 100644 --- a/erpnext/hr/doctype/department/department.py +++ b/erpnext/hr/doctype/department/department.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.utils.nestedset import NestedSet, get_root_of diff --git a/erpnext/hr/doctype/department/test_department.py b/erpnext/hr/doctype/department/test_department.py index 2fb3b95ef43..95bf6635011 100644 --- a/erpnext/hr/doctype/department/test_department.py +++ b/erpnext/hr/doctype/department/test_department.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/department_approver/department_approver.py b/erpnext/hr/doctype/department_approver/department_approver.py index 113ea1887fc..375ae7c70ae 100644 --- a/erpnext/hr/doctype/department_approver/department_approver.py +++ b/erpnext/hr/doctype/department_approver/department_approver.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/designation/__init__.py b/erpnext/hr/doctype/designation/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/designation/__init__.py +++ b/erpnext/hr/doctype/designation/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/designation/designation.py b/erpnext/hr/doctype/designation/designation.py index 0291a992cd9..d7be55cad69 100644 --- a/erpnext/hr/doctype/designation/designation.py +++ b/erpnext/hr/doctype/designation/designation.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/designation/test_designation.py b/erpnext/hr/doctype/designation/test_designation.py index 33aa2433cee..f2d6d36ff88 100644 --- a/erpnext/hr/doctype/designation/test_designation.py +++ b/erpnext/hr/doctype/designation/test_designation.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/hr/doctype/designation_skill/designation_skill.py b/erpnext/hr/doctype/designation_skill/designation_skill.py index 2074dc9df51..c35223b3c10 100644 --- a/erpnext/hr/doctype/designation_skill/designation_skill.py +++ b/erpnext/hr/doctype/designation_skill/designation_skill.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/hr/doctype/driver/driver.py b/erpnext/hr/doctype/driver/driver.py index 5c428b57fc9..26981890ed6 100644 --- a/erpnext/hr/doctype/driver/driver.py +++ b/erpnext/hr/doctype/driver/driver.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/driver/test_driver.py b/erpnext/hr/doctype/driver/test_driver.py index fa3623745ba..22707293a05 100644 --- a/erpnext/hr/doctype/driver/test_driver.py +++ b/erpnext/hr/doctype/driver/test_driver.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/driving_license_category/driving_license_category.py b/erpnext/hr/doctype/driving_license_category/driving_license_category.py index 63ac4184bd9..a1a6d55cb4c 100644 --- a/erpnext/hr/doctype/driving_license_category/driving_license_category.py +++ b/erpnext/hr/doctype/driving_license_category/driving_license_category.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/employee/__init__.py b/erpnext/hr/doctype/employee/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/employee/__init__.py +++ b/erpnext/hr/doctype/employee/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/employee/employee_dashboard.py b/erpnext/hr/doctype/employee/employee_dashboard.py index ce307be60e8..0aaff52ee28 100644 --- a/erpnext/hr/doctype/employee/employee_dashboard.py +++ b/erpnext/hr/doctype/employee/employee_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/hr/doctype/employee_advance/employee_advance.py b/erpnext/hr/doctype/employee_advance/employee_advance.py index 8d90bccd2da..8a8e8dba749 100644 --- a/erpnext/hr/doctype/employee_advance/employee_advance.py +++ b/erpnext/hr/doctype/employee_advance/employee_advance.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/employee_advance/employee_advance_dashboard.py b/erpnext/hr/doctype/employee_advance/employee_advance_dashboard.py index 17d5bd27a6e..089bd2c1b5c 100644 --- a/erpnext/hr/doctype/employee_advance/employee_advance_dashboard.py +++ b/erpnext/hr/doctype/employee_advance/employee_advance_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/employee_advance/test_employee_advance.py b/erpnext/hr/doctype/employee_advance/test_employee_advance.py index c439d45b55c..4ecfa60eb75 100644 --- a/erpnext/hr/doctype/employee_advance/test_employee_advance.py +++ b/erpnext/hr/doctype/employee_advance/test_employee_advance.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/employee_attendance_tool/employee_attendance_tool.py b/erpnext/hr/doctype/employee_attendance_tool/employee_attendance_tool.py index 1a1bcb2e20f..af2ca50b78a 100644 --- a/erpnext/hr/doctype/employee_attendance_tool/employee_attendance_tool.py +++ b/erpnext/hr/doctype/employee_attendance_tool/employee_attendance_tool.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/hr/doctype/employee_boarding_activity/employee_boarding_activity.py b/erpnext/hr/doctype/employee_boarding_activity/employee_boarding_activity.py index 48c85f48aa2..e824081327d 100644 --- a/erpnext/hr/doctype/employee_boarding_activity/employee_boarding_activity.py +++ b/erpnext/hr/doctype/employee_boarding_activity/employee_boarding_activity.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/employee_checkin/employee_checkin.py b/erpnext/hr/doctype/employee_checkin/employee_checkin.py index 1ae9b1fa829..c1d4ac7fded 100644 --- a/erpnext/hr/doctype/employee_checkin/employee_checkin.py +++ b/erpnext/hr/doctype/employee_checkin/employee_checkin.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/employee_checkin/test_employee_checkin.py b/erpnext/hr/doctype/employee_checkin/test_employee_checkin.py index 71c6498dd7c..254bf9e2569 100644 --- a/erpnext/hr/doctype/employee_checkin/test_employee_checkin.py +++ b/erpnext/hr/doctype/employee_checkin/test_employee_checkin.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest from datetime import timedelta diff --git a/erpnext/hr/doctype/employee_education/__init__.py b/erpnext/hr/doctype/employee_education/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/employee_education/__init__.py +++ b/erpnext/hr/doctype/employee_education/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/employee_education/employee_education.py b/erpnext/hr/doctype/employee_education/employee_education.py index cadf5d64594..ded583bf01d 100644 --- a/erpnext/hr/doctype/employee_education/employee_education.py +++ b/erpnext/hr/doctype/employee_education/employee_education.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/employee_external_work_history/__init__.py b/erpnext/hr/doctype/employee_external_work_history/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/employee_external_work_history/__init__.py +++ b/erpnext/hr/doctype/employee_external_work_history/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/employee_external_work_history/employee_external_work_history.py b/erpnext/hr/doctype/employee_external_work_history/employee_external_work_history.py index 4d0e8d9b74a..d594fbf0f0c 100644 --- a/erpnext/hr/doctype/employee_external_work_history/employee_external_work_history.py +++ b/erpnext/hr/doctype/employee_external_work_history/employee_external_work_history.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/employee_grade/employee_grade.py b/erpnext/hr/doctype/employee_grade/employee_grade.py index b097038b5c2..41b7915c95a 100644 --- a/erpnext/hr/doctype/employee_grade/employee_grade.py +++ b/erpnext/hr/doctype/employee_grade/employee_grade.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/employee_grade/employee_grade_dashboard.py b/erpnext/hr/doctype/employee_grade/employee_grade_dashboard.py index 92d9fa082c9..1dd6ad3b15a 100644 --- a/erpnext/hr/doctype/employee_grade/employee_grade_dashboard.py +++ b/erpnext/hr/doctype/employee_grade/employee_grade_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/employee_grade/test_employee_grade.py b/erpnext/hr/doctype/employee_grade/test_employee_grade.py index cd4fcb5aeb4..a70d6853487 100644 --- a/erpnext/hr/doctype/employee_grade/test_employee_grade.py +++ b/erpnext/hr/doctype/employee_grade/test_employee_grade.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/employee_group/employee_group.py b/erpnext/hr/doctype/employee_group/employee_group.py index b2fe5eb3ad6..c4ce083c942 100644 --- a/erpnext/hr/doctype/employee_group/employee_group.py +++ b/erpnext/hr/doctype/employee_group/employee_group.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/employee_group/test_employee_group.py b/erpnext/hr/doctype/employee_group/test_employee_group.py index 053e840740a..a87f4007bd8 100644 --- a/erpnext/hr/doctype/employee_group/test_employee_group.py +++ b/erpnext/hr/doctype/employee_group/test_employee_group.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/employee_group_table/employee_group_table.py b/erpnext/hr/doctype/employee_group_table/employee_group_table.py index d9407a96fa6..adf6ca2668c 100644 --- a/erpnext/hr/doctype/employee_group_table/employee_group_table.py +++ b/erpnext/hr/doctype/employee_group_table/employee_group_table.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/employee_health_insurance/employee_health_insurance.py b/erpnext/hr/doctype/employee_health_insurance/employee_health_insurance.py index 4f2d1a07653..4a8c437d64c 100644 --- a/erpnext/hr/doctype/employee_health_insurance/employee_health_insurance.py +++ b/erpnext/hr/doctype/employee_health_insurance/employee_health_insurance.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/employee_health_insurance/test_employee_health_insurance.py b/erpnext/hr/doctype/employee_health_insurance/test_employee_health_insurance.py index 38e3ee316bb..4f042b70798 100644 --- a/erpnext/hr/doctype/employee_health_insurance/test_employee_health_insurance.py +++ b/erpnext/hr/doctype/employee_health_insurance/test_employee_health_insurance.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/employee_internal_work_history/__init__.py b/erpnext/hr/doctype/employee_internal_work_history/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/employee_internal_work_history/__init__.py +++ b/erpnext/hr/doctype/employee_internal_work_history/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/employee_internal_work_history/employee_internal_work_history.py b/erpnext/hr/doctype/employee_internal_work_history/employee_internal_work_history.py index 6076abb3468..6225de60148 100644 --- a/erpnext/hr/doctype/employee_internal_work_history/employee_internal_work_history.py +++ b/erpnext/hr/doctype/employee_internal_work_history/employee_internal_work_history.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/employee_onboarding/employee_onboarding.py b/erpnext/hr/doctype/employee_onboarding/employee_onboarding.py index e96447b7976..eba2a03193c 100644 --- a/erpnext/hr/doctype/employee_onboarding/employee_onboarding.py +++ b/erpnext/hr/doctype/employee_onboarding/employee_onboarding.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/employee_onboarding/test_employee_onboarding.py b/erpnext/hr/doctype/employee_onboarding/test_employee_onboarding.py index 1e3b9cb278e..cb1b56048b7 100644 --- a/erpnext/hr/doctype/employee_onboarding/test_employee_onboarding.py +++ b/erpnext/hr/doctype/employee_onboarding/test_employee_onboarding.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/employee_onboarding_template/employee_onboarding_template.py b/erpnext/hr/doctype/employee_onboarding_template/employee_onboarding_template.py index a46b3cdda39..199013a5a13 100644 --- a/erpnext/hr/doctype/employee_onboarding_template/employee_onboarding_template.py +++ b/erpnext/hr/doctype/employee_onboarding_template/employee_onboarding_template.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/employee_onboarding_template/employee_onboarding_template_dashboard.py b/erpnext/hr/doctype/employee_onboarding_template/employee_onboarding_template_dashboard.py index 1d2e8ae18db..48f2c1d2709 100644 --- a/erpnext/hr/doctype/employee_onboarding_template/employee_onboarding_template_dashboard.py +++ b/erpnext/hr/doctype/employee_onboarding_template/employee_onboarding_template_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/employee_onboarding_template/test_employee_onboarding_template.py b/erpnext/hr/doctype/employee_onboarding_template/test_employee_onboarding_template.py index 92a328b71ef..db09011c878 100644 --- a/erpnext/hr/doctype/employee_onboarding_template/test_employee_onboarding_template.py +++ b/erpnext/hr/doctype/employee_onboarding_template/test_employee_onboarding_template.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/employee_promotion/employee_promotion.py b/erpnext/hr/doctype/employee_promotion/employee_promotion.py index b05175200e9..cf6156e3264 100644 --- a/erpnext/hr/doctype/employee_promotion/employee_promotion.py +++ b/erpnext/hr/doctype/employee_promotion/employee_promotion.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/employee_promotion/test_employee_promotion.py b/erpnext/hr/doctype/employee_promotion/test_employee_promotion.py index 39af6ff7cc7..fc9d195a3f3 100644 --- a/erpnext/hr/doctype/employee_promotion/test_employee_promotion.py +++ b/erpnext/hr/doctype/employee_promotion/test_employee_promotion.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/employee_property_history/employee_property_history.py b/erpnext/hr/doctype/employee_property_history/employee_property_history.py index 9e2549284fb..345899e43cf 100644 --- a/erpnext/hr/doctype/employee_property_history/employee_property_history.py +++ b/erpnext/hr/doctype/employee_property_history/employee_property_history.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/employee_referral/employee_referral.py b/erpnext/hr/doctype/employee_referral/employee_referral.py index db356bf91f1..4e1780b9978 100644 --- a/erpnext/hr/doctype/employee_referral/employee_referral.py +++ b/erpnext/hr/doctype/employee_referral/employee_referral.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/employee_referral/employee_referral_dashboard.py b/erpnext/hr/doctype/employee_referral/employee_referral_dashboard.py index 85d6c2089b8..1733ac9726e 100644 --- a/erpnext/hr/doctype/employee_referral/employee_referral_dashboard.py +++ b/erpnext/hr/doctype/employee_referral/employee_referral_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/employee_referral/test_employee_referral.py b/erpnext/hr/doctype/employee_referral/test_employee_referral.py index 1340f62bbf4..529e3551454 100644 --- a/erpnext/hr/doctype/employee_referral/test_employee_referral.py +++ b/erpnext/hr/doctype/employee_referral/test_employee_referral.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/employee_separation/employee_separation.py b/erpnext/hr/doctype/employee_separation/employee_separation.py index ad279e8ce4c..915e9a876e7 100644 --- a/erpnext/hr/doctype/employee_separation/employee_separation.py +++ b/erpnext/hr/doctype/employee_separation/employee_separation.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from erpnext.controllers.employee_boarding_controller import EmployeeBoardingController diff --git a/erpnext/hr/doctype/employee_separation/test_employee_separation.py b/erpnext/hr/doctype/employee_separation/test_employee_separation.py index c7068dd78d0..f83c1e57b85 100644 --- a/erpnext/hr/doctype/employee_separation/test_employee_separation.py +++ b/erpnext/hr/doctype/employee_separation/test_employee_separation.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/employee_separation_template/employee_separation_template.py b/erpnext/hr/doctype/employee_separation_template/employee_separation_template.py index 7a263dcac10..70b84b1755d 100644 --- a/erpnext/hr/doctype/employee_separation_template/employee_separation_template.py +++ b/erpnext/hr/doctype/employee_separation_template/employee_separation_template.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/employee_separation_template/employee_separation_template_dashboard.py b/erpnext/hr/doctype/employee_separation_template/employee_separation_template_dashboard.py index 970ba26d794..f165d0a0eb4 100644 --- a/erpnext/hr/doctype/employee_separation_template/employee_separation_template_dashboard.py +++ b/erpnext/hr/doctype/employee_separation_template/employee_separation_template_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/employee_separation_template/test_employee_separation_template.py b/erpnext/hr/doctype/employee_separation_template/test_employee_separation_template.py index 4c91a791038..6a0c9479db6 100644 --- a/erpnext/hr/doctype/employee_separation_template/test_employee_separation_template.py +++ b/erpnext/hr/doctype/employee_separation_template/test_employee_separation_template.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/employee_skill/employee_skill.py b/erpnext/hr/doctype/employee_skill/employee_skill.py index 6f860c6c599..13bee342532 100644 --- a/erpnext/hr/doctype/employee_skill/employee_skill.py +++ b/erpnext/hr/doctype/employee_skill/employee_skill.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/hr/doctype/employee_skill_map/employee_skill_map.py b/erpnext/hr/doctype/employee_skill_map/employee_skill_map.py index d93c22f2ab8..ea7da9edf9c 100644 --- a/erpnext/hr/doctype/employee_skill_map/employee_skill_map.py +++ b/erpnext/hr/doctype/employee_skill_map/employee_skill_map.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/hr/doctype/employee_training/employee_training.py b/erpnext/hr/doctype/employee_training/employee_training.py index 068116a77f6..cd92dd609f9 100644 --- a/erpnext/hr/doctype/employee_training/employee_training.py +++ b/erpnext/hr/doctype/employee_training/employee_training.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/hr/doctype/employee_transfer/employee_transfer.py b/erpnext/hr/doctype/employee_transfer/employee_transfer.py index 29d93f348cc..f927d413ae3 100644 --- a/erpnext/hr/doctype/employee_transfer/employee_transfer.py +++ b/erpnext/hr/doctype/employee_transfer/employee_transfer.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/employee_transfer/test_employee_transfer.py b/erpnext/hr/doctype/employee_transfer/test_employee_transfer.py index c0440d09e74..287dfba35b3 100644 --- a/erpnext/hr/doctype/employee_transfer/test_employee_transfer.py +++ b/erpnext/hr/doctype/employee_transfer/test_employee_transfer.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest from datetime import date diff --git a/erpnext/hr/doctype/employee_transfer_property/employee_transfer_property.py b/erpnext/hr/doctype/employee_transfer_property/employee_transfer_property.py index f67fd7c6564..76e200602f5 100644 --- a/erpnext/hr/doctype/employee_transfer_property/employee_transfer_property.py +++ b/erpnext/hr/doctype/employee_transfer_property/employee_transfer_property.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/employee_transfer_property/test_employee_transfer_property.py b/erpnext/hr/doctype/employee_transfer_property/test_employee_transfer_property.py index 287dac66f10..981d46f57d2 100644 --- a/erpnext/hr/doctype/employee_transfer_property/test_employee_transfer_property.py +++ b/erpnext/hr/doctype/employee_transfer_property/test_employee_transfer_property.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/employment_type/__init__.py b/erpnext/hr/doctype/employment_type/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/employment_type/__init__.py +++ b/erpnext/hr/doctype/employment_type/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/employment_type/employment_type.py b/erpnext/hr/doctype/employment_type/employment_type.py index e2a55570fd9..b2262c0c585 100644 --- a/erpnext/hr/doctype/employment_type/employment_type.py +++ b/erpnext/hr/doctype/employment_type/employment_type.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/employment_type/test_employment_type.py b/erpnext/hr/doctype/employment_type/test_employment_type.py index 2ba4e8c1a46..c43f9636c70 100644 --- a/erpnext/hr/doctype/employment_type/test_employment_type.py +++ b/erpnext/hr/doctype/employment_type/test_employment_type.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/hr/doctype/expected_skill_set/expected_skill_set.py b/erpnext/hr/doctype/expected_skill_set/expected_skill_set.py index 27120c1fb37..0062ba91a19 100644 --- a/erpnext/hr/doctype/expected_skill_set/expected_skill_set.py +++ b/erpnext/hr/doctype/expected_skill_set/expected_skill_set.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/hr/doctype/expense_claim/__init__.py b/erpnext/hr/doctype/expense_claim/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/expense_claim/__init__.py +++ b/erpnext/hr/doctype/expense_claim/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.py b/erpnext/hr/doctype/expense_claim/expense_claim.py index d785db7872c..7e3898b7d51 100644 --- a/erpnext/hr/doctype/expense_claim/expense_claim.py +++ b/erpnext/hr/doctype/expense_claim/expense_claim.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/expense_claim/expense_claim_dashboard.py b/erpnext/hr/doctype/expense_claim/expense_claim_dashboard.py index a5682dc1e95..44052cc8e6b 100644 --- a/erpnext/hr/doctype/expense_claim/expense_claim_dashboard.py +++ b/erpnext/hr/doctype/expense_claim/expense_claim_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/hr/doctype/expense_claim/test_expense_claim.py b/erpnext/hr/doctype/expense_claim/test_expense_claim.py index 941fd58c7b5..ec703614c82 100644 --- a/erpnext/hr/doctype/expense_claim/test_expense_claim.py +++ b/erpnext/hr/doctype/expense_claim/test_expense_claim.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/expense_claim_account/expense_claim_account.py b/erpnext/hr/doctype/expense_claim_account/expense_claim_account.py index a982002ebb4..0d46a226080 100644 --- a/erpnext/hr/doctype/expense_claim_account/expense_claim_account.py +++ b/erpnext/hr/doctype/expense_claim_account/expense_claim_account.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/expense_claim_advance/expense_claim_advance.py b/erpnext/hr/doctype/expense_claim_advance/expense_claim_advance.py index 5607f41d917..68b2963f2bc 100644 --- a/erpnext/hr/doctype/expense_claim_advance/expense_claim_advance.py +++ b/erpnext/hr/doctype/expense_claim_advance/expense_claim_advance.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/expense_claim_detail/__init__.py b/erpnext/hr/doctype/expense_claim_detail/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/expense_claim_detail/__init__.py +++ b/erpnext/hr/doctype/expense_claim_detail/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/expense_claim_detail/expense_claim_detail.py b/erpnext/hr/doctype/expense_claim_detail/expense_claim_detail.py index 019e9f4dfe2..f58f1287cbe 100644 --- a/erpnext/hr/doctype/expense_claim_detail/expense_claim_detail.py +++ b/erpnext/hr/doctype/expense_claim_detail/expense_claim_detail.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/expense_claim_type/__init__.py b/erpnext/hr/doctype/expense_claim_type/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/expense_claim_type/__init__.py +++ b/erpnext/hr/doctype/expense_claim_type/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/expense_claim_type/expense_claim_type.py b/erpnext/hr/doctype/expense_claim_type/expense_claim_type.py index 101461c54b1..570b2c115fa 100644 --- a/erpnext/hr/doctype/expense_claim_type/expense_claim_type.py +++ b/erpnext/hr/doctype/expense_claim_type/expense_claim_type.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/expense_claim_type/test_expense_claim_type.py b/erpnext/hr/doctype/expense_claim_type/test_expense_claim_type.py index f0c900e6ef0..a2403b6eb8f 100644 --- a/erpnext/hr/doctype/expense_claim_type/test_expense_claim_type.py +++ b/erpnext/hr/doctype/expense_claim_type/test_expense_claim_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/expense_taxes_and_charges/expense_taxes_and_charges.py b/erpnext/hr/doctype/expense_taxes_and_charges/expense_taxes_and_charges.py index 596e8c719a4..a28ef57b3fe 100644 --- a/erpnext/hr/doctype/expense_taxes_and_charges/expense_taxes_and_charges.py +++ b/erpnext/hr/doctype/expense_taxes_and_charges/expense_taxes_and_charges.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/hr/doctype/holiday/__init__.py b/erpnext/hr/doctype/holiday/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/holiday/__init__.py +++ b/erpnext/hr/doctype/holiday/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/holiday/holiday.py b/erpnext/hr/doctype/holiday/holiday.py index fbfe7563aa2..85ca0b74fc7 100644 --- a/erpnext/hr/doctype/holiday/holiday.py +++ b/erpnext/hr/doctype/holiday/holiday.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/holiday_list/__init__.py b/erpnext/hr/doctype/holiday_list/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/holiday_list/__init__.py +++ b/erpnext/hr/doctype/holiday_list/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/holiday_list/holiday_list.py b/erpnext/hr/doctype/holiday_list/holiday_list.py index 7d1b9916421..a8c8c16d0d2 100644 --- a/erpnext/hr/doctype/holiday_list/holiday_list.py +++ b/erpnext/hr/doctype/holiday_list/holiday_list.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py b/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py index bbba36af875..e074e266b87 100644 --- a/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py +++ b/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/holiday_list/test_holiday_list.py b/erpnext/hr/doctype/holiday_list/test_holiday_list.py index 27131932db4..c9239edb720 100644 --- a/erpnext/hr/doctype/holiday_list/test_holiday_list.py +++ b/erpnext/hr/doctype/holiday_list/test_holiday_list.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest from datetime import timedelta diff --git a/erpnext/hr/doctype/hr_settings/test_hr_settings.py b/erpnext/hr/doctype/hr_settings/test_hr_settings.py index 69a060a90f9..7e13213ff32 100644 --- a/erpnext/hr/doctype/hr_settings/test_hr_settings.py +++ b/erpnext/hr/doctype/hr_settings/test_hr_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/identification_document_type/identification_document_type.py b/erpnext/hr/doctype/identification_document_type/identification_document_type.py index 862cd374fb4..3bfcfaadcc8 100644 --- a/erpnext/hr/doctype/identification_document_type/identification_document_type.py +++ b/erpnext/hr/doctype/identification_document_type/identification_document_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/identification_document_type/test_identification_document_type.py b/erpnext/hr/doctype/identification_document_type/test_identification_document_type.py index 87f302450db..3e8f7ab0d6d 100644 --- a/erpnext/hr/doctype/identification_document_type/test_identification_document_type.py +++ b/erpnext/hr/doctype/identification_document_type/test_identification_document_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/interest/interest.py b/erpnext/hr/doctype/interest/interest.py index 1b8f49f9585..3563f7f3a0a 100644 --- a/erpnext/hr/doctype/interest/interest.py +++ b/erpnext/hr/doctype/interest/interest.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/interest/test_interest.py b/erpnext/hr/doctype/interest/test_interest.py index f3727bee0b0..d4ecd9b841e 100644 --- a/erpnext/hr/doctype/interest/test_interest.py +++ b/erpnext/hr/doctype/interest/test_interest.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/interview/interview.py b/erpnext/hr/doctype/interview/interview.py index 955acca631d..f5312476a28 100644 --- a/erpnext/hr/doctype/interview/interview.py +++ b/erpnext/hr/doctype/interview/interview.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import datetime diff --git a/erpnext/hr/doctype/interview/test_interview.py b/erpnext/hr/doctype/interview/test_interview.py index 4612e17db03..1a2257a6d90 100644 --- a/erpnext/hr/doctype/interview/test_interview.py +++ b/erpnext/hr/doctype/interview/test_interview.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import datetime import os diff --git a/erpnext/hr/doctype/interview_detail/interview_detail.py b/erpnext/hr/doctype/interview_detail/interview_detail.py index 8be3d34fad3..d44e29a9c1d 100644 --- a/erpnext/hr/doctype/interview_detail/interview_detail.py +++ b/erpnext/hr/doctype/interview_detail/interview_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/hr/doctype/interview_detail/test_interview_detail.py b/erpnext/hr/doctype/interview_detail/test_interview_detail.py index a29dffff779..68a1f724851 100644 --- a/erpnext/hr/doctype/interview_detail/test_interview_detail.py +++ b/erpnext/hr/doctype/interview_detail/test_interview_detail.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/hr/doctype/interview_feedback/interview_feedback.py b/erpnext/hr/doctype/interview_feedback/interview_feedback.py index 1c5a4948f24..d046458f196 100644 --- a/erpnext/hr/doctype/interview_feedback/interview_feedback.py +++ b/erpnext/hr/doctype/interview_feedback/interview_feedback.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/interview_feedback/test_interview_feedback.py b/erpnext/hr/doctype/interview_feedback/test_interview_feedback.py index c4b7981833b..4185f2827a5 100644 --- a/erpnext/hr/doctype/interview_feedback/test_interview_feedback.py +++ b/erpnext/hr/doctype/interview_feedback/test_interview_feedback.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/interview_round/interview_round.py b/erpnext/hr/doctype/interview_round/interview_round.py index 8230c785852..0f442c320ad 100644 --- a/erpnext/hr/doctype/interview_round/interview_round.py +++ b/erpnext/hr/doctype/interview_round/interview_round.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/hr/doctype/interview_round/test_interview_round.py b/erpnext/hr/doctype/interview_round/test_interview_round.py index 932d3defc2c..dcec9419c07 100644 --- a/erpnext/hr/doctype/interview_round/test_interview_round.py +++ b/erpnext/hr/doctype/interview_round/test_interview_round.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/interview_type/interview_type.py b/erpnext/hr/doctype/interview_type/interview_type.py index ee5be54c755..f5ebda427b8 100644 --- a/erpnext/hr/doctype/interview_type/interview_type.py +++ b/erpnext/hr/doctype/interview_type/interview_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/hr/doctype/interview_type/test_interview_type.py b/erpnext/hr/doctype/interview_type/test_interview_type.py index a5d3cf99229..96fdfcad686 100644 --- a/erpnext/hr/doctype/interview_type/test_interview_type.py +++ b/erpnext/hr/doctype/interview_type/test_interview_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/hr/doctype/interviewer/interviewer.py b/erpnext/hr/doctype/interviewer/interviewer.py index 1c8dbbed591..2dc4a143254 100644 --- a/erpnext/hr/doctype/interviewer/interviewer.py +++ b/erpnext/hr/doctype/interviewer/interviewer.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/hr/doctype/job_applicant/job_applicant.py b/erpnext/hr/doctype/job_applicant/job_applicant.py index 151f49248fd..f0b470b35e8 100644 --- a/erpnext/hr/doctype/job_applicant/job_applicant.py +++ b/erpnext/hr/doctype/job_applicant/job_applicant.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/job_applicant/job_applicant_dashboard.py b/erpnext/hr/doctype/job_applicant/job_applicant_dashboard.py index 2f7795fc089..9406fc54855 100644 --- a/erpnext/hr/doctype/job_applicant/job_applicant_dashboard.py +++ b/erpnext/hr/doctype/job_applicant/job_applicant_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/job_applicant/test_job_applicant.py b/erpnext/hr/doctype/job_applicant/test_job_applicant.py index 8fc12907421..36dcf6b0740 100644 --- a/erpnext/hr/doctype/job_applicant/test_job_applicant.py +++ b/erpnext/hr/doctype/job_applicant/test_job_applicant.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/job_applicant_source/job_applicant_source.py b/erpnext/hr/doctype/job_applicant_source/job_applicant_source.py index 9139584aa5c..1f208c14c60 100644 --- a/erpnext/hr/doctype/job_applicant_source/job_applicant_source.py +++ b/erpnext/hr/doctype/job_applicant_source/job_applicant_source.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/job_applicant_source/test_job_applicant_source.py b/erpnext/hr/doctype/job_applicant_source/test_job_applicant_source.py index 0c29124560b..cee5daf783e 100644 --- a/erpnext/hr/doctype/job_applicant_source/test_job_applicant_source.py +++ b/erpnext/hr/doctype/job_applicant_source/test_job_applicant_source.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/job_offer/job_offer.py b/erpnext/hr/doctype/job_offer/job_offer.py index 07a7809891d..39f471929b4 100644 --- a/erpnext/hr/doctype/job_offer/job_offer.py +++ b/erpnext/hr/doctype/job_offer/job_offer.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/job_offer/test_job_offer.py b/erpnext/hr/doctype/job_offer/test_job_offer.py index 162b245d13c..d94e03ca63f 100644 --- a/erpnext/hr/doctype/job_offer/test_job_offer.py +++ b/erpnext/hr/doctype/job_offer/test_job_offer.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/job_offer_term/job_offer_term.py b/erpnext/hr/doctype/job_offer_term/job_offer_term.py index 573cc6ae21d..d2eae467e41 100644 --- a/erpnext/hr/doctype/job_offer_term/job_offer_term.py +++ b/erpnext/hr/doctype/job_offer_term/job_offer_term.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/job_opening/job_opening.py b/erpnext/hr/doctype/job_opening/job_opening.py index 38d9a718170..d53daf17d87 100644 --- a/erpnext/hr/doctype/job_opening/job_opening.py +++ b/erpnext/hr/doctype/job_opening/job_opening.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/job_opening/job_opening_dashboard.py b/erpnext/hr/doctype/job_opening/job_opening_dashboard.py index a13e2a7c23a..817969004f9 100644 --- a/erpnext/hr/doctype/job_opening/job_opening_dashboard.py +++ b/erpnext/hr/doctype/job_opening/job_opening_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/job_opening/test_job_opening.py b/erpnext/hr/doctype/job_opening/test_job_opening.py index a66975c91ed..a1c3a1d49e3 100644 --- a/erpnext/hr/doctype/job_opening/test_job_opening.py +++ b/erpnext/hr/doctype/job_opening/test_job_opening.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/leave_allocation/__init__.py b/erpnext/hr/doctype/leave_allocation/__init__.py index baffc488252..e69de29bb2d 100755 --- a/erpnext/hr/doctype/leave_allocation/__init__.py +++ b/erpnext/hr/doctype/leave_allocation/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.py b/erpnext/hr/doctype/leave_allocation/leave_allocation.py index e4886d7ae72..232118fd67c 100755 --- a/erpnext/hr/doctype/leave_allocation/leave_allocation.py +++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation_dashboard.py b/erpnext/hr/doctype/leave_allocation/leave_allocation_dashboard.py index 84423bd2b45..08861b8bce3 100644 --- a/erpnext/hr/doctype/leave_allocation/leave_allocation_dashboard.py +++ b/erpnext/hr/doctype/leave_allocation/leave_allocation_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/leave_allocation/test_leave_allocation.py b/erpnext/hr/doctype/leave_allocation/test_leave_allocation.py index b1850562e3a..f6165b3a6f1 100644 --- a/erpnext/hr/doctype/leave_allocation/test_leave_allocation.py +++ b/erpnext/hr/doctype/leave_allocation/test_leave_allocation.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/leave_application/__init__.py b/erpnext/hr/doctype/leave_application/__init__.py index baffc488252..e69de29bb2d 100755 --- a/erpnext/hr/doctype/leave_application/__init__.py +++ b/erpnext/hr/doctype/leave_application/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py index 349ed7ad227..1dc5b31461e 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.py +++ b/erpnext/hr/doctype/leave_application/leave_application.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/leave_application/leave_application_dashboard.py b/erpnext/hr/doctype/leave_application/leave_application_dashboard.py index c45717f5870..d56133b5660 100644 --- a/erpnext/hr/doctype/leave_application/leave_application_dashboard.py +++ b/erpnext/hr/doctype/leave_application/leave_application_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/hr/doctype/leave_application/test_leave_application.py b/erpnext/hr/doctype/leave_application/test_leave_application.py index 629b20e768e..f73d3e52da1 100644 --- a/erpnext/hr/doctype/leave_application/test_leave_application.py +++ b/erpnext/hr/doctype/leave_application/test_leave_application.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/leave_block_list/leave_block_list.py b/erpnext/hr/doctype/leave_block_list/leave_block_list.py index 9ba079c6e1f..d6b77f984cf 100644 --- a/erpnext/hr/doctype/leave_block_list/leave_block_list.py +++ b/erpnext/hr/doctype/leave_block_list/leave_block_list.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/leave_block_list/leave_block_list_dashboard.py b/erpnext/hr/doctype/leave_block_list/leave_block_list_dashboard.py index 30e7572c383..f91a8fe5201 100644 --- a/erpnext/hr/doctype/leave_block_list/leave_block_list_dashboard.py +++ b/erpnext/hr/doctype/leave_block_list/leave_block_list_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/leave_block_list/test_leave_block_list.py b/erpnext/hr/doctype/leave_block_list/test_leave_block_list.py index dd90e4f9eea..afbabb66a4a 100644 --- a/erpnext/hr/doctype/leave_block_list/test_leave_block_list.py +++ b/erpnext/hr/doctype/leave_block_list/test_leave_block_list.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/leave_block_list_allow/leave_block_list_allow.py b/erpnext/hr/doctype/leave_block_list_allow/leave_block_list_allow.py index 2f648470f73..50dc125650b 100644 --- a/erpnext/hr/doctype/leave_block_list_allow/leave_block_list_allow.py +++ b/erpnext/hr/doctype/leave_block_list_allow/leave_block_list_allow.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/leave_block_list_date/leave_block_list_date.py b/erpnext/hr/doctype/leave_block_list_date/leave_block_list_date.py index 4a8f45dbcd1..36550ccd89d 100644 --- a/erpnext/hr/doctype/leave_block_list_date/leave_block_list_date.py +++ b/erpnext/hr/doctype/leave_block_list_date/leave_block_list_date.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/leave_control_panel/__init__.py b/erpnext/hr/doctype/leave_control_panel/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/leave_control_panel/__init__.py +++ b/erpnext/hr/doctype/leave_control_panel/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py index 681a5e27943..19f97b83d47 100644 --- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py +++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/hr/doctype/leave_control_panel/test_leave_control_panel.py b/erpnext/hr/doctype/leave_control_panel/test_leave_control_panel.py index f64b2334e86..d5a9bc04861 100644 --- a/erpnext/hr/doctype/leave_control_panel/test_leave_control_panel.py +++ b/erpnext/hr/doctype/leave_control_panel/test_leave_control_panel.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/leave_encashment/leave_encashment.py b/erpnext/hr/doctype/leave_encashment/leave_encashment.py index 7656abfa45e..8ef0e36fb8d 100644 --- a/erpnext/hr/doctype/leave_encashment/leave_encashment.py +++ b/erpnext/hr/doctype/leave_encashment/leave_encashment.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/leave_encashment/test_leave_encashment.py b/erpnext/hr/doctype/leave_encashment/test_leave_encashment.py index 762745b88f4..99a479d3e5c 100644 --- a/erpnext/hr/doctype/leave_encashment/test_leave_encashment.py +++ b/erpnext/hr/doctype/leave_encashment/test_leave_encashment.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/leave_ledger_entry/leave_ledger_entry.py b/erpnext/hr/doctype/leave_ledger_entry/leave_ledger_entry.py index 6cf96851556..5c5299ea7eb 100644 --- a/erpnext/hr/doctype/leave_ledger_entry/leave_ledger_entry.py +++ b/erpnext/hr/doctype/leave_ledger_entry/leave_ledger_entry.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/leave_ledger_entry/test_leave_ledger_entry.py b/erpnext/hr/doctype/leave_ledger_entry/test_leave_ledger_entry.py index 5fa419da43c..31211091831 100644 --- a/erpnext/hr/doctype/leave_ledger_entry/test_leave_ledger_entry.py +++ b/erpnext/hr/doctype/leave_ledger_entry/test_leave_ledger_entry.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/hr/doctype/leave_period/leave_period.py b/erpnext/hr/doctype/leave_period/leave_period.py index 143d23ab14b..b1cb6887d99 100644 --- a/erpnext/hr/doctype/leave_period/leave_period.py +++ b/erpnext/hr/doctype/leave_period/leave_period.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/leave_period/leave_period_dashboard.py b/erpnext/hr/doctype/leave_period/leave_period_dashboard.py index a64c63af867..fbe56e2b700 100644 --- a/erpnext/hr/doctype/leave_period/leave_period_dashboard.py +++ b/erpnext/hr/doctype/leave_period/leave_period_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/hr/doctype/leave_period/test_leave_period.py b/erpnext/hr/doctype/leave_period/test_leave_period.py index 5c5ae133a13..10936dddc98 100644 --- a/erpnext/hr/doctype/leave_period/test_leave_period.py +++ b/erpnext/hr/doctype/leave_period/test_leave_period.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/leave_policy/leave_policy.py b/erpnext/hr/doctype/leave_policy/leave_policy.py index b11459d8155..80450d5d6e0 100644 --- a/erpnext/hr/doctype/leave_policy/leave_policy.py +++ b/erpnext/hr/doctype/leave_policy/leave_policy.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py b/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py index 76f886c73eb..8311fd2f93e 100644 --- a/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py +++ b/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/hr/doctype/leave_policy/test_leave_policy.py b/erpnext/hr/doctype/leave_policy/test_leave_policy.py index b0743f535bf..3dbbef857ec 100644 --- a/erpnext/hr/doctype/leave_policy/test_leave_policy.py +++ b/erpnext/hr/doctype/leave_policy/test_leave_policy.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment.py b/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment.py index f62b3002194..2ffec79c697 100644 --- a/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment.py +++ b/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json from math import ceil diff --git a/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment_dashboard.py b/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment_dashboard.py index 79142a63429..ec6592cb72a 100644 --- a/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment_dashboard.py +++ b/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/hr/doctype/leave_policy_assignment/test_leave_policy_assignment.py b/erpnext/hr/doctype/leave_policy_assignment/test_leave_policy_assignment.py index cbb26a1e285..b1861ad4d8e 100644 --- a/erpnext/hr/doctype/leave_policy_assignment/test_leave_policy_assignment.py +++ b/erpnext/hr/doctype/leave_policy_assignment/test_leave_policy_assignment.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/leave_policy_detail/leave_policy_detail.py b/erpnext/hr/doctype/leave_policy_detail/leave_policy_detail.py index f889424ee51..8916d3d65af 100644 --- a/erpnext/hr/doctype/leave_policy_detail/leave_policy_detail.py +++ b/erpnext/hr/doctype/leave_policy_detail/leave_policy_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/leave_policy_detail/test_leave_policy_detail.py b/erpnext/hr/doctype/leave_policy_detail/test_leave_policy_detail.py index 4cf9db26a2d..aacf64fd69a 100644 --- a/erpnext/hr/doctype/leave_policy_detail/test_leave_policy_detail.py +++ b/erpnext/hr/doctype/leave_policy_detail/test_leave_policy_detail.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/leave_type/__init__.py b/erpnext/hr/doctype/leave_type/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/doctype/leave_type/__init__.py +++ b/erpnext/hr/doctype/leave_type/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/doctype/leave_type/leave_type.py b/erpnext/hr/doctype/leave_type/leave_type.py index 195c8587b97..4b59c2c09b4 100644 --- a/erpnext/hr/doctype/leave_type/leave_type.py +++ b/erpnext/hr/doctype/leave_type/leave_type.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/leave_type/leave_type_dashboard.py b/erpnext/hr/doctype/leave_type/leave_type_dashboard.py index 773d4e88beb..8dc9402d1eb 100644 --- a/erpnext/hr/doctype/leave_type/leave_type_dashboard.py +++ b/erpnext/hr/doctype/leave_type/leave_type_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/leave_type/test_leave_type.py b/erpnext/hr/doctype/leave_type/test_leave_type.py index ee8db743f2a..c1b64e99eff 100644 --- a/erpnext/hr/doctype/leave_type/test_leave_type.py +++ b/erpnext/hr/doctype/leave_type/test_leave_type.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/hr/doctype/offer_term/offer_term.py b/erpnext/hr/doctype/offer_term/offer_term.py index 5f8f591c97c..cee6c4518bc 100644 --- a/erpnext/hr/doctype/offer_term/offer_term.py +++ b/erpnext/hr/doctype/offer_term/offer_term.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/offer_term/test_offer_term.py b/erpnext/hr/doctype/offer_term/test_offer_term.py index ec7edd44c6f..2e5ed75438b 100644 --- a/erpnext/hr/doctype/offer_term/test_offer_term.py +++ b/erpnext/hr/doctype/offer_term/test_offer_term.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/purpose_of_travel/purpose_of_travel.py b/erpnext/hr/doctype/purpose_of_travel/purpose_of_travel.py index f66fd276a56..c9d6e713fe1 100644 --- a/erpnext/hr/doctype/purpose_of_travel/purpose_of_travel.py +++ b/erpnext/hr/doctype/purpose_of_travel/purpose_of_travel.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/purpose_of_travel/test_purpose_of_travel.py b/erpnext/hr/doctype/purpose_of_travel/test_purpose_of_travel.py index b33f389a48b..354663b78b7 100644 --- a/erpnext/hr/doctype/purpose_of_travel/test_purpose_of_travel.py +++ b/erpnext/hr/doctype/purpose_of_travel/test_purpose_of_travel.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/shift_assignment/shift_assignment.py b/erpnext/hr/doctype/shift_assignment/shift_assignment.py index 05b74a0dde9..4e829a3dbd3 100644 --- a/erpnext/hr/doctype/shift_assignment/shift_assignment.py +++ b/erpnext/hr/doctype/shift_assignment/shift_assignment.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from datetime import datetime, timedelta diff --git a/erpnext/hr/doctype/shift_assignment/test_shift_assignment.py b/erpnext/hr/doctype/shift_assignment/test_shift_assignment.py index 84003e2ec28..d4900814ffe 100644 --- a/erpnext/hr/doctype/shift_assignment/test_shift_assignment.py +++ b/erpnext/hr/doctype/shift_assignment/test_shift_assignment.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/shift_request/shift_request.py b/erpnext/hr/doctype/shift_request/shift_request.py index a6ac7c83aeb..d4fcf99d7d8 100644 --- a/erpnext/hr/doctype/shift_request/shift_request.py +++ b/erpnext/hr/doctype/shift_request/shift_request.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/shift_request/shift_request_dashboard.py b/erpnext/hr/doctype/shift_request/shift_request_dashboard.py index 3ceafc0cefe..cd4519e8797 100644 --- a/erpnext/hr/doctype/shift_request/shift_request_dashboard.py +++ b/erpnext/hr/doctype/shift_request/shift_request_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/shift_request/test_shift_request.py b/erpnext/hr/doctype/shift_request/test_shift_request.py index 7b4a3ca5aab..3633c9b3003 100644 --- a/erpnext/hr/doctype/shift_request/test_shift_request.py +++ b/erpnext/hr/doctype/shift_request/test_shift_request.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/shift_type/shift_type.py b/erpnext/hr/doctype/shift_type/shift_type.py index 7a35b28ac43..562a5739d67 100644 --- a/erpnext/hr/doctype/shift_type/shift_type.py +++ b/erpnext/hr/doctype/shift_type/shift_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import itertools from datetime import timedelta diff --git a/erpnext/hr/doctype/shift_type/shift_type_dashboard.py b/erpnext/hr/doctype/shift_type/shift_type_dashboard.py index b78c69a2a1e..b523f0e01ce 100644 --- a/erpnext/hr/doctype/shift_type/shift_type_dashboard.py +++ b/erpnext/hr/doctype/shift_type/shift_type_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/shift_type/test_shift_type.py b/erpnext/hr/doctype/shift_type/test_shift_type.py index 699030f2196..7d2f29cd6cc 100644 --- a/erpnext/hr/doctype/shift_type/test_shift_type.py +++ b/erpnext/hr/doctype/shift_type/test_shift_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/skill/skill.py b/erpnext/hr/doctype/skill/skill.py index ebaa410fbdd..d26e7ca4909 100644 --- a/erpnext/hr/doctype/skill/skill.py +++ b/erpnext/hr/doctype/skill/skill.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/hr/doctype/skill_assessment/skill_assessment.py b/erpnext/hr/doctype/skill_assessment/skill_assessment.py index 3b74c4ed5f9..13775be6bd2 100644 --- a/erpnext/hr/doctype/skill_assessment/skill_assessment.py +++ b/erpnext/hr/doctype/skill_assessment/skill_assessment.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/hr/doctype/staffing_plan/staffing_plan.py b/erpnext/hr/doctype/staffing_plan/staffing_plan.py index 93cd4e1f629..7b2ea215ad8 100644 --- a/erpnext/hr/doctype/staffing_plan/staffing_plan.py +++ b/erpnext/hr/doctype/staffing_plan/staffing_plan.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/staffing_plan/staffing_plan_dashboard.py b/erpnext/hr/doctype/staffing_plan/staffing_plan_dashboard.py index 24ae1223440..c04e5853a52 100644 --- a/erpnext/hr/doctype/staffing_plan/staffing_plan_dashboard.py +++ b/erpnext/hr/doctype/staffing_plan/staffing_plan_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/staffing_plan/test_staffing_plan.py b/erpnext/hr/doctype/staffing_plan/test_staffing_plan.py index 4517cba2335..8ff0dbbc28e 100644 --- a/erpnext/hr/doctype/staffing_plan/test_staffing_plan.py +++ b/erpnext/hr/doctype/staffing_plan/test_staffing_plan.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/staffing_plan_detail/staffing_plan_detail.py b/erpnext/hr/doctype/staffing_plan_detail/staffing_plan_detail.py index ea89df3ba6e..67496909348 100644 --- a/erpnext/hr/doctype/staffing_plan_detail/staffing_plan_detail.py +++ b/erpnext/hr/doctype/staffing_plan_detail/staffing_plan_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/training_event/test_training_event.py b/erpnext/hr/doctype/training_event/test_training_event.py index ed44fa60704..f4329c9fe70 100644 --- a/erpnext/hr/doctype/training_event/test_training_event.py +++ b/erpnext/hr/doctype/training_event/test_training_event.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/training_event/training_event.py b/erpnext/hr/doctype/training_event/training_event.py index 9b01d3d9026..c8c8bbe7339 100644 --- a/erpnext/hr/doctype/training_event/training_event.py +++ b/erpnext/hr/doctype/training_event/training_event.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/training_event/training_event_dashboard.py b/erpnext/hr/doctype/training_event/training_event_dashboard.py index a917c8744f7..8c4162d5010 100644 --- a/erpnext/hr/doctype/training_event/training_event_dashboard.py +++ b/erpnext/hr/doctype/training_event/training_event_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/hr/doctype/training_event_employee/training_event_employee.py b/erpnext/hr/doctype/training_event_employee/training_event_employee.py index 089235507a2..5dce6e17c06 100644 --- a/erpnext/hr/doctype/training_event_employee/training_event_employee.py +++ b/erpnext/hr/doctype/training_event_employee/training_event_employee.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/training_feedback/test_training_feedback.py b/erpnext/hr/doctype/training_feedback/test_training_feedback.py index a9bf6d6bbde..58ed6231003 100644 --- a/erpnext/hr/doctype/training_feedback/test_training_feedback.py +++ b/erpnext/hr/doctype/training_feedback/test_training_feedback.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/training_feedback/training_feedback.py b/erpnext/hr/doctype/training_feedback/training_feedback.py index 6a41a657cea..1f9ec3b0b8a 100644 --- a/erpnext/hr/doctype/training_feedback/training_feedback.py +++ b/erpnext/hr/doctype/training_feedback/training_feedback.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/training_program/test_training_program.py b/erpnext/hr/doctype/training_program/test_training_program.py index aec319f4077..5000705ab24 100644 --- a/erpnext/hr/doctype/training_program/test_training_program.py +++ b/erpnext/hr/doctype/training_program/test_training_program.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/training_program/training_program.py b/erpnext/hr/doctype/training_program/training_program.py index 6f3ab5a806f..96b2fd70023 100644 --- a/erpnext/hr/doctype/training_program/training_program.py +++ b/erpnext/hr/doctype/training_program/training_program.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/training_program/training_program_dashboard.py b/erpnext/hr/doctype/training_program/training_program_dashboard.py index b2eed6895ca..51137d162c7 100644 --- a/erpnext/hr/doctype/training_program/training_program_dashboard.py +++ b/erpnext/hr/doctype/training_program/training_program_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/hr/doctype/training_result/test_training_result.py b/erpnext/hr/doctype/training_result/test_training_result.py index 17ccc4b4eef..1735ff4e341 100644 --- a/erpnext/hr/doctype/training_result/test_training_result.py +++ b/erpnext/hr/doctype/training_result/test_training_result.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/training_result/training_result.py b/erpnext/hr/doctype/training_result/training_result.py index 9cfc5707cac..bb5c71e7a15 100644 --- a/erpnext/hr/doctype/training_result/training_result.py +++ b/erpnext/hr/doctype/training_result/training_result.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/training_result_employee/training_result_employee.py b/erpnext/hr/doctype/training_result_employee/training_result_employee.py index b0d4605910c..e048ff53410 100644 --- a/erpnext/hr/doctype/training_result_employee/training_result_employee.py +++ b/erpnext/hr/doctype/training_result_employee/training_result_employee.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/travel_itinerary/travel_itinerary.py b/erpnext/hr/doctype/travel_itinerary/travel_itinerary.py index 467ef16aaee..529909b0e00 100644 --- a/erpnext/hr/doctype/travel_itinerary/travel_itinerary.py +++ b/erpnext/hr/doctype/travel_itinerary/travel_itinerary.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/travel_request/test_travel_request.py b/erpnext/hr/doctype/travel_request/test_travel_request.py index 95bf8b9c8bc..e29a1ca648d 100644 --- a/erpnext/hr/doctype/travel_request/test_travel_request.py +++ b/erpnext/hr/doctype/travel_request/test_travel_request.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/travel_request/travel_request.py b/erpnext/hr/doctype/travel_request/travel_request.py index b10333fd2d6..02379c5334c 100644 --- a/erpnext/hr/doctype/travel_request/travel_request.py +++ b/erpnext/hr/doctype/travel_request/travel_request.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/travel_request_costing/travel_request_costing.py b/erpnext/hr/doctype/travel_request_costing/travel_request_costing.py index 9b38d888fcb..0d1a592c80e 100644 --- a/erpnext/hr/doctype/travel_request_costing/travel_request_costing.py +++ b/erpnext/hr/doctype/travel_request_costing/travel_request_costing.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/doctype/upload_attendance/test_upload_attendance.py b/erpnext/hr/doctype/upload_attendance/test_upload_attendance.py index e0a776c45d0..4c7bd805f98 100644 --- a/erpnext/hr/doctype/upload_attendance/test_upload_attendance.py +++ b/erpnext/hr/doctype/upload_attendance/test_upload_attendance.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/upload_attendance/upload_attendance.py b/erpnext/hr/doctype/upload_attendance/upload_attendance.py index 030ecec74f9..94eb3001009 100644 --- a/erpnext/hr/doctype/upload_attendance/upload_attendance.py +++ b/erpnext/hr/doctype/upload_attendance/upload_attendance.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/vehicle/test_vehicle.py b/erpnext/hr/doctype/vehicle/test_vehicle.py index 2bc94c65090..c5ea5a38c86 100644 --- a/erpnext/hr/doctype/vehicle/test_vehicle.py +++ b/erpnext/hr/doctype/vehicle/test_vehicle.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/vehicle/vehicle.py b/erpnext/hr/doctype/vehicle/vehicle.py index 2ff190426dd..946233b5481 100644 --- a/erpnext/hr/doctype/vehicle/vehicle.py +++ b/erpnext/hr/doctype/vehicle/vehicle.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/vehicle/vehicle_dashboard.py b/erpnext/hr/doctype/vehicle/vehicle_dashboard.py index 6a01bcffd50..bb38ab9d6b5 100644 --- a/erpnext/hr/doctype/vehicle/vehicle_dashboard.py +++ b/erpnext/hr/doctype/vehicle/vehicle_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/hr/doctype/vehicle_log/test_vehicle_log.py b/erpnext/hr/doctype/vehicle_log/test_vehicle_log.py index 1b0bfcb08f9..acd50f278cd 100644 --- a/erpnext/hr/doctype/vehicle_log/test_vehicle_log.py +++ b/erpnext/hr/doctype/vehicle_log/test_vehicle_log.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/doctype/vehicle_log/vehicle_log.py b/erpnext/hr/doctype/vehicle_log/vehicle_log.py index 73c848b0346..e414141efb5 100644 --- a/erpnext/hr/doctype/vehicle_log/vehicle_log.py +++ b/erpnext/hr/doctype/vehicle_log/vehicle_log.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/doctype/vehicle_service/vehicle_service.py b/erpnext/hr/doctype/vehicle_service/vehicle_service.py index bc93a97481d..fdd4e39dd85 100644 --- a/erpnext/hr/doctype/vehicle_service/vehicle_service.py +++ b/erpnext/hr/doctype/vehicle_service/vehicle_service.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/hr/notification/training_feedback/training_feedback.py b/erpnext/hr/notification/training_feedback/training_feedback.py index f57de916dd1..19b550feea7 100644 --- a/erpnext/hr/notification/training_feedback/training_feedback.py +++ b/erpnext/hr/notification/training_feedback/training_feedback.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_context(context): diff --git a/erpnext/hr/notification/training_scheduled/training_scheduled.py b/erpnext/hr/notification/training_scheduled/training_scheduled.py index f57de916dd1..19b550feea7 100644 --- a/erpnext/hr/notification/training_scheduled/training_scheduled.py +++ b/erpnext/hr/notification/training_scheduled/training_scheduled.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_context(context): diff --git a/erpnext/hr/page/__init__.py b/erpnext/hr/page/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/hr/page/__init__.py +++ b/erpnext/hr/page/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/hr/page/organizational_chart/organizational_chart.py b/erpnext/hr/page/organizational_chart/organizational_chart.py index 1baf805f4b9..01d95a7051a 100644 --- a/erpnext/hr/page/organizational_chart/organizational_chart.py +++ b/erpnext/hr/page/organizational_chart/organizational_chart.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/hr/page/team_updates/team_updates.py b/erpnext/hr/page/team_updates/team_updates.py index a5e7c44c31d..126ed898c97 100644 --- a/erpnext/hr/page/team_updates/team_updates.py +++ b/erpnext/hr/page/team_updates/team_updates.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from email_reply_parser import EmailReplyParser diff --git a/erpnext/hr/report/daily_work_summary_replies/daily_work_summary_replies.py b/erpnext/hr/report/daily_work_summary_replies/daily_work_summary_replies.py index 62ffb7d3445..63764bb8a9c 100644 --- a/erpnext/hr/report/daily_work_summary_replies/daily_work_summary_replies.py +++ b/erpnext/hr/report/daily_work_summary_replies/daily_work_summary_replies.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/report/employee_advance_summary/employee_advance_summary.py b/erpnext/hr/report/employee_advance_summary/employee_advance_summary.py index d0c295df9f1..62b83f26a61 100644 --- a/erpnext/hr/report/employee_advance_summary/employee_advance_summary.py +++ b/erpnext/hr/report/employee_advance_summary/employee_advance_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/hr/report/employee_analytics/employee_analytics.py b/erpnext/hr/report/employee_analytics/employee_analytics.py index 725c5a15713..3a75276cb07 100644 --- a/erpnext/hr/report/employee_analytics/employee_analytics.py +++ b/erpnext/hr/report/employee_analytics/employee_analytics.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/report/employee_birthday/employee_birthday.py b/erpnext/hr/report/employee_birthday/employee_birthday.py index b284e6babe6..cec5a48c199 100644 --- a/erpnext/hr/report/employee_birthday/employee_birthday.py +++ b/erpnext/hr/report/employee_birthday/employee_birthday.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py index d463b9b62a8..b375b18b079 100644 --- a/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py +++ b/erpnext/hr/report/employee_leave_balance/employee_leave_balance.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from itertools import groupby diff --git a/erpnext/hr/report/employee_leave_balance_summary/employee_leave_balance_summary.py b/erpnext/hr/report/employee_leave_balance_summary/employee_leave_balance_summary.py index bcbb066d9f1..71c18bb51ff 100644 --- a/erpnext/hr/report/employee_leave_balance_summary/employee_leave_balance_summary.py +++ b/erpnext/hr/report/employee_leave_balance_summary/employee_leave_balance_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/report/employees_working_on_a_holiday/employees_working_on_a_holiday.py b/erpnext/hr/report/employees_working_on_a_holiday/employees_working_on_a_holiday.py index 3a268821361..00a4a7c29f5 100644 --- a/erpnext/hr/report/employees_working_on_a_holiday/employees_working_on_a_holiday.py +++ b/erpnext/hr/report/employees_working_on_a_holiday/employees_working_on_a_holiday.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py index c6e6432d200..9a993e52e27 100644 --- a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py +++ b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from calendar import monthrange diff --git a/erpnext/hr/report/recruitment_analytics/recruitment_analytics.py b/erpnext/hr/report/recruitment_analytics/recruitment_analytics.py index c598e9e3730..6383a9bbac9 100644 --- a/erpnext/hr/report/recruitment_analytics/recruitment_analytics.py +++ b/erpnext/hr/report/recruitment_analytics/recruitment_analytics.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/report/vehicle_expenses/test_vehicle_expenses.py b/erpnext/hr/report/vehicle_expenses/test_vehicle_expenses.py index 2ba87efd9b2..8672e68cf4b 100644 --- a/erpnext/hr/report/vehicle_expenses/test_vehicle_expenses.py +++ b/erpnext/hr/report/vehicle_expenses/test_vehicle_expenses.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/hr/report/vehicle_expenses/vehicle_expenses.py b/erpnext/hr/report/vehicle_expenses/vehicle_expenses.py index 2be3565a059..17d1e9d46a0 100644 --- a/erpnext/hr/report/vehicle_expenses/vehicle_expenses.py +++ b/erpnext/hr/report/vehicle_expenses/vehicle_expenses.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/hr/web_form/job_application/job_application.py b/erpnext/hr/web_form/job_application/job_application.py index f57de916dd1..19b550feea7 100644 --- a/erpnext/hr/web_form/job_application/job_application.py +++ b/erpnext/hr/web_form/job_application/job_application.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_context(context): diff --git a/erpnext/loan_management/dashboard_chart_source/top_10_pledged_loan_securities/top_10_pledged_loan_securities.py b/erpnext/loan_management/dashboard_chart_source/top_10_pledged_loan_securities/top_10_pledged_loan_securities.py index 0911e8f49bb..9512c8fa195 100644 --- a/erpnext/loan_management/dashboard_chart_source/top_10_pledged_loan_securities/top_10_pledged_loan_securities.py +++ b/erpnext/loan_management/dashboard_chart_source/top_10_pledged_loan_securities/top_10_pledged_loan_securities.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.utils.dashboard import cache_source diff --git a/erpnext/loan_management/doctype/loan/loan.py b/erpnext/loan_management/doctype/loan/loan.py index 0f2c3cfdfc0..423807a9e2b 100644 --- a/erpnext/loan_management/doctype/loan/loan.py +++ b/erpnext/loan_management/doctype/loan/loan.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json import math diff --git a/erpnext/loan_management/doctype/loan/loan_dashboard.py b/erpnext/loan_management/doctype/loan/loan_dashboard.py index 28ccc03b684..0374eda4991 100644 --- a/erpnext/loan_management/doctype/loan/loan_dashboard.py +++ b/erpnext/loan_management/doctype/loan/loan_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/loan_management/doctype/loan/test_loan.py b/erpnext/loan_management/doctype/loan/test_loan.py index ec0aebbb8a4..c0f058feae6 100644 --- a/erpnext/loan_management/doctype/loan/test_loan.py +++ b/erpnext/loan_management/doctype/loan/test_loan.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/loan_management/doctype/loan_application/loan_application.py b/erpnext/loan_management/doctype/loan_application/loan_application.py index ede0467b0e7..d2eb53b10b7 100644 --- a/erpnext/loan_management/doctype/loan_application/loan_application.py +++ b/erpnext/loan_management/doctype/loan_application/loan_application.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json import math diff --git a/erpnext/loan_management/doctype/loan_application/loan_application_dashboard.py b/erpnext/loan_management/doctype/loan_application/loan_application_dashboard.py index 992d6699747..01ef9f9d78a 100644 --- a/erpnext/loan_management/doctype/loan_application/loan_application_dashboard.py +++ b/erpnext/loan_management/doctype/loan_application/loan_application_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/loan_management/doctype/loan_application/test_loan_application.py b/erpnext/loan_management/doctype/loan_application/test_loan_application.py index aefa08970a4..d367e92ac49 100644 --- a/erpnext/loan_management/doctype/loan_application/test_loan_application.py +++ b/erpnext/loan_management/doctype/loan_application/test_loan_application.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/loan_management/doctype/loan_disbursement/loan_disbursement.py b/erpnext/loan_management/doctype/loan_disbursement/loan_disbursement.py index 99f0d259246..93b4af92c76 100644 --- a/erpnext/loan_management/doctype/loan_disbursement/loan_disbursement.py +++ b/erpnext/loan_management/doctype/loan_disbursement/loan_disbursement.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/loan_management/doctype/loan_disbursement/test_loan_disbursement.py b/erpnext/loan_management/doctype/loan_disbursement/test_loan_disbursement.py index b17c9a177e0..94ec84ea5db 100644 --- a/erpnext/loan_management/doctype/loan_disbursement/test_loan_disbursement.py +++ b/erpnext/loan_management/doctype/loan_disbursement/test_loan_disbursement.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/loan_management/doctype/loan_interest_accrual/loan_interest_accrual.py b/erpnext/loan_management/doctype/loan_interest_accrual/loan_interest_accrual.py index 93513a83e7e..e945d4931e3 100644 --- a/erpnext/loan_management/doctype/loan_interest_accrual/loan_interest_accrual.py +++ b/erpnext/loan_management/doctype/loan_interest_accrual/loan_interest_accrual.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/loan_management/doctype/loan_interest_accrual/test_loan_interest_accrual.py b/erpnext/loan_management/doctype/loan_interest_accrual/test_loan_interest_accrual.py index 06b801e47c5..46aaaad9fd2 100644 --- a/erpnext/loan_management/doctype/loan_interest_accrual/test_loan_interest_accrual.py +++ b/erpnext/loan_management/doctype/loan_interest_accrual/test_loan_interest_accrual.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/loan_management/doctype/loan_repayment/loan_repayment.py b/erpnext/loan_management/doctype/loan_repayment/loan_repayment.py index 40bb581165b..42f9a2cc1d4 100644 --- a/erpnext/loan_management/doctype/loan_repayment/loan_repayment.py +++ b/erpnext/loan_management/doctype/loan_repayment/loan_repayment.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/loan_management/doctype/loan_repayment/test_loan_repayment.py b/erpnext/loan_management/doctype/loan_repayment/test_loan_repayment.py index c6ca630e599..98e5a0a6af3 100644 --- a/erpnext/loan_management/doctype/loan_repayment/test_loan_repayment.py +++ b/erpnext/loan_management/doctype/loan_repayment/test_loan_repayment.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/loan_management/doctype/loan_repayment_detail/loan_repayment_detail.py b/erpnext/loan_management/doctype/loan_repayment_detail/loan_repayment_detail.py index 495466c382e..495b6866615 100644 --- a/erpnext/loan_management/doctype/loan_repayment_detail/loan_repayment_detail.py +++ b/erpnext/loan_management/doctype/loan_repayment_detail/loan_repayment_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/loan_management/doctype/loan_security/loan_security.py b/erpnext/loan_management/doctype/loan_security/loan_security.py index 91cce67852a..8087fc50959 100644 --- a/erpnext/loan_management/doctype/loan_security/loan_security.py +++ b/erpnext/loan_management/doctype/loan_security/loan_security.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/loan_management/doctype/loan_security/loan_security_dashboard.py b/erpnext/loan_management/doctype/loan_security/loan_security_dashboard.py index 35f3ba6830f..8d5c525ac31 100644 --- a/erpnext/loan_management/doctype/loan_security/loan_security_dashboard.py +++ b/erpnext/loan_management/doctype/loan_security/loan_security_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/loan_management/doctype/loan_security/test_loan_security.py b/erpnext/loan_management/doctype/loan_security/test_loan_security.py index 910b658a93c..7e702ed2345 100644 --- a/erpnext/loan_management/doctype/loan_security/test_loan_security.py +++ b/erpnext/loan_management/doctype/loan_security/test_loan_security.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/loan_management/doctype/loan_security_pledge/loan_security_pledge.py b/erpnext/loan_management/doctype/loan_security_pledge/loan_security_pledge.py index eb6c79ec4fc..7d02645609b 100644 --- a/erpnext/loan_management/doctype/loan_security_pledge/loan_security_pledge.py +++ b/erpnext/loan_management/doctype/loan_security_pledge/loan_security_pledge.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/loan_management/doctype/loan_security_pledge/test_loan_security_pledge.py b/erpnext/loan_management/doctype/loan_security_pledge/test_loan_security_pledge.py index 41bc78ede48..b9d05c28586 100644 --- a/erpnext/loan_management/doctype/loan_security_pledge/test_loan_security_pledge.py +++ b/erpnext/loan_management/doctype/loan_security_pledge/test_loan_security_pledge.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/loan_management/doctype/loan_security_price/loan_security_price.py b/erpnext/loan_management/doctype/loan_security_price/loan_security_price.py index 6ede6a2739f..fca9dd6bcb9 100644 --- a/erpnext/loan_management/doctype/loan_security_price/loan_security_price.py +++ b/erpnext/loan_management/doctype/loan_security_price/loan_security_price.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/loan_management/doctype/loan_security_price/test_loan_security_price.py b/erpnext/loan_management/doctype/loan_security_price/test_loan_security_price.py index ac630868427..aa533d9cf40 100644 --- a/erpnext/loan_management/doctype/loan_security_price/test_loan_security_price.py +++ b/erpnext/loan_management/doctype/loan_security_price/test_loan_security_price.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/loan_management/doctype/loan_security_shortfall/loan_security_shortfall.py b/erpnext/loan_management/doctype/loan_security_shortfall/loan_security_shortfall.py index 5863c03f0f4..20e451b81ea 100644 --- a/erpnext/loan_management/doctype/loan_security_shortfall/loan_security_shortfall.py +++ b/erpnext/loan_management/doctype/loan_security_shortfall/loan_security_shortfall.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/loan_management/doctype/loan_security_shortfall/test_loan_security_shortfall.py b/erpnext/loan_management/doctype/loan_security_shortfall/test_loan_security_shortfall.py index fefec43bf41..58bf9744380 100644 --- a/erpnext/loan_management/doctype/loan_security_shortfall/test_loan_security_shortfall.py +++ b/erpnext/loan_management/doctype/loan_security_shortfall/test_loan_security_shortfall.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/loan_management/doctype/loan_security_type/loan_security_type.py b/erpnext/loan_management/doctype/loan_security_type/loan_security_type.py index ca1957fb3aa..af87259daf5 100644 --- a/erpnext/loan_management/doctype/loan_security_type/loan_security_type.py +++ b/erpnext/loan_management/doctype/loan_security_type/loan_security_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/loan_management/doctype/loan_security_type/loan_security_type_dashboard.py b/erpnext/loan_management/doctype/loan_security_type/loan_security_type_dashboard.py index 7a2732e3190..daa9958808f 100644 --- a/erpnext/loan_management/doctype/loan_security_type/loan_security_type_dashboard.py +++ b/erpnext/loan_management/doctype/loan_security_type/loan_security_type_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/loan_management/doctype/loan_security_type/test_loan_security_type.py b/erpnext/loan_management/doctype/loan_security_type/test_loan_security_type.py index 99d7aafb343..cf7a335a774 100644 --- a/erpnext/loan_management/doctype/loan_security_type/test_loan_security_type.py +++ b/erpnext/loan_management/doctype/loan_security_type/test_loan_security_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/loan_management/doctype/loan_security_unpledge/loan_security_unpledge.py b/erpnext/loan_management/doctype/loan_security_unpledge/loan_security_unpledge.py index 0af0de1a53a..8fce09ce0ab 100644 --- a/erpnext/loan_management/doctype/loan_security_unpledge/loan_security_unpledge.py +++ b/erpnext/loan_management/doctype/loan_security_unpledge/loan_security_unpledge.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/loan_management/doctype/loan_security_unpledge/test_loan_security_unpledge.py b/erpnext/loan_management/doctype/loan_security_unpledge/test_loan_security_unpledge.py index 17eb7c63c7a..2f124e4965f 100644 --- a/erpnext/loan_management/doctype/loan_security_unpledge/test_loan_security_unpledge.py +++ b/erpnext/loan_management/doctype/loan_security_unpledge/test_loan_security_unpledge.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/loan_management/doctype/loan_type/loan_type.py b/erpnext/loan_management/doctype/loan_type/loan_type.py index 5458d358f3b..592229cf994 100644 --- a/erpnext/loan_management/doctype/loan_type/loan_type.py +++ b/erpnext/loan_management/doctype/loan_type/loan_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/loan_management/doctype/loan_type/loan_type_dashboard.py b/erpnext/loan_management/doctype/loan_type/loan_type_dashboard.py index 96b2c4aedcf..19026da2f66 100644 --- a/erpnext/loan_management/doctype/loan_type/loan_type_dashboard.py +++ b/erpnext/loan_management/doctype/loan_type/loan_type_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/loan_management/doctype/loan_type/test_loan_type.py b/erpnext/loan_management/doctype/loan_type/test_loan_type.py index 9e57fdef2fa..e3b51e8f7d2 100644 --- a/erpnext/loan_management/doctype/loan_type/test_loan_type.py +++ b/erpnext/loan_management/doctype/loan_type/test_loan_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/loan_management/doctype/loan_write_off/loan_write_off.py b/erpnext/loan_management/doctype/loan_write_off/loan_write_off.py index 4d5e7df4de1..35be587f87f 100644 --- a/erpnext/loan_management/doctype/loan_write_off/loan_write_off.py +++ b/erpnext/loan_management/doctype/loan_write_off/loan_write_off.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/loan_management/doctype/loan_write_off/test_loan_write_off.py b/erpnext/loan_management/doctype/loan_write_off/test_loan_write_off.py index 57337c7e5d2..1494114afb3 100644 --- a/erpnext/loan_management/doctype/loan_write_off/test_loan_write_off.py +++ b/erpnext/loan_management/doctype/loan_write_off/test_loan_write_off.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/loan_management/doctype/pledge/pledge.py b/erpnext/loan_management/doctype/pledge/pledge.py index 5a41cde4b58..f02ed95275d 100644 --- a/erpnext/loan_management/doctype/pledge/pledge.py +++ b/erpnext/loan_management/doctype/pledge/pledge.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/loan_management/doctype/pledge/test_pledge.py b/erpnext/loan_management/doctype/pledge/test_pledge.py index adcbc6eae03..2d3fd320f5b 100644 --- a/erpnext/loan_management/doctype/pledge/test_pledge.py +++ b/erpnext/loan_management/doctype/pledge/test_pledge.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual.py b/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual.py index efee701dc04..4c34ccd983e 100644 --- a/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual.py +++ b/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual_dashboard.py b/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual_dashboard.py index fcd0399c6e9..4195960890c 100644 --- a/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual_dashboard.py +++ b/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/loan_management/doctype/process_loan_interest_accrual/test_process_loan_interest_accrual.py b/erpnext/loan_management/doctype/process_loan_interest_accrual/test_process_loan_interest_accrual.py index e7d360209ca..1fb8c2e9529 100644 --- a/erpnext/loan_management/doctype/process_loan_interest_accrual/test_process_loan_interest_accrual.py +++ b/erpnext/loan_management/doctype/process_loan_interest_accrual/test_process_loan_interest_accrual.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall.py b/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall.py index c3f59543c4e..ba9fb0c449f 100644 --- a/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall.py +++ b/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall_dashboard.py b/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall_dashboard.py index ced3bd7e4fb..fa9d18b6fab 100644 --- a/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall_dashboard.py +++ b/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/loan_management/doctype/process_loan_security_shortfall/test_process_loan_security_shortfall.py b/erpnext/loan_management/doctype/process_loan_security_shortfall/test_process_loan_security_shortfall.py index 50e0a46ee4f..c743cf05007 100644 --- a/erpnext/loan_management/doctype/process_loan_security_shortfall/test_process_loan_security_shortfall.py +++ b/erpnext/loan_management/doctype/process_loan_security_shortfall/test_process_loan_security_shortfall.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/loan_management/doctype/proposed_pledge/proposed_pledge.py b/erpnext/loan_management/doctype/proposed_pledge/proposed_pledge.py index 5c125e1307e..ac2b7d24012 100644 --- a/erpnext/loan_management/doctype/proposed_pledge/proposed_pledge.py +++ b/erpnext/loan_management/doctype/proposed_pledge/proposed_pledge.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/loan_management/doctype/repayment_schedule/repayment_schedule.py b/erpnext/loan_management/doctype/repayment_schedule/repayment_schedule.py index af9c6696aca..dc407e7d99f 100644 --- a/erpnext/loan_management/doctype/repayment_schedule/repayment_schedule.py +++ b/erpnext/loan_management/doctype/repayment_schedule/repayment_schedule.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/loan_management/doctype/salary_slip_loan/salary_slip_loan.py b/erpnext/loan_management/doctype/salary_slip_loan/salary_slip_loan.py index 64be1b2673e..91267b80ba1 100644 --- a/erpnext/loan_management/doctype/salary_slip_loan/salary_slip_loan.py +++ b/erpnext/loan_management/doctype/salary_slip_loan/salary_slip_loan.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/loan_management/doctype/sanctioned_loan_amount/sanctioned_loan_amount.py b/erpnext/loan_management/doctype/sanctioned_loan_amount/sanctioned_loan_amount.py index 5660c421022..6063b7bad8b 100644 --- a/erpnext/loan_management/doctype/sanctioned_loan_amount/sanctioned_loan_amount.py +++ b/erpnext/loan_management/doctype/sanctioned_loan_amount/sanctioned_loan_amount.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/loan_management/doctype/sanctioned_loan_amount/test_sanctioned_loan_amount.py b/erpnext/loan_management/doctype/sanctioned_loan_amount/test_sanctioned_loan_amount.py index 663f2e72beb..4d99086d612 100644 --- a/erpnext/loan_management/doctype/sanctioned_loan_amount/test_sanctioned_loan_amount.py +++ b/erpnext/loan_management/doctype/sanctioned_loan_amount/test_sanctioned_loan_amount.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/loan_management/doctype/unpledge/unpledge.py b/erpnext/loan_management/doctype/unpledge/unpledge.py index 2e82e239979..403749ba646 100644 --- a/erpnext/loan_management/doctype/unpledge/unpledge.py +++ b/erpnext/loan_management/doctype/unpledge/unpledge.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/loan_management/report/applicant_wise_loan_security_exposure/applicant_wise_loan_security_exposure.py b/erpnext/loan_management/report/applicant_wise_loan_security_exposure/applicant_wise_loan_security_exposure.py index ff527029f67..8ebca39061c 100644 --- a/erpnext/loan_management/report/applicant_wise_loan_security_exposure/applicant_wise_loan_security_exposure.py +++ b/erpnext/loan_management/report/applicant_wise_loan_security_exposure/applicant_wise_loan_security_exposure.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/loan_management/report/loan_interest_report/loan_interest_report.py b/erpnext/loan_management/report/loan_interest_report/loan_interest_report.py index c4adef1c7ba..7c512679567 100644 --- a/erpnext/loan_management/report/loan_interest_report/loan_interest_report.py +++ b/erpnext/loan_management/report/loan_interest_report/loan_interest_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/loan_management/report/loan_repayment_and_closure/loan_repayment_and_closure.py b/erpnext/loan_management/report/loan_repayment_and_closure/loan_repayment_and_closure.py index 9d8a425b30c..68fd3d8e8b5 100644 --- a/erpnext/loan_management/report/loan_repayment_and_closure/loan_repayment_and_closure.py +++ b/erpnext/loan_management/report/loan_repayment_and_closure/loan_repayment_and_closure.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/loan_management/report/loan_security_exposure/loan_security_exposure.py b/erpnext/loan_management/report/loan_security_exposure/loan_security_exposure.py index 3d6242a4fa1..e3d99952902 100644 --- a/erpnext/loan_management/report/loan_security_exposure/loan_security_exposure.py +++ b/erpnext/loan_management/report/loan_security_exposure/loan_security_exposure.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe import _ from frappe.utils import flt diff --git a/erpnext/loan_management/report/loan_security_status/loan_security_status.py b/erpnext/loan_management/report/loan_security_status/loan_security_status.py index a93a381eb3f..b7e716880e9 100644 --- a/erpnext/loan_management/report/loan_security_status/loan_security_status.py +++ b/erpnext/loan_management/report/loan_security_status/loan_security_status.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py index adb57f9f397..db126cde8e1 100644 --- a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py +++ b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, throw diff --git a/erpnext/maintenance/doctype/maintenance_schedule/test_maintenance_schedule.py b/erpnext/maintenance/doctype/maintenance_schedule/test_maintenance_schedule.py index 38654de6638..37ea3fdac30 100644 --- a/erpnext/maintenance/doctype/maintenance_schedule/test_maintenance_schedule.py +++ b/erpnext/maintenance/doctype/maintenance_schedule/test_maintenance_schedule.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.py b/erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.py index 27c95a1ea2b..cb20066da04 100644 --- a/erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.py +++ b/erpnext/maintenance/doctype/maintenance_schedule_detail/maintenance_schedule_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.py b/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.py index 9c4a690789d..b6ce0a50f17 100644 --- a/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.py +++ b/erpnext/maintenance/doctype/maintenance_schedule_item/maintenance_schedule_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.py b/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.py index 814ec0cae4b..5a87b162af6 100644 --- a/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.py +++ b/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/maintenance/doctype/maintenance_visit/test_maintenance_visit.py b/erpnext/maintenance/doctype/maintenance_visit/test_maintenance_visit.py index 57e728d1b13..a0c1a338e49 100644 --- a/erpnext/maintenance/doctype/maintenance_visit/test_maintenance_visit.py +++ b/erpnext/maintenance/doctype/maintenance_visit/test_maintenance_visit.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.py b/erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.py index 4c59562685d..50d9a4e08af 100644 --- a/erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.py +++ b/erpnext/maintenance/doctype/maintenance_visit_purpose/maintenance_visit_purpose.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/__init__.py b/erpnext/manufacturing/doctype/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/manufacturing/doctype/__init__.py +++ b/erpnext/manufacturing/doctype/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/manufacturing/doctype/blanket_order/blanket_order.py b/erpnext/manufacturing/doctype/blanket_order/blanket_order.py index 59eb168d4e4..5340c51131f 100644 --- a/erpnext/manufacturing/doctype/blanket_order/blanket_order.py +++ b/erpnext/manufacturing/doctype/blanket_order/blanket_order.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/manufacturing/doctype/blanket_order/blanket_order_dashboard.py b/erpnext/manufacturing/doctype/blanket_order/blanket_order_dashboard.py index 83260ec1b9f..2556f2f163d 100644 --- a/erpnext/manufacturing/doctype/blanket_order/blanket_order_dashboard.py +++ b/erpnext/manufacturing/doctype/blanket_order/blanket_order_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/manufacturing/doctype/blanket_order/test_blanket_order.py b/erpnext/manufacturing/doctype/blanket_order/test_blanket_order.py index 3104ae01177..d5db3fc1ccf 100644 --- a/erpnext/manufacturing/doctype/blanket_order/test_blanket_order.py +++ b/erpnext/manufacturing/doctype/blanket_order/test_blanket_order.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/manufacturing/doctype/blanket_order_item/blanket_order_item.py b/erpnext/manufacturing/doctype/blanket_order_item/blanket_order_item.py index 0825f763dcf..ebce209fbc2 100644 --- a/erpnext/manufacturing/doctype/blanket_order_item/blanket_order_item.py +++ b/erpnext/manufacturing/doctype/blanket_order_item/blanket_order_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/bom/__init__.py b/erpnext/manufacturing/doctype/bom/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/manufacturing/doctype/bom/__init__.py +++ b/erpnext/manufacturing/doctype/bom/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/manufacturing/doctype/bom/bom_dashboard.py b/erpnext/manufacturing/doctype/bom/bom_dashboard.py index f65df011a93..9b8f6bff095 100644 --- a/erpnext/manufacturing/doctype/bom/bom_dashboard.py +++ b/erpnext/manufacturing/doctype/bom/bom_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/manufacturing/doctype/bom_explosion_item/__init__.py b/erpnext/manufacturing/doctype/bom_explosion_item/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/manufacturing/doctype/bom_explosion_item/__init__.py +++ b/erpnext/manufacturing/doctype/bom_explosion_item/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.py b/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.py index 4317d3adf68..cbcba345bca 100644 --- a/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.py +++ b/erpnext/manufacturing/doctype/bom_explosion_item/bom_explosion_item.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/bom_item/__init__.py b/erpnext/manufacturing/doctype/bom_item/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/manufacturing/doctype/bom_item/__init__.py +++ b/erpnext/manufacturing/doctype/bom_item/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/manufacturing/doctype/bom_item/bom_item.py b/erpnext/manufacturing/doctype/bom_item/bom_item.py index 2954238a571..28a4b201444 100644 --- a/erpnext/manufacturing/doctype/bom_item/bom_item.py +++ b/erpnext/manufacturing/doctype/bom_item/bom_item.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/bom_operation/__init__.py b/erpnext/manufacturing/doctype/bom_operation/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/manufacturing/doctype/bom_operation/__init__.py +++ b/erpnext/manufacturing/doctype/bom_operation/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/manufacturing/doctype/bom_operation/bom_operation.py b/erpnext/manufacturing/doctype/bom_operation/bom_operation.py index 5e46c7ef932..0ddc280ac0e 100644 --- a/erpnext/manufacturing/doctype/bom_operation/bom_operation.py +++ b/erpnext/manufacturing/doctype/bom_operation/bom_operation.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/bom_scrap_item/bom_scrap_item.py b/erpnext/manufacturing/doctype/bom_scrap_item/bom_scrap_item.py index 891fc53c71e..f400303b95e 100644 --- a/erpnext/manufacturing/doctype/bom_scrap_item/bom_scrap_item.py +++ b/erpnext/manufacturing/doctype/bom_scrap_item/bom_scrap_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py b/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py index ed71c6d6d7b..f9c3b062179 100644 --- a/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py +++ b/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/manufacturing/doctype/bom_update_tool/test_bom_update_tool.py b/erpnext/manufacturing/doctype/bom_update_tool/test_bom_update_tool.py index 88c69ce2a5e..526c243ed78 100644 --- a/erpnext/manufacturing/doctype/bom_update_tool/test_bom_update_tool.py +++ b/erpnext/manufacturing/doctype/bom_update_tool/test_bom_update_tool.py @@ -2,7 +2,6 @@ # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.py b/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.py index f627b4e5283..33256a3b31d 100644 --- a/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.py +++ b/erpnext/manufacturing/doctype/bom_website_item/bom_website_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.py b/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.py index 5bd8cf568c7..f8e279287a6 100644 --- a/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.py +++ b/erpnext/manufacturing/doctype/bom_website_operation/bom_website_operation.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/downtime_entry/downtime_entry.py b/erpnext/manufacturing/doctype/downtime_entry/downtime_entry.py index 62833d7cd20..460281658a8 100644 --- a/erpnext/manufacturing/doctype/downtime_entry/downtime_entry.py +++ b/erpnext/manufacturing/doctype/downtime_entry/downtime_entry.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document from frappe.utils import time_diff_in_hours diff --git a/erpnext/manufacturing/doctype/downtime_entry/test_downtime_entry.py b/erpnext/manufacturing/doctype/downtime_entry/test_downtime_entry.py index 37169f4439a..2f99a5cd112 100644 --- a/erpnext/manufacturing/doctype/downtime_entry/test_downtime_entry.py +++ b/erpnext/manufacturing/doctype/downtime_entry/test_downtime_entry.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index b3b94071f0b..ff4feaa5dce 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt import datetime diff --git a/erpnext/manufacturing/doctype/job_card/job_card_dashboard.py b/erpnext/manufacturing/doctype/job_card/job_card_dashboard.py index 3ec6697b9f4..f8f6af34efc 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card_dashboard.py +++ b/erpnext/manufacturing/doctype/job_card/job_card_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/manufacturing/doctype/job_card/test_job_card.py b/erpnext/manufacturing/doctype/job_card/test_job_card.py index ea5d364a9ce..d7992833efe 100644 --- a/erpnext/manufacturing/doctype/job_card/test_job_card.py +++ b/erpnext/manufacturing/doctype/job_card/test_job_card.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt import unittest diff --git a/erpnext/manufacturing/doctype/job_card_item/job_card_item.py b/erpnext/manufacturing/doctype/job_card_item/job_card_item.py index a1338364aa4..51a7b41f0d9 100644 --- a/erpnext/manufacturing/doctype/job_card_item/job_card_item.py +++ b/erpnext/manufacturing/doctype/job_card_item/job_card_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/job_card_operation/job_card_operation.py b/erpnext/manufacturing/doctype/job_card_operation/job_card_operation.py index 43d14220649..de44071c6ad 100644 --- a/erpnext/manufacturing/doctype/job_card_operation/job_card_operation.py +++ b/erpnext/manufacturing/doctype/job_card_operation/job_card_operation.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/job_card_time_log/job_card_time_log.py b/erpnext/manufacturing/doctype/job_card_time_log/job_card_time_log.py index ed27e7ff824..2b3ead383a3 100644 --- a/erpnext/manufacturing/doctype/job_card_time_log/job_card_time_log.py +++ b/erpnext/manufacturing/doctype/job_card_time_log/job_card_time_log.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py index 18d78b59f53..c919e8bef1d 100644 --- a/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py +++ b/erpnext/manufacturing/doctype/manufacturing_settings/manufacturing_settings.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from dateutil.relativedelta import relativedelta diff --git a/erpnext/manufacturing/doctype/manufacturing_settings/test_manufacturing_settings.py b/erpnext/manufacturing/doctype/manufacturing_settings/test_manufacturing_settings.py index fd0ac725914..1b2f18fc7ba 100644 --- a/erpnext/manufacturing/doctype/manufacturing_settings/test_manufacturing_settings.py +++ b/erpnext/manufacturing/doctype/manufacturing_settings/test_manufacturing_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/manufacturing/doctype/material_request_plan_item/material_request_plan_item.py b/erpnext/manufacturing/doctype/material_request_plan_item/material_request_plan_item.py index bc26644067f..3d5a7ce3fe0 100644 --- a/erpnext/manufacturing/doctype/material_request_plan_item/material_request_plan_item.py +++ b/erpnext/manufacturing/doctype/material_request_plan_item/material_request_plan_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/material_request_plan_item/test_material_request_plan_item.py b/erpnext/manufacturing/doctype/material_request_plan_item/test_material_request_plan_item.py index 2675af94a72..0654c1ebbbc 100644 --- a/erpnext/manufacturing/doctype/material_request_plan_item/test_material_request_plan_item.py +++ b/erpnext/manufacturing/doctype/material_request_plan_item/test_material_request_plan_item.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/manufacturing/doctype/operation/operation.py b/erpnext/manufacturing/doctype/operation/operation.py index 2926f911ea1..41726f30cf5 100644 --- a/erpnext/manufacturing/doctype/operation/operation.py +++ b/erpnext/manufacturing/doctype/operation/operation.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/manufacturing/doctype/operation/operation_dashboard.py b/erpnext/manufacturing/doctype/operation/operation_dashboard.py index 284fd9dfc2f..076f6663bea 100644 --- a/erpnext/manufacturing/doctype/operation/operation_dashboard.py +++ b/erpnext/manufacturing/doctype/operation/operation_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/manufacturing/doctype/operation/test_operation.py b/erpnext/manufacturing/doctype/operation/test_operation.py index 2b24118fc41..804cc3fa0dd 100644 --- a/erpnext/manufacturing/doctype/operation/test_operation.py +++ b/erpnext/manufacturing/doctype/operation/test_operation.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index 2424ef9a71c..a63ed999e44 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import copy import json diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan_dashboard.py b/erpnext/manufacturing/doctype/production_plan/production_plan_dashboard.py index b4bc3467e46..ef009765f92 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan_dashboard.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/manufacturing/doctype/production_plan/test_production_plan.py b/erpnext/manufacturing/doctype/production_plan/test_production_plan.py index 707b3f62d4e..a2980a732ed 100644 --- a/erpnext/manufacturing/doctype/production_plan/test_production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/test_production_plan.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/manufacturing/doctype/production_plan_item/__init__.py b/erpnext/manufacturing/doctype/production_plan_item/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/manufacturing/doctype/production_plan_item/__init__.py +++ b/erpnext/manufacturing/doctype/production_plan_item/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/manufacturing/doctype/production_plan_item/production_plan_item.py b/erpnext/manufacturing/doctype/production_plan_item/production_plan_item.py index 24029d8f2ce..cc79ac327db 100644 --- a/erpnext/manufacturing/doctype/production_plan_item/production_plan_item.py +++ b/erpnext/manufacturing/doctype/production_plan_item/production_plan_item.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/production_plan_item_reference/production_plan_item_reference.py b/erpnext/manufacturing/doctype/production_plan_item_reference/production_plan_item_reference.py index 9d25d6fc20f..81d2ecad544 100644 --- a/erpnext/manufacturing/doctype/production_plan_item_reference/production_plan_item_reference.py +++ b/erpnext/manufacturing/doctype/production_plan_item_reference/production_plan_item_reference.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/production_plan_material_request/production_plan_material_request.py b/erpnext/manufacturing/doctype/production_plan_material_request/production_plan_material_request.py index d1d935c955b..83b17893c04 100644 --- a/erpnext/manufacturing/doctype/production_plan_material_request/production_plan_material_request.py +++ b/erpnext/manufacturing/doctype/production_plan_material_request/production_plan_material_request.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/production_plan_material_request_warehouse/production_plan_material_request_warehouse.py b/erpnext/manufacturing/doctype/production_plan_material_request_warehouse/production_plan_material_request_warehouse.py index 1548bd7b88a..a66ff44f558 100644 --- a/erpnext/manufacturing/doctype/production_plan_material_request_warehouse/production_plan_material_request_warehouse.py +++ b/erpnext/manufacturing/doctype/production_plan_material_request_warehouse/production_plan_material_request_warehouse.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/production_plan_material_request_warehouse/test_production_plan_material_request_warehouse.py b/erpnext/manufacturing/doctype/production_plan_material_request_warehouse/test_production_plan_material_request_warehouse.py index 905252da604..4394c142d49 100644 --- a/erpnext/manufacturing/doctype/production_plan_material_request_warehouse/test_production_plan_material_request_warehouse.py +++ b/erpnext/manufacturing/doctype/production_plan_material_request_warehouse/test_production_plan_material_request_warehouse.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/manufacturing/doctype/production_plan_sales_order/__init__.py b/erpnext/manufacturing/doctype/production_plan_sales_order/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/manufacturing/doctype/production_plan_sales_order/__init__.py +++ b/erpnext/manufacturing/doctype/production_plan_sales_order/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.py b/erpnext/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.py index ea53a986964..3f3852983ce 100644 --- a/erpnext/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.py +++ b/erpnext/manufacturing/doctype/production_plan_sales_order/production_plan_sales_order.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/production_plan_sub_assembly_item/production_plan_sub_assembly_item.py b/erpnext/manufacturing/doctype/production_plan_sub_assembly_item/production_plan_sub_assembly_item.py index be0ed1b96a8..069667a6410 100644 --- a/erpnext/manufacturing/doctype/production_plan_sub_assembly_item/production_plan_sub_assembly_item.py +++ b/erpnext/manufacturing/doctype/production_plan_sub_assembly_item/production_plan_sub_assembly_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/routing/routing.py b/erpnext/manufacturing/doctype/routing/routing.py index 20fb370d942..1c76634646d 100644 --- a/erpnext/manufacturing/doctype/routing/routing.py +++ b/erpnext/manufacturing/doctype/routing/routing.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/manufacturing/doctype/routing/routing_dashboard.py b/erpnext/manufacturing/doctype/routing/routing_dashboard.py index 9ef6ee57523..4bd4192de5d 100644 --- a/erpnext/manufacturing/doctype/routing/routing_dashboard.py +++ b/erpnext/manufacturing/doctype/routing/routing_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/manufacturing/doctype/routing/test_routing.py b/erpnext/manufacturing/doctype/routing/test_routing.py index b84b2ba1e6d..68d9dec04b1 100644 --- a/erpnext/manufacturing/doctype/routing/test_routing.py +++ b/erpnext/manufacturing/doctype/routing/test_routing.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/manufacturing/doctype/sub_operation/sub_operation.py b/erpnext/manufacturing/doctype/sub_operation/sub_operation.py index 37b64f23d29..c86058eb586 100644 --- a/erpnext/manufacturing/doctype/sub_operation/sub_operation.py +++ b/erpnext/manufacturing/doctype/sub_operation/sub_operation.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/sub_operation/test_sub_operation.py b/erpnext/manufacturing/doctype/sub_operation/test_sub_operation.py index c5749dbc962..189fdaee085 100644 --- a/erpnext/manufacturing/doctype/sub_operation/test_sub_operation.py +++ b/erpnext/manufacturing/doctype/sub_operation/test_sub_operation.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/manufacturing/doctype/work_order/__init__.py b/erpnext/manufacturing/doctype/work_order/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/manufacturing/doctype/work_order/__init__.py +++ b/erpnext/manufacturing/doctype/work_order/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/manufacturing/doctype/work_order/work_order_dashboard.py b/erpnext/manufacturing/doctype/work_order/work_order_dashboard.py index f0fc43f1656..91279d8e616 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order_dashboard.py +++ b/erpnext/manufacturing/doctype/work_order/work_order_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/manufacturing/doctype/work_order_item/work_order_item.py b/erpnext/manufacturing/doctype/work_order_item/work_order_item.py index 3f2664b16e9..4311d3bf17f 100644 --- a/erpnext/manufacturing/doctype/work_order_item/work_order_item.py +++ b/erpnext/manufacturing/doctype/work_order_item/work_order_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/work_order_operation/work_order_operation.py b/erpnext/manufacturing/doctype/work_order_operation/work_order_operation.py index d25c9f21890..6bda58ea77e 100644 --- a/erpnext/manufacturing/doctype/work_order_operation/work_order_operation.py +++ b/erpnext/manufacturing/doctype/work_order_operation/work_order_operation.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/manufacturing/doctype/workstation/__init__.py b/erpnext/manufacturing/doctype/workstation/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/manufacturing/doctype/workstation/__init__.py +++ b/erpnext/manufacturing/doctype/workstation/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/manufacturing/doctype/workstation/test_workstation.py b/erpnext/manufacturing/doctype/workstation/test_workstation.py index 6c6ab77dd8f..c77cef28953 100644 --- a/erpnext/manufacturing/doctype/workstation/test_workstation.py +++ b/erpnext/manufacturing/doctype/workstation/test_workstation.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/manufacturing/doctype/workstation/workstation.py b/erpnext/manufacturing/doctype/workstation/workstation.py index 6daf950c5ff..4cfd410ac72 100644 --- a/erpnext/manufacturing/doctype/workstation/workstation.py +++ b/erpnext/manufacturing/doctype/workstation/workstation.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/manufacturing/doctype/workstation/workstation_dashboard.py b/erpnext/manufacturing/doctype/workstation/workstation_dashboard.py index 3e4b38aae85..c779fbf9c3b 100644 --- a/erpnext/manufacturing/doctype/workstation/workstation_dashboard.py +++ b/erpnext/manufacturing/doctype/workstation/workstation_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/manufacturing/doctype/workstation_working_hour/workstation_working_hour.py b/erpnext/manufacturing/doctype/workstation_working_hour/workstation_working_hour.py index 719d83db51a..99fb5524a90 100644 --- a/erpnext/manufacturing/doctype/workstation_working_hour/workstation_working_hour.py +++ b/erpnext/manufacturing/doctype/workstation_working_hour/workstation_working_hour.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.py b/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.py index f57de916dd1..19b550feea7 100644 --- a/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.py +++ b/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_context(context): diff --git a/erpnext/manufacturing/report/bom_explorer/bom_explorer.py b/erpnext/manufacturing/report/bom_explorer/bom_explorer.py index c122fa9b614..25de2e03797 100644 --- a/erpnext/manufacturing/report/bom_explorer/bom_explorer.py +++ b/erpnext/manufacturing/report/bom_explorer/bom_explorer.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/manufacturing/report/bom_operations_time/bom_operations_time.py b/erpnext/manufacturing/report/bom_operations_time/bom_operations_time.py index 3c2d2153697..e7a818abd5d 100644 --- a/erpnext/manufacturing/report/bom_operations_time/bom_operations_time.py +++ b/erpnext/manufacturing/report/bom_operations_time/bom_operations_time.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/manufacturing/report/bom_stock_calculated/bom_stock_calculated.py b/erpnext/manufacturing/report/bom_stock_calculated/bom_stock_calculated.py index c085990acc3..cf19cbf6a28 100644 --- a/erpnext/manufacturing/report/bom_stock_calculated/bom_stock_calculated.py +++ b/erpnext/manufacturing/report/bom_stock_calculated/bom_stock_calculated.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.py b/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.py index b8ef68dbb68..fa943912617 100644 --- a/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.py +++ b/erpnext/manufacturing/report/bom_stock_report/bom_stock_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.py b/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.py index bbf503718f9..a5ae43e9add 100644 --- a/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.py +++ b/erpnext/manufacturing/report/bom_variance_report/bom_variance_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/manufacturing/report/cost_of_poor_quality_report/cost_of_poor_quality_report.py b/erpnext/manufacturing/report/cost_of_poor_quality_report/cost_of_poor_quality_report.py index 0dcad448d79..b9ddc9f075f 100644 --- a/erpnext/manufacturing/report/cost_of_poor_quality_report/cost_of_poor_quality_report.py +++ b/erpnext/manufacturing/report/cost_of_poor_quality_report/cost_of_poor_quality_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/manufacturing/report/downtime_analysis/downtime_analysis.py b/erpnext/manufacturing/report/downtime_analysis/downtime_analysis.py index a1c6fd12622..2c515d1b36f 100644 --- a/erpnext/manufacturing/report/downtime_analysis/downtime_analysis.py +++ b/erpnext/manufacturing/report/downtime_analysis/downtime_analysis.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/manufacturing/report/exponential_smoothing_forecasting/exponential_smoothing_forecasting.py b/erpnext/manufacturing/report/exponential_smoothing_forecasting/exponential_smoothing_forecasting.py index f014e7f9b57..26b3359dee1 100644 --- a/erpnext/manufacturing/report/exponential_smoothing_forecasting/exponential_smoothing_forecasting.py +++ b/erpnext/manufacturing/report/exponential_smoothing_forecasting/exponential_smoothing_forecasting.py @@ -1,7 +1,6 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/manufacturing/report/job_card_summary/job_card_summary.py b/erpnext/manufacturing/report/job_card_summary/job_card_summary.py index 74bd685b799..4046bb12b86 100644 --- a/erpnext/manufacturing/report/job_card_summary/job_card_summary.py +++ b/erpnext/manufacturing/report/job_card_summary/job_card_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/manufacturing/report/production_analytics/production_analytics.py b/erpnext/manufacturing/report/production_analytics/production_analytics.py index 9e0978aee7f..d4743d3a8ef 100644 --- a/erpnext/manufacturing/report/production_analytics/production_analytics.py +++ b/erpnext/manufacturing/report/production_analytics/production_analytics.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _, scrub diff --git a/erpnext/manufacturing/report/production_plan_summary/production_plan_summary.py b/erpnext/manufacturing/report/production_plan_summary/production_plan_summary.py index 9a4d0c42db4..43ef12e7b44 100644 --- a/erpnext/manufacturing/report/production_plan_summary/production_plan_summary.py +++ b/erpnext/manufacturing/report/production_plan_summary/production_plan_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.utils import flt diff --git a/erpnext/manufacturing/report/production_planning_report/production_planning_report.py b/erpnext/manufacturing/report/production_planning_report/production_planning_report.py index e27270ae8b9..8368db6374b 100644 --- a/erpnext/manufacturing/report/production_planning_report/production_planning_report.py +++ b/erpnext/manufacturing/report/production_planning_report/production_planning_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py b/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py index 54df208346c..a0c4a43e90f 100644 --- a/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py +++ b/erpnext/manufacturing/report/quality_inspection_summary/quality_inspection_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/manufacturing/report/work_order_stock_report/work_order_stock_report.py b/erpnext/manufacturing/report/work_order_stock_report/work_order_stock_report.py index 5b2e2620fd7..db0b239ae20 100644 --- a/erpnext/manufacturing/report/work_order_stock_report/work_order_stock_report.py +++ b/erpnext/manufacturing/report/work_order_stock_report/work_order_stock_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Velometro Mobility Inc and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.utils import cint diff --git a/erpnext/manufacturing/report/work_order_summary/work_order_summary.py b/erpnext/manufacturing/report/work_order_summary/work_order_summary.py index b65af33cec5..6207904a0ff 100644 --- a/erpnext/manufacturing/report/work_order_summary/work_order_summary.py +++ b/erpnext/manufacturing/report/work_order_summary/work_order_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/non_profit/doctype/certification_application/certification_application.py b/erpnext/non_profit/doctype/certification_application/certification_application.py index ff400c81ae3..cbbe191fbac 100644 --- a/erpnext/non_profit/doctype/certification_application/certification_application.py +++ b/erpnext/non_profit/doctype/certification_application/certification_application.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/non_profit/doctype/certification_application/test_certification_application.py b/erpnext/non_profit/doctype/certification_application/test_certification_application.py index 5e1cbf85961..8687b4daf4b 100644 --- a/erpnext/non_profit/doctype/certification_application/test_certification_application.py +++ b/erpnext/non_profit/doctype/certification_application/test_certification_application.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/non_profit/doctype/certified_consultant/certified_consultant.py b/erpnext/non_profit/doctype/certified_consultant/certified_consultant.py index 0cbc2088c96..47361cc39ea 100644 --- a/erpnext/non_profit/doctype/certified_consultant/certified_consultant.py +++ b/erpnext/non_profit/doctype/certified_consultant/certified_consultant.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/non_profit/doctype/certified_consultant/test_certified_consultant.py b/erpnext/non_profit/doctype/certified_consultant/test_certified_consultant.py index 29a73881a58..d10353c1e47 100644 --- a/erpnext/non_profit/doctype/certified_consultant/test_certified_consultant.py +++ b/erpnext/non_profit/doctype/certified_consultant/test_certified_consultant.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/non_profit/doctype/chapter/chapter.py b/erpnext/non_profit/doctype/chapter/chapter.py index c5c9569e74e..c01b1ef3e42 100644 --- a/erpnext/non_profit/doctype/chapter/chapter.py +++ b/erpnext/non_profit/doctype/chapter/chapter.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.website.website_generator import WebsiteGenerator diff --git a/erpnext/non_profit/doctype/chapter/test_chapter.py b/erpnext/non_profit/doctype/chapter/test_chapter.py index 04cdc277475..98601efcf23 100644 --- a/erpnext/non_profit/doctype/chapter/test_chapter.py +++ b/erpnext/non_profit/doctype/chapter/test_chapter.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/non_profit/doctype/chapter_member/chapter_member.py b/erpnext/non_profit/doctype/chapter_member/chapter_member.py index 1638294de12..80c0446ee5a 100644 --- a/erpnext/non_profit/doctype/chapter_member/chapter_member.py +++ b/erpnext/non_profit/doctype/chapter_member/chapter_member.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/non_profit/doctype/donation/donation.py b/erpnext/non_profit/doctype/donation/donation.py index efbe496b6f8..d21357a7f41 100644 --- a/erpnext/non_profit/doctype/donation/donation.py +++ b/erpnext/non_profit/doctype/donation/donation.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/non_profit/doctype/donation/donation_dashboard.py b/erpnext/non_profit/doctype/donation/donation_dashboard.py index 4a16077ef47..1d43ba23dcf 100644 --- a/erpnext/non_profit/doctype/donation/donation_dashboard.py +++ b/erpnext/non_profit/doctype/donation/donation_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/non_profit/doctype/donation/test_donation.py b/erpnext/non_profit/doctype/donation/test_donation.py index 6b9ade9185c..5fa731a6aa3 100644 --- a/erpnext/non_profit/doctype/donation/test_donation.py +++ b/erpnext/non_profit/doctype/donation/test_donation.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/non_profit/doctype/donor/donor.py b/erpnext/non_profit/doctype/donor/donor.py index a46163a0128..058321b1591 100644 --- a/erpnext/non_profit/doctype/donor/donor.py +++ b/erpnext/non_profit/doctype/donor/donor.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.contacts.address_and_contact import load_address_and_contact from frappe.model.document import Document diff --git a/erpnext/non_profit/doctype/donor/test_donor.py b/erpnext/non_profit/doctype/donor/test_donor.py index 5ce01998bc3..fe591c8e72c 100644 --- a/erpnext/non_profit/doctype/donor/test_donor.py +++ b/erpnext/non_profit/doctype/donor/test_donor.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/non_profit/doctype/donor_type/donor_type.py b/erpnext/non_profit/doctype/donor_type/donor_type.py index 4d34725d024..17dca899d56 100644 --- a/erpnext/non_profit/doctype/donor_type/donor_type.py +++ b/erpnext/non_profit/doctype/donor_type/donor_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/non_profit/doctype/donor_type/test_donor_type.py b/erpnext/non_profit/doctype/donor_type/test_donor_type.py index 7857ec5ad21..d433733ee25 100644 --- a/erpnext/non_profit/doctype/donor_type/test_donor_type.py +++ b/erpnext/non_profit/doctype/donor_type/test_donor_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/non_profit/doctype/grant_application/grant_application.py b/erpnext/non_profit/doctype/grant_application/grant_application.py index 92a62563ab9..cc5e1b1442d 100644 --- a/erpnext/non_profit/doctype/grant_application/grant_application.py +++ b/erpnext/non_profit/doctype/grant_application/grant_application.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/non_profit/doctype/grant_application/test_grant_application.py b/erpnext/non_profit/doctype/grant_application/test_grant_application.py index d15809112ab..ef267d7af86 100644 --- a/erpnext/non_profit/doctype/grant_application/test_grant_application.py +++ b/erpnext/non_profit/doctype/grant_application/test_grant_application.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/non_profit/doctype/member/member.py b/erpnext/non_profit/doctype/member/member.py index f7e7f105d55..4d80e57eccf 100644 --- a/erpnext/non_profit/doctype/member/member.py +++ b/erpnext/non_profit/doctype/member/member.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/non_profit/doctype/member/member_dashboard.py b/erpnext/non_profit/doctype/member/member_dashboard.py index ff929a59093..80bb9e3250d 100644 --- a/erpnext/non_profit/doctype/member/member_dashboard.py +++ b/erpnext/non_profit/doctype/member/member_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/non_profit/doctype/member/test_member.py b/erpnext/non_profit/doctype/member/test_member.py index 38ad87f2f67..46f14ed1312 100644 --- a/erpnext/non_profit/doctype/member/test_member.py +++ b/erpnext/non_profit/doctype/member/test_member.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/non_profit/doctype/membership/membership.py b/erpnext/non_profit/doctype/membership/membership.py index 8522d662a60..b3593d55f00 100644 --- a/erpnext/non_profit/doctype/membership/membership.py +++ b/erpnext/non_profit/doctype/membership/membership.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json from datetime import datetime diff --git a/erpnext/non_profit/doctype/membership/test_membership.py b/erpnext/non_profit/doctype/membership/test_membership.py index 5f52cdaca81..fbe344c6a15 100644 --- a/erpnext/non_profit/doctype/membership/test_membership.py +++ b/erpnext/non_profit/doctype/membership/test_membership.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/non_profit/doctype/membership_type/membership_type.py b/erpnext/non_profit/doctype/membership_type/membership_type.py index 1b847d94b99..b4464215715 100644 --- a/erpnext/non_profit/doctype/membership_type/membership_type.py +++ b/erpnext/non_profit/doctype/membership_type/membership_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/non_profit/doctype/membership_type/test_membership_type.py b/erpnext/non_profit/doctype/membership_type/test_membership_type.py index 2503ba17d1c..98bc087acde 100644 --- a/erpnext/non_profit/doctype/membership_type/test_membership_type.py +++ b/erpnext/non_profit/doctype/membership_type/test_membership_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/non_profit/doctype/non_profit_settings/non_profit_settings.py b/erpnext/non_profit/doctype/non_profit_settings/non_profit_settings.py index cb365cb6c10..ace66055427 100644 --- a/erpnext/non_profit/doctype/non_profit_settings/non_profit_settings.py +++ b/erpnext/non_profit/doctype/non_profit_settings/non_profit_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/non_profit/doctype/non_profit_settings/test_non_profit_settings.py b/erpnext/non_profit/doctype/non_profit_settings/test_non_profit_settings.py index a0a54030cc9..51d1ba02eba 100644 --- a/erpnext/non_profit/doctype/non_profit_settings/test_non_profit_settings.py +++ b/erpnext/non_profit/doctype/non_profit_settings/test_non_profit_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/non_profit/doctype/volunteer/test_volunteer.py b/erpnext/non_profit/doctype/volunteer/test_volunteer.py index 346eac56770..0a0ab2cf342 100644 --- a/erpnext/non_profit/doctype/volunteer/test_volunteer.py +++ b/erpnext/non_profit/doctype/volunteer/test_volunteer.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/non_profit/doctype/volunteer/volunteer.py b/erpnext/non_profit/doctype/volunteer/volunteer.py index 6c9232b0ea1..b44d67dae39 100644 --- a/erpnext/non_profit/doctype/volunteer/volunteer.py +++ b/erpnext/non_profit/doctype/volunteer/volunteer.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.contacts.address_and_contact import load_address_and_contact from frappe.model.document import Document diff --git a/erpnext/non_profit/doctype/volunteer_skill/volunteer_skill.py b/erpnext/non_profit/doctype/volunteer_skill/volunteer_skill.py index 3422ec2dec3..fe7251876d2 100644 --- a/erpnext/non_profit/doctype/volunteer_skill/volunteer_skill.py +++ b/erpnext/non_profit/doctype/volunteer_skill/volunteer_skill.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/non_profit/doctype/volunteer_type/test_volunteer_type.py b/erpnext/non_profit/doctype/volunteer_type/test_volunteer_type.py index 2c64d21bba4..cef27c83a56 100644 --- a/erpnext/non_profit/doctype/volunteer_type/test_volunteer_type.py +++ b/erpnext/non_profit/doctype/volunteer_type/test_volunteer_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/non_profit/doctype/volunteer_type/volunteer_type.py b/erpnext/non_profit/doctype/volunteer_type/volunteer_type.py index 116f5d8b52f..3b1ae1a88e0 100644 --- a/erpnext/non_profit/doctype/volunteer_type/volunteer_type.py +++ b/erpnext/non_profit/doctype/volunteer_type/volunteer_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/non_profit/report/expiring_memberships/expiring_memberships.py b/erpnext/non_profit/report/expiring_memberships/expiring_memberships.py index 2167b651c34..3ddbfdc3b0d 100644 --- a/erpnext/non_profit/report/expiring_memberships/expiring_memberships.py +++ b/erpnext/non_profit/report/expiring_memberships/expiring_memberships.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/non_profit/web_form/certification_application/certification_application.py b/erpnext/non_profit/web_form/certification_application/certification_application.py index f57de916dd1..19b550feea7 100644 --- a/erpnext/non_profit/web_form/certification_application/certification_application.py +++ b/erpnext/non_profit/web_form/certification_application/certification_application.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_context(context): diff --git a/erpnext/non_profit/web_form/certification_application_usd/certification_application_usd.py b/erpnext/non_profit/web_form/certification_application_usd/certification_application_usd.py index f57de916dd1..19b550feea7 100644 --- a/erpnext/non_profit/web_form/certification_application_usd/certification_application_usd.py +++ b/erpnext/non_profit/web_form/certification_application_usd/certification_application_usd.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_context(context): diff --git a/erpnext/non_profit/web_form/grant_application/grant_application.py b/erpnext/non_profit/web_form/grant_application/grant_application.py index dab0e9fda85..1f828940922 100644 --- a/erpnext/non_profit/web_form/grant_application/grant_application.py +++ b/erpnext/non_profit/web_form/grant_application/grant_application.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_context(context): diff --git a/erpnext/patches/__init__.py b/erpnext/patches/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/patches/__init__.py +++ b/erpnext/patches/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/patches/v10_0/add_default_cash_flow_mappers.py b/erpnext/patches/v10_0/add_default_cash_flow_mappers.py index 5c28597faad..165ca0243bf 100644 --- a/erpnext/patches/v10_0/add_default_cash_flow_mappers.py +++ b/erpnext/patches/v10_0/add_default_cash_flow_mappers.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v10_0/fichier_des_ecritures_comptables_for_france.py b/erpnext/patches/v10_0/fichier_des_ecritures_comptables_for_france.py index a3e49577a33..cdf5ba29141 100644 --- a/erpnext/patches/v10_0/fichier_des_ecritures_comptables_for_france.py +++ b/erpnext/patches/v10_0/fichier_des_ecritures_comptables_for_france.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v10_0/item_barcode_childtable_migrate.py b/erpnext/patches/v10_0/item_barcode_childtable_migrate.py index ec9c6c3b760..ffff95d223c 100644 --- a/erpnext/patches/v10_0/item_barcode_childtable_migrate.py +++ b/erpnext/patches/v10_0/item_barcode_childtable_migrate.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v10_0/migrate_daily_work_summary_settings_to_daily_work_summary_group.py b/erpnext/patches/v10_0/migrate_daily_work_summary_settings_to_daily_work_summary_group.py index a3c61a5294a..fd511849b2b 100644 --- a/erpnext/patches/v10_0/migrate_daily_work_summary_settings_to_daily_work_summary_group.py +++ b/erpnext/patches/v10_0/migrate_daily_work_summary_settings_to_daily_work_summary_group.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v10_0/rename_offer_letter_to_job_offer.py b/erpnext/patches/v10_0/rename_offer_letter_to_job_offer.py index 4fc419e302c..00d0dd75e4c 100644 --- a/erpnext/patches/v10_0/rename_offer_letter_to_job_offer.py +++ b/erpnext/patches/v10_0/rename_offer_letter_to_job_offer.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v10_0/rename_price_to_rate_in_pricing_rule.py b/erpnext/patches/v10_0/rename_price_to_rate_in_pricing_rule.py index 1b8c6fb7ea5..152c5b3ec48 100644 --- a/erpnext/patches/v10_0/rename_price_to_rate_in_pricing_rule.py +++ b/erpnext/patches/v10_0/rename_price_to_rate_in_pricing_rule.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v10_0/set_currency_in_pricing_rule.py b/erpnext/patches/v10_0/set_currency_in_pricing_rule.py index 2a3f1c03bde..374df2a4dc7 100644 --- a/erpnext/patches/v10_0/set_currency_in_pricing_rule.py +++ b/erpnext/patches/v10_0/set_currency_in_pricing_rule.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v10_0/update_translatable_fields.py b/erpnext/patches/v10_0/update_translatable_fields.py index 2c55a052173..f111ac7b9de 100644 --- a/erpnext/patches/v10_0/update_translatable_fields.py +++ b/erpnext/patches/v10_0/update_translatable_fields.py @@ -1,6 +1,5 @@ #-*- coding: utf-8 -*- -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v10_1/transfer_subscription_to_auto_repeat.py b/erpnext/patches/v10_1/transfer_subscription_to_auto_repeat.py index 2d5b0c5bd4a..dcb4a57ba2a 100644 --- a/erpnext/patches/v10_1/transfer_subscription_to_auto_repeat.py +++ b/erpnext/patches/v10_1/transfer_subscription_to_auto_repeat.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v11_0/add_default_dispatch_notification_template.py b/erpnext/patches/v11_0/add_default_dispatch_notification_template.py index 197b3b72676..784b0eeafa5 100644 --- a/erpnext/patches/v11_0/add_default_dispatch_notification_template.py +++ b/erpnext/patches/v11_0/add_default_dispatch_notification_template.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import os diff --git a/erpnext/patches/v11_0/add_default_email_template_for_leave.py b/erpnext/patches/v11_0/add_default_email_template_for_leave.py index f8538df2ef2..e52d12429b5 100644 --- a/erpnext/patches/v11_0/add_default_email_template_for_leave.py +++ b/erpnext/patches/v11_0/add_default_email_template_for_leave.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import os diff --git a/erpnext/patches/v11_0/add_expense_claim_default_account.py b/erpnext/patches/v11_0/add_expense_claim_default_account.py index 74b93efbf80..8629798ba82 100644 --- a/erpnext/patches/v11_0/add_expense_claim_default_account.py +++ b/erpnext/patches/v11_0/add_expense_claim_default_account.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/add_index_on_nestedset_doctypes.py b/erpnext/patches/v11_0/add_index_on_nestedset_doctypes.py index 08ad855e5e2..7c99f580f7c 100644 --- a/erpnext/patches/v11_0/add_index_on_nestedset_doctypes.py +++ b/erpnext/patches/v11_0/add_index_on_nestedset_doctypes.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/add_item_group_defaults.py b/erpnext/patches/v11_0/add_item_group_defaults.py index 6849b27feee..026047a9612 100644 --- a/erpnext/patches/v11_0/add_item_group_defaults.py +++ b/erpnext/patches/v11_0/add_item_group_defaults.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/add_market_segments.py b/erpnext/patches/v11_0/add_market_segments.py index e7cc7d1117c..820199569ab 100644 --- a/erpnext/patches/v11_0/add_market_segments.py +++ b/erpnext/patches/v11_0/add_market_segments.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/add_sales_stages.py b/erpnext/patches/v11_0/add_sales_stages.py index 23e48747b82..1699572551b 100644 --- a/erpnext/patches/v11_0/add_sales_stages.py +++ b/erpnext/patches/v11_0/add_sales_stages.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/check_buying_selling_in_currency_exchange.py b/erpnext/patches/v11_0/check_buying_selling_in_currency_exchange.py index 5eaf21220bd..039238f9e1b 100644 --- a/erpnext/patches/v11_0/check_buying_selling_in_currency_exchange.py +++ b/erpnext/patches/v11_0/check_buying_selling_in_currency_exchange.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/create_default_success_action.py b/erpnext/patches/v11_0/create_default_success_action.py index 4a598371f82..b45065cb0d2 100644 --- a/erpnext/patches/v11_0/create_default_success_action.py +++ b/erpnext/patches/v11_0/create_default_success_action.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/create_department_records_for_each_company.py b/erpnext/patches/v11_0/create_department_records_for_each_company.py index 7799a650405..a4cba0cfcca 100644 --- a/erpnext/patches/v11_0/create_department_records_for_each_company.py +++ b/erpnext/patches/v11_0/create_department_records_for_each_company.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/patches/v11_0/create_salary_structure_assignments.py b/erpnext/patches/v11_0/create_salary_structure_assignments.py index c3cc9b6d309..823eca19b07 100644 --- a/erpnext/patches/v11_0/create_salary_structure_assignments.py +++ b/erpnext/patches/v11_0/create_salary_structure_assignments.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from datetime import datetime diff --git a/erpnext/patches/v11_0/drop_column_max_days_allowed.py b/erpnext/patches/v11_0/drop_column_max_days_allowed.py index e45d01cef58..5c549258584 100644 --- a/erpnext/patches/v11_0/drop_column_max_days_allowed.py +++ b/erpnext/patches/v11_0/drop_column_max_days_allowed.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/ewaybill_fields_gst_india.py b/erpnext/patches/v11_0/ewaybill_fields_gst_india.py index a59291ce420..a7e662c78c5 100644 --- a/erpnext/patches/v11_0/ewaybill_fields_gst_india.py +++ b/erpnext/patches/v11_0/ewaybill_fields_gst_india.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/hr_ux_cleanups.py b/erpnext/patches/v11_0/hr_ux_cleanups.py index b09f4a7e7f2..00678c781e7 100644 --- a/erpnext/patches/v11_0/hr_ux_cleanups.py +++ b/erpnext/patches/v11_0/hr_ux_cleanups.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/inter_state_field_for_gst.py b/erpnext/patches/v11_0/inter_state_field_for_gst.py index fa83af00655..d897941eab2 100644 --- a/erpnext/patches/v11_0/inter_state_field_for_gst.py +++ b/erpnext/patches/v11_0/inter_state_field_for_gst.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/make_asset_finance_book_against_old_entries.py b/erpnext/patches/v11_0/make_asset_finance_book_against_old_entries.py index 1d3f8c1204d..cd3869b3600 100644 --- a/erpnext/patches/v11_0/make_asset_finance_book_against_old_entries.py +++ b/erpnext/patches/v11_0/make_asset_finance_book_against_old_entries.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/make_italian_localization_fields.py b/erpnext/patches/v11_0/make_italian_localization_fields.py index 994df721c25..8ff23a50d4b 100644 --- a/erpnext/patches/v11_0/make_italian_localization_fields.py +++ b/erpnext/patches/v11_0/make_italian_localization_fields.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/make_job_card.py b/erpnext/patches/v11_0/make_job_card.py index e361d5a8381..120e018805a 100644 --- a/erpnext/patches/v11_0/make_job_card.py +++ b/erpnext/patches/v11_0/make_job_card.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/make_location_from_warehouse.py b/erpnext/patches/v11_0/make_location_from_warehouse.py index e855b3ee5e1..ef6262be15e 100644 --- a/erpnext/patches/v11_0/make_location_from_warehouse.py +++ b/erpnext/patches/v11_0/make_location_from_warehouse.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.utils.nestedset import rebuild_tree diff --git a/erpnext/patches/v11_0/make_quality_inspection_template.py b/erpnext/patches/v11_0/make_quality_inspection_template.py index 1c3d34ee208..58c9fb9239f 100644 --- a/erpnext/patches/v11_0/make_quality_inspection_template.py +++ b/erpnext/patches/v11_0/make_quality_inspection_template.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/merge_land_unit_with_location.py b/erpnext/patches/v11_0/merge_land_unit_with_location.py index 7845da255a8..e1d0b127b9d 100644 --- a/erpnext/patches/v11_0/merge_land_unit_with_location.py +++ b/erpnext/patches/v11_0/merge_land_unit_with_location.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v11_0/move_item_defaults_to_child_table_for_multicompany.py b/erpnext/patches/v11_0/move_item_defaults_to_child_table_for_multicompany.py index 42fdf1358ad..bfc3fbc6084 100644 --- a/erpnext/patches/v11_0/move_item_defaults_to_child_table_for_multicompany.py +++ b/erpnext/patches/v11_0/move_item_defaults_to_child_table_for_multicompany.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/move_leave_approvers_from_employee.py b/erpnext/patches/v11_0/move_leave_approvers_from_employee.py index accfa5ecb39..fc3dbfbab92 100644 --- a/erpnext/patches/v11_0/move_leave_approvers_from_employee.py +++ b/erpnext/patches/v11_0/move_leave_approvers_from_employee.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v11_0/rebuild_tree_for_company.py b/erpnext/patches/v11_0/rebuild_tree_for_company.py index 6caca4730c2..7866cfab4f7 100644 --- a/erpnext/patches/v11_0/rebuild_tree_for_company.py +++ b/erpnext/patches/v11_0/rebuild_tree_for_company.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.utils.nestedset import rebuild_tree diff --git a/erpnext/patches/v11_0/refactor_autoname_naming.py b/erpnext/patches/v11_0/refactor_autoname_naming.py index dd5cb639b1b..1c4d8f1f79f 100644 --- a/erpnext/patches/v11_0/refactor_autoname_naming.py +++ b/erpnext/patches/v11_0/refactor_autoname_naming.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import print_function, unicode_literals import frappe from frappe.custom.doctype.property_setter.property_setter import make_property_setter diff --git a/erpnext/patches/v11_0/refactor_naming_series.py b/erpnext/patches/v11_0/refactor_naming_series.py index fd4dbdc081a..e0aa004e476 100644 --- a/erpnext/patches/v11_0/refactor_naming_series.py +++ b/erpnext/patches/v11_0/refactor_naming_series.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import print_function, unicode_literals import frappe from frappe.custom.doctype.property_setter.property_setter import make_property_setter diff --git a/erpnext/patches/v11_0/remove_modules_setup_page.py b/erpnext/patches/v11_0/remove_modules_setup_page.py index eab3237878e..91f4bc5d0e2 100644 --- a/erpnext/patches/v11_0/remove_modules_setup_page.py +++ b/erpnext/patches/v11_0/remove_modules_setup_page.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/rename_additional_salary_component_additional_salary.py b/erpnext/patches/v11_0/rename_additional_salary_component_additional_salary.py index 5b2c2863f2f..85292e8d135 100644 --- a/erpnext/patches/v11_0/rename_additional_salary_component_additional_salary.py +++ b/erpnext/patches/v11_0/rename_additional_salary_component_additional_salary.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/rename_asset_adjustment_doctype.py b/erpnext/patches/v11_0/rename_asset_adjustment_doctype.py index 707dff75e24..c7a3aa2abd4 100644 --- a/erpnext/patches/v11_0/rename_asset_adjustment_doctype.py +++ b/erpnext/patches/v11_0/rename_asset_adjustment_doctype.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/rename_bom_wo_fields.py b/erpnext/patches/v11_0/rename_bom_wo_fields.py index 4ad6ea9999d..cab7d0a673f 100644 --- a/erpnext/patches/v11_0/rename_bom_wo_fields.py +++ b/erpnext/patches/v11_0/rename_bom_wo_fields.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v11_0/rename_field_max_days_allowed.py b/erpnext/patches/v11_0/rename_field_max_days_allowed.py index 48f73fb2f41..fb08be8628b 100644 --- a/erpnext/patches/v11_0/rename_field_max_days_allowed.py +++ b/erpnext/patches/v11_0/rename_field_max_days_allowed.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v11_0/rename_members_with_naming_series.py b/erpnext/patches/v11_0/rename_members_with_naming_series.py index a3d7970aa1f..49dbc8a6dc8 100644 --- a/erpnext/patches/v11_0/rename_members_with_naming_series.py +++ b/erpnext/patches/v11_0/rename_members_with_naming_series.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/rename_overproduction_percent_field.py b/erpnext/patches/v11_0/rename_overproduction_percent_field.py index c7124af2e45..c78ec5d0128 100644 --- a/erpnext/patches/v11_0/rename_overproduction_percent_field.py +++ b/erpnext/patches/v11_0/rename_overproduction_percent_field.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v11_0/rename_production_order_to_work_order.py b/erpnext/patches/v11_0/rename_production_order_to_work_order.py index 995f1affe4e..453a5710a1d 100644 --- a/erpnext/patches/v11_0/rename_production_order_to_work_order.py +++ b/erpnext/patches/v11_0/rename_production_order_to_work_order.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py b/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py index 2e53fb832fe..fd7e684c61a 100644 --- a/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py +++ b/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/patches/v11_0/renamed_from_to_fields_in_project.py b/erpnext/patches/v11_0/renamed_from_to_fields_in_project.py index 894aaee5f0b..f23a81494be 100644 --- a/erpnext/patches/v11_0/renamed_from_to_fields_in_project.py +++ b/erpnext/patches/v11_0/renamed_from_to_fields_in_project.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v11_0/set_default_email_template_in_hr.py b/erpnext/patches/v11_0/set_default_email_template_in_hr.py index ff754247fba..a77dee93692 100644 --- a/erpnext/patches/v11_0/set_default_email_template_in_hr.py +++ b/erpnext/patches/v11_0/set_default_email_template_in_hr.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/patches/v11_0/set_department_for_doctypes.py b/erpnext/patches/v11_0/set_department_for_doctypes.py index c9699655db3..a3ece7fc768 100644 --- a/erpnext/patches/v11_0/set_department_for_doctypes.py +++ b/erpnext/patches/v11_0/set_department_for_doctypes.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/set_missing_gst_hsn_code.py b/erpnext/patches/v11_0/set_missing_gst_hsn_code.py index 7a0a9890252..262ca2d61f9 100644 --- a/erpnext/patches/v11_0/set_missing_gst_hsn_code.py +++ b/erpnext/patches/v11_0/set_missing_gst_hsn_code.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/set_salary_component_properties.py b/erpnext/patches/v11_0/set_salary_component_properties.py index b70dc357aa7..5ff9e4ab6fd 100644 --- a/erpnext/patches/v11_0/set_salary_component_properties.py +++ b/erpnext/patches/v11_0/set_salary_component_properties.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/set_update_field_and_value_in_workflow_state.py b/erpnext/patches/v11_0/set_update_field_and_value_in_workflow_state.py index da4d4bd943a..f23018d0b4d 100644 --- a/erpnext/patches/v11_0/set_update_field_and_value_in_workflow_state.py +++ b/erpnext/patches/v11_0/set_update_field_and_value_in_workflow_state.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.model.workflow import get_workflow_name diff --git a/erpnext/patches/v11_0/set_user_permissions_for_department.py b/erpnext/patches/v11_0/set_user_permissions_for_department.py index 7840d5e0feb..cb38beb51c1 100644 --- a/erpnext/patches/v11_0/set_user_permissions_for_department.py +++ b/erpnext/patches/v11_0/set_user_permissions_for_department.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/skip_user_permission_check_for_department.py b/erpnext/patches/v11_0/skip_user_permission_check_for_department.py index 66d1b6b40ab..8e2aa47785d 100644 --- a/erpnext/patches/v11_0/skip_user_permission_check_for_department.py +++ b/erpnext/patches/v11_0/skip_user_permission_check_for_department.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.desk.form.linked_with import get_linked_doctypes diff --git a/erpnext/patches/v11_0/uom_conversion_data.py b/erpnext/patches/v11_0/uom_conversion_data.py index a408d86b9a7..854f5223470 100644 --- a/erpnext/patches/v11_0/uom_conversion_data.py +++ b/erpnext/patches/v11_0/uom_conversion_data.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/update_account_type_in_party_type.py b/erpnext/patches/v11_0/update_account_type_in_party_type.py index e51874f48a0..c66cef042d9 100644 --- a/erpnext/patches/v11_0/update_account_type_in_party_type.py +++ b/erpnext/patches/v11_0/update_account_type_in_party_type.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/update_allow_transfer_for_manufacture.py b/erpnext/patches/v11_0/update_allow_transfer_for_manufacture.py index bfcfc9f6f44..3e36a4bb90d 100644 --- a/erpnext/patches/v11_0/update_allow_transfer_for_manufacture.py +++ b/erpnext/patches/v11_0/update_allow_transfer_for_manufacture.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/update_backflush_subcontract_rm_based_on_bom.py b/erpnext/patches/v11_0/update_backflush_subcontract_rm_based_on_bom.py index c3b18bd9817..f3a2ac6a655 100644 --- a/erpnext/patches/v11_0/update_backflush_subcontract_rm_based_on_bom.py +++ b/erpnext/patches/v11_0/update_backflush_subcontract_rm_based_on_bom.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/update_brand_in_item_price.py b/erpnext/patches/v11_0/update_brand_in_item_price.py index a489378895d..ce1df78083f 100644 --- a/erpnext/patches/v11_0/update_brand_in_item_price.py +++ b/erpnext/patches/v11_0/update_brand_in_item_price.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/update_delivery_trip_status.py b/erpnext/patches/v11_0/update_delivery_trip_status.py index da259582747..35b95353b12 100755 --- a/erpnext/patches/v11_0/update_delivery_trip_status.py +++ b/erpnext/patches/v11_0/update_delivery_trip_status.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_0/update_department_lft_rgt.py b/erpnext/patches/v11_0/update_department_lft_rgt.py index f7ecf6e4523..4cb2dccbb27 100644 --- a/erpnext/patches/v11_0/update_department_lft_rgt.py +++ b/erpnext/patches/v11_0/update_department_lft_rgt.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/patches/v11_0/update_sales_partner_type.py b/erpnext/patches/v11_0/update_sales_partner_type.py index 1369805349d..c7937e532be 100644 --- a/erpnext/patches/v11_0/update_sales_partner_type.py +++ b/erpnext/patches/v11_0/update_sales_partner_type.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/patches/v11_0/update_total_qty_field.py b/erpnext/patches/v11_0/update_total_qty_field.py index e79a5f9e6bc..09bb02f9593 100644 --- a/erpnext/patches/v11_0/update_total_qty_field.py +++ b/erpnext/patches/v11_0/update_total_qty_field.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_1/delete_bom_browser.py b/erpnext/patches/v11_1/delete_bom_browser.py index aad3df267c8..9b5c169717a 100644 --- a/erpnext/patches/v11_1/delete_bom_browser.py +++ b/erpnext/patches/v11_1/delete_bom_browser.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_1/delete_scheduling_tool.py b/erpnext/patches/v11_1/delete_scheduling_tool.py index 56d0dbf1a1f..6f3da92ee74 100644 --- a/erpnext/patches/v11_1/delete_scheduling_tool.py +++ b/erpnext/patches/v11_1/delete_scheduling_tool.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_1/make_job_card_time_logs.py b/erpnext/patches/v11_1/make_job_card_time_logs.py index db0c3454c74..100cd64f8fe 100644 --- a/erpnext/patches/v11_1/make_job_card_time_logs.py +++ b/erpnext/patches/v11_1/make_job_card_time_logs.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_1/move_customer_lead_to_dynamic_column.py b/erpnext/patches/v11_1/move_customer_lead_to_dynamic_column.py index 9ea6cd82c9c..d292d7ae432 100644 --- a/erpnext/patches/v11_1/move_customer_lead_to_dynamic_column.py +++ b/erpnext/patches/v11_1/move_customer_lead_to_dynamic_column.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_1/rename_depends_on_lwp.py b/erpnext/patches/v11_1/rename_depends_on_lwp.py index 95a8225832c..4e71838aa06 100644 --- a/erpnext/patches/v11_1/rename_depends_on_lwp.py +++ b/erpnext/patches/v11_1/rename_depends_on_lwp.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import scrub diff --git a/erpnext/patches/v11_1/renamed_delayed_item_report.py b/erpnext/patches/v11_1/renamed_delayed_item_report.py index 21285637c4e..c160b79d0e9 100644 --- a/erpnext/patches/v11_1/renamed_delayed_item_report.py +++ b/erpnext/patches/v11_1/renamed_delayed_item_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_1/set_default_action_for_quality_inspection.py b/erpnext/patches/v11_1/set_default_action_for_quality_inspection.py index 4325490c793..672b7628bb4 100644 --- a/erpnext/patches/v11_1/set_default_action_for_quality_inspection.py +++ b/erpnext/patches/v11_1/set_default_action_for_quality_inspection.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_1/set_missing_opportunity_from.py b/erpnext/patches/v11_1/set_missing_opportunity_from.py index 6569200a14c..7a041919a15 100644 --- a/erpnext/patches/v11_1/set_missing_opportunity_from.py +++ b/erpnext/patches/v11_1/set_missing_opportunity_from.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_1/set_salary_details_submittable.py b/erpnext/patches/v11_1/set_salary_details_submittable.py index 4a4cf302575..8ad8ff8c2ba 100644 --- a/erpnext/patches/v11_1/set_salary_details_submittable.py +++ b/erpnext/patches/v11_1/set_salary_details_submittable.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_1/set_status_for_material_request_type_manufacture.py b/erpnext/patches/v11_1/set_status_for_material_request_type_manufacture.py index 64db97e92bc..2da1ecbda26 100644 --- a/erpnext/patches/v11_1/set_status_for_material_request_type_manufacture.py +++ b/erpnext/patches/v11_1/set_status_for_material_request_type_manufacture.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_1/set_variant_based_on.py b/erpnext/patches/v11_1/set_variant_based_on.py index b69767d7ea4..2e06e63a8aa 100644 --- a/erpnext/patches/v11_1/set_variant_based_on.py +++ b/erpnext/patches/v11_1/set_variant_based_on.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_1/setup_guardian_role.py b/erpnext/patches/v11_1/setup_guardian_role.py index bb33f19e9cf..385bc209fa2 100644 --- a/erpnext/patches/v11_1/setup_guardian_role.py +++ b/erpnext/patches/v11_1/setup_guardian_role.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_1/update_bank_transaction_status.py b/erpnext/patches/v11_1/update_bank_transaction_status.py index 33007afcd8c..9b8be3de1b0 100644 --- a/erpnext/patches/v11_1/update_bank_transaction_status.py +++ b/erpnext/patches/v11_1/update_bank_transaction_status.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_1/update_default_supplier_in_item_defaults.py b/erpnext/patches/v11_1/update_default_supplier_in_item_defaults.py index 22dabae7d2e..902df201a42 100644 --- a/erpnext/patches/v11_1/update_default_supplier_in_item_defaults.py +++ b/erpnext/patches/v11_1/update_default_supplier_in_item_defaults.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v11_1/woocommerce_set_creation_user.py b/erpnext/patches/v11_1/woocommerce_set_creation_user.py index e7218b1ade5..1de25bb739c 100644 --- a/erpnext/patches/v11_1/woocommerce_set_creation_user.py +++ b/erpnext/patches/v11_1/woocommerce_set_creation_user.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.utils import cint diff --git a/erpnext/patches/v12_0/add_default_buying_selling_terms_in_company.py b/erpnext/patches/v12_0/add_default_buying_selling_terms_in_company.py index 384a1f5022a..80187d834a4 100644 --- a/erpnext/patches/v12_0/add_default_buying_selling_terms_in_company.py +++ b/erpnext/patches/v12_0/add_default_buying_selling_terms_in_company.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v12_0/add_document_type_field_for_italy_einvoicing.py b/erpnext/patches/v12_0/add_document_type_field_for_italy_einvoicing.py index 7f39dfef59d..41264819ef3 100644 --- a/erpnext/patches/v12_0/add_document_type_field_for_italy_einvoicing.py +++ b/erpnext/patches/v12_0/add_document_type_field_for_italy_einvoicing.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields diff --git a/erpnext/patches/v12_0/add_export_type_field_in_party_master.py b/erpnext/patches/v12_0/add_export_type_field_in_party_master.py index e05c8211c03..df9bbea344a 100644 --- a/erpnext/patches/v12_0/add_export_type_field_in_party_master.py +++ b/erpnext/patches/v12_0/add_export_type_field_in_party_master.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/add_gst_category_in_delivery_note.py b/erpnext/patches/v12_0/add_gst_category_in_delivery_note.py index 30e47cb333c..77b63487ca7 100644 --- a/erpnext/patches/v12_0/add_gst_category_in_delivery_note.py +++ b/erpnext/patches/v12_0/add_gst_category_in_delivery_note.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields diff --git a/erpnext/patches/v12_0/add_taxjar_integration_field.py b/erpnext/patches/v12_0/add_taxjar_integration_field.py index d10a6d79f29..fbaf6f83a7b 100644 --- a/erpnext/patches/v12_0/add_taxjar_integration_field.py +++ b/erpnext/patches/v12_0/add_taxjar_integration_field.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/create_accounting_dimensions_in_missing_doctypes.py b/erpnext/patches/v12_0/create_accounting_dimensions_in_missing_doctypes.py index 02fbe62837a..e0ed9d8c147 100644 --- a/erpnext/patches/v12_0/create_accounting_dimensions_in_missing_doctypes.py +++ b/erpnext/patches/v12_0/create_accounting_dimensions_in_missing_doctypes.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_field diff --git a/erpnext/patches/v12_0/create_irs_1099_field_united_states.py b/erpnext/patches/v12_0/create_irs_1099_field_united_states.py index 65265c4c8e8..0f5e07b5e53 100644 --- a/erpnext/patches/v12_0/create_irs_1099_field_united_states.py +++ b/erpnext/patches/v12_0/create_irs_1099_field_united_states.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/create_itc_reversal_custom_fields.py b/erpnext/patches/v12_0/create_itc_reversal_custom_fields.py index 9267ebffb27..7a1da52128c 100644 --- a/erpnext/patches/v12_0/create_itc_reversal_custom_fields.py +++ b/erpnext/patches/v12_0/create_itc_reversal_custom_fields.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields diff --git a/erpnext/patches/v12_0/create_taxable_value_field.py b/erpnext/patches/v12_0/create_taxable_value_field.py index 40de8d8aef2..df0269d3a8c 100644 --- a/erpnext/patches/v12_0/create_taxable_value_field.py +++ b/erpnext/patches/v12_0/create_taxable_value_field.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields diff --git a/erpnext/patches/v12_0/generate_leave_ledger_entries.py b/erpnext/patches/v12_0/generate_leave_ledger_entries.py index aed56d621b8..90e46d07e40 100644 --- a/erpnext/patches/v12_0/generate_leave_ledger_entries.py +++ b/erpnext/patches/v12_0/generate_leave_ledger_entries.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.utils import getdate, today diff --git a/erpnext/patches/v12_0/make_item_manufacturer.py b/erpnext/patches/v12_0/make_item_manufacturer.py index cfc2472e9e2..d66f429de3c 100644 --- a/erpnext/patches/v12_0/make_item_manufacturer.py +++ b/erpnext/patches/v12_0/make_item_manufacturer.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/move_bank_account_swift_number_to_bank.py b/erpnext/patches/v12_0/move_bank_account_swift_number_to_bank.py index 3e9d429ed18..c0b262395d8 100644 --- a/erpnext/patches/v12_0/move_bank_account_swift_number_to_bank.py +++ b/erpnext/patches/v12_0/move_bank_account_swift_number_to_bank.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/move_credit_limit_to_customer_credit_limit.py b/erpnext/patches/v12_0/move_credit_limit_to_customer_credit_limit.py index 2662632b52b..82dfba52c9f 100644 --- a/erpnext/patches/v12_0/move_credit_limit_to_customer_credit_limit.py +++ b/erpnext/patches/v12_0/move_credit_limit_to_customer_credit_limit.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/move_due_advance_amount_to_pending_amount.py b/erpnext/patches/v12_0/move_due_advance_amount_to_pending_amount.py index 55f5cd52a35..5de7e69620b 100644 --- a/erpnext/patches/v12_0/move_due_advance_amount_to_pending_amount.py +++ b/erpnext/patches/v12_0/move_due_advance_amount_to_pending_amount.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/move_plaid_settings_to_doctype.py b/erpnext/patches/v12_0/move_plaid_settings_to_doctype.py index dafea280c28..c396891b59e 100644 --- a/erpnext/patches/v12_0/move_plaid_settings_to_doctype.py +++ b/erpnext/patches/v12_0/move_plaid_settings_to_doctype.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/move_target_distribution_from_parent_to_child.py b/erpnext/patches/v12_0/move_target_distribution_from_parent_to_child.py index 72f4df5cabc..1e230a787c2 100644 --- a/erpnext/patches/v12_0/move_target_distribution_from_parent_to_child.py +++ b/erpnext/patches/v12_0/move_target_distribution_from_parent_to_child.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/recalculate_requested_qty_in_bin.py b/erpnext/patches/v12_0/recalculate_requested_qty_in_bin.py index a19e9a96dba..c89e4bb9eae 100644 --- a/erpnext/patches/v12_0/recalculate_requested_qty_in_bin.py +++ b/erpnext/patches/v12_0/recalculate_requested_qty_in_bin.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/remove_bank_remittance_custom_fields.py b/erpnext/patches/v12_0/remove_bank_remittance_custom_fields.py index fba41184159..0f4a366c657 100644 --- a/erpnext/patches/v12_0/remove_bank_remittance_custom_fields.py +++ b/erpnext/patches/v12_0/remove_bank_remittance_custom_fields.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/remove_denied_leaves_from_leave_ledger.py b/erpnext/patches/v12_0/remove_denied_leaves_from_leave_ledger.py index f6a1984e17a..d1d4bcc140f 100644 --- a/erpnext/patches/v12_0/remove_denied_leaves_from_leave_ledger.py +++ b/erpnext/patches/v12_0/remove_denied_leaves_from_leave_ledger.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/remove_duplicate_leave_ledger_entries.py b/erpnext/patches/v12_0/remove_duplicate_leave_ledger_entries.py index 6fa1c04dad3..6ad68ccc6e4 100644 --- a/erpnext/patches/v12_0/remove_duplicate_leave_ledger_entries.py +++ b/erpnext/patches/v12_0/remove_duplicate_leave_ledger_entries.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/remove_patient_medical_record_page.py b/erpnext/patches/v12_0/remove_patient_medical_record_page.py index bf71c4810ff..e02bf62dfbc 100644 --- a/erpnext/patches/v12_0/remove_patient_medical_record_page.py +++ b/erpnext/patches/v12_0/remove_patient_medical_record_page.py @@ -1,6 +1,5 @@ # Copyright (c) 2019 -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/rename_account_type_doctype.py b/erpnext/patches/v12_0/rename_account_type_doctype.py index 27357a8ef15..c2c834bf98c 100644 --- a/erpnext/patches/v12_0/rename_account_type_doctype.py +++ b/erpnext/patches/v12_0/rename_account_type_doctype.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/rename_bank_account_field_in_journal_entry_account.py b/erpnext/patches/v12_0/rename_bank_account_field_in_journal_entry_account.py index 7e02fff4d82..a5d986a0a16 100644 --- a/erpnext/patches/v12_0/rename_bank_account_field_in_journal_entry_account.py +++ b/erpnext/patches/v12_0/rename_bank_account_field_in_journal_entry_account.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v12_0/rename_bank_reconciliation.py b/erpnext/patches/v12_0/rename_bank_reconciliation.py index 5c79ce2a81b..51ff0c8c949 100644 --- a/erpnext/patches/v12_0/rename_bank_reconciliation.py +++ b/erpnext/patches/v12_0/rename_bank_reconciliation.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/rename_lost_reason_detail.py b/erpnext/patches/v12_0/rename_lost_reason_detail.py index 337302a3c18..55bf6f223fb 100644 --- a/erpnext/patches/v12_0/rename_lost_reason_detail.py +++ b/erpnext/patches/v12_0/rename_lost_reason_detail.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/rename_pos_closing_doctype.py b/erpnext/patches/v12_0/rename_pos_closing_doctype.py index e6fb1f31e16..f5f0112e036 100644 --- a/erpnext/patches/v12_0/rename_pos_closing_doctype.py +++ b/erpnext/patches/v12_0/rename_pos_closing_doctype.py @@ -1,6 +1,5 @@ # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/rename_pricing_rule_child_doctypes.py b/erpnext/patches/v12_0/rename_pricing_rule_child_doctypes.py index 4bf3840b783..87630fbcaf9 100644 --- a/erpnext/patches/v12_0/rename_pricing_rule_child_doctypes.py +++ b/erpnext/patches/v12_0/rename_pricing_rule_child_doctypes.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/repost_stock_ledger_entries_for_target_warehouse.py b/erpnext/patches/v12_0/repost_stock_ledger_entries_for_target_warehouse.py index 5150430dbb9..198963df711 100644 --- a/erpnext/patches/v12_0/repost_stock_ledger_entries_for_target_warehouse.py +++ b/erpnext/patches/v12_0/repost_stock_ledger_entries_for_target_warehouse.py @@ -1,7 +1,6 @@ # Copyright (c) 2020, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/set_automatically_process_deferred_accounting_in_accounts_settings.py b/erpnext/patches/v12_0/set_automatically_process_deferred_accounting_in_accounts_settings.py index 849e96e9665..b4f8a0631a6 100644 --- a/erpnext/patches/v12_0/set_automatically_process_deferred_accounting_in_accounts_settings.py +++ b/erpnext/patches/v12_0/set_automatically_process_deferred_accounting_in_accounts_settings.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/set_cwip_and_delete_asset_settings.py b/erpnext/patches/v12_0/set_cwip_and_delete_asset_settings.py index e363c26a86f..fe580ce0236 100644 --- a/erpnext/patches/v12_0/set_cwip_and_delete_asset_settings.py +++ b/erpnext/patches/v12_0/set_cwip_and_delete_asset_settings.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.utils import cint diff --git a/erpnext/patches/v12_0/set_default_payroll_based_on.py b/erpnext/patches/v12_0/set_default_payroll_based_on.py index 85112f2a540..b70bb18b60b 100644 --- a/erpnext/patches/v12_0/set_default_payroll_based_on.py +++ b/erpnext/patches/v12_0/set_default_payroll_based_on.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/set_expense_account_in_landed_cost_voucher_taxes.py b/erpnext/patches/v12_0/set_expense_account_in_landed_cost_voucher_taxes.py index 49b3bff0f82..47d4eb599b8 100644 --- a/erpnext/patches/v12_0/set_expense_account_in_landed_cost_voucher_taxes.py +++ b/erpnext/patches/v12_0/set_expense_account_in_landed_cost_voucher_taxes.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from six import iteritems diff --git a/erpnext/patches/v12_0/set_italian_import_supplier_invoice_permissions.py b/erpnext/patches/v12_0/set_italian_import_supplier_invoice_permissions.py index a991b3c15df..b942fa4365f 100644 --- a/erpnext/patches/v12_0/set_italian_import_supplier_invoice_permissions.py +++ b/erpnext/patches/v12_0/set_italian_import_supplier_invoice_permissions.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/set_multi_uom_in_rfq.py b/erpnext/patches/v12_0/set_multi_uom_in_rfq.py index fada5f08fb0..a8e0ec1f816 100644 --- a/erpnext/patches/v12_0/set_multi_uom_in_rfq.py +++ b/erpnext/patches/v12_0/set_multi_uom_in_rfq.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/set_production_capacity_in_workstation.py b/erpnext/patches/v12_0/set_production_capacity_in_workstation.py index 248d33504e1..14956a23b43 100644 --- a/erpnext/patches/v12_0/set_production_capacity_in_workstation.py +++ b/erpnext/patches/v12_0/set_production_capacity_in_workstation.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/set_purchase_receipt_delivery_note_detail.py b/erpnext/patches/v12_0/set_purchase_receipt_delivery_note_detail.py index cad947fadcd..05b86f3204a 100644 --- a/erpnext/patches/v12_0/set_purchase_receipt_delivery_note_detail.py +++ b/erpnext/patches/v12_0/set_purchase_receipt_delivery_note_detail.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from collections import defaultdict diff --git a/erpnext/patches/v12_0/set_quotation_status.py b/erpnext/patches/v12_0/set_quotation_status.py index bb172769ebb..adfc5e96798 100644 --- a/erpnext/patches/v12_0/set_quotation_status.py +++ b/erpnext/patches/v12_0/set_quotation_status.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/set_received_qty_in_material_request_as_per_stock_uom.py b/erpnext/patches/v12_0/set_received_qty_in_material_request_as_per_stock_uom.py index f8b510e3c37..83db7961d9d 100644 --- a/erpnext/patches/v12_0/set_received_qty_in_material_request_as_per_stock_uom.py +++ b/erpnext/patches/v12_0/set_received_qty_in_material_request_as_per_stock_uom.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/set_serial_no_status.py b/erpnext/patches/v12_0/set_serial_no_status.py index 9a05e707a65..57206ced3e2 100644 --- a/erpnext/patches/v12_0/set_serial_no_status.py +++ b/erpnext/patches/v12_0/set_serial_no_status.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.utils import getdate, nowdate diff --git a/erpnext/patches/v12_0/set_updated_purpose_in_pick_list.py b/erpnext/patches/v12_0/set_updated_purpose_in_pick_list.py index 21ee23b2072..300d0f2ba47 100644 --- a/erpnext/patches/v12_0/set_updated_purpose_in_pick_list.py +++ b/erpnext/patches/v12_0/set_updated_purpose_in_pick_list.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/set_valid_till_date_in_supplier_quotation.py b/erpnext/patches/v12_0/set_valid_till_date_in_supplier_quotation.py index 72d5521f44d..d79628f2a90 100644 --- a/erpnext/patches/v12_0/set_valid_till_date_in_supplier_quotation.py +++ b/erpnext/patches/v12_0/set_valid_till_date_in_supplier_quotation.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/stock_entry_enhancements.py b/erpnext/patches/v12_0/stock_entry_enhancements.py index b99501d942d..94d8ff9cde3 100644 --- a/erpnext/patches/v12_0/stock_entry_enhancements.py +++ b/erpnext/patches/v12_0/stock_entry_enhancements.py @@ -2,7 +2,6 @@ # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields diff --git a/erpnext/patches/v12_0/unhide_cost_center_field.py b/erpnext/patches/v12_0/unhide_cost_center_field.py index 823dd226372..72450212872 100644 --- a/erpnext/patches/v12_0/unhide_cost_center_field.py +++ b/erpnext/patches/v12_0/unhide_cost_center_field.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/unset_customer_supplier_based_on_type_of_item_price.py b/erpnext/patches/v12_0/unset_customer_supplier_based_on_type_of_item_price.py index 61c4c601b55..1a677f91672 100644 --- a/erpnext/patches/v12_0/unset_customer_supplier_based_on_type_of_item_price.py +++ b/erpnext/patches/v12_0/unset_customer_supplier_based_on_type_of_item_price.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/update_address_template_for_india.py b/erpnext/patches/v12_0/update_address_template_for_india.py index d41aae2a876..64a2e41587f 100644 --- a/erpnext/patches/v12_0/update_address_template_for_india.py +++ b/erpnext/patches/v12_0/update_address_template_for_india.py @@ -1,7 +1,6 @@ # Copyright (c) 2020, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/update_bom_in_so_mr.py b/erpnext/patches/v12_0/update_bom_in_so_mr.py index 283407567f2..7683031e278 100644 --- a/erpnext/patches/v12_0/update_bom_in_so_mr.py +++ b/erpnext/patches/v12_0/update_bom_in_so_mr.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/update_due_date_in_gle.py b/erpnext/patches/v12_0/update_due_date_in_gle.py index 60ad3251146..032c2bb9538 100644 --- a/erpnext/patches/v12_0/update_due_date_in_gle.py +++ b/erpnext/patches/v12_0/update_due_date_in_gle.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/update_end_date_and_status_in_email_campaign.py b/erpnext/patches/v12_0/update_end_date_and_status_in_email_campaign.py index 208076b1496..48febc5aa45 100644 --- a/erpnext/patches/v12_0/update_end_date_and_status_in_email_campaign.py +++ b/erpnext/patches/v12_0/update_end_date_and_status_in_email_campaign.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.utils import add_days, getdate, today diff --git a/erpnext/patches/v12_0/update_ewaybill_field_position.py b/erpnext/patches/v12_0/update_ewaybill_field_position.py index 520b5d04b4b..ace3aceebba 100644 --- a/erpnext/patches/v12_0/update_ewaybill_field_position.py +++ b/erpnext/patches/v12_0/update_ewaybill_field_position.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/update_gst_category.py b/erpnext/patches/v12_0/update_gst_category.py index bee89199316..20dce94f2ff 100644 --- a/erpnext/patches/v12_0/update_gst_category.py +++ b/erpnext/patches/v12_0/update_gst_category.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/update_healthcare_refactored_changes.py b/erpnext/patches/v12_0/update_healthcare_refactored_changes.py index bfad3ddcba7..4e24a638f98 100644 --- a/erpnext/patches/v12_0/update_healthcare_refactored_changes.py +++ b/erpnext/patches/v12_0/update_healthcare_refactored_changes.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v12_0/update_is_cancelled_field.py b/erpnext/patches/v12_0/update_is_cancelled_field.py index 3e7c37f0d19..18787848dfd 100644 --- a/erpnext/patches/v12_0/update_is_cancelled_field.py +++ b/erpnext/patches/v12_0/update_is_cancelled_field.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/update_item_tax_template_company.py b/erpnext/patches/v12_0/update_item_tax_template_company.py index 3ad983d686f..a737cb2dfa5 100644 --- a/erpnext/patches/v12_0/update_item_tax_template_company.py +++ b/erpnext/patches/v12_0/update_item_tax_template_company.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/update_owner_fields_in_acc_dimension_custom_fields.py b/erpnext/patches/v12_0/update_owner_fields_in_acc_dimension_custom_fields.py index 09e2319eb80..53e83216673 100644 --- a/erpnext/patches/v12_0/update_owner_fields_in_acc_dimension_custom_fields.py +++ b/erpnext/patches/v12_0/update_owner_fields_in_acc_dimension_custom_fields.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/update_price_list_currency_in_bom.py b/erpnext/patches/v12_0/update_price_list_currency_in_bom.py index e4c10089235..e0382d818ea 100644 --- a/erpnext/patches/v12_0/update_price_list_currency_in_bom.py +++ b/erpnext/patches/v12_0/update_price_list_currency_in_bom.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.utils import getdate diff --git a/erpnext/patches/v12_0/update_price_or_product_discount.py b/erpnext/patches/v12_0/update_price_or_product_discount.py index 4ff39257688..86105a469db 100644 --- a/erpnext/patches/v12_0/update_price_or_product_discount.py +++ b/erpnext/patches/v12_0/update_price_or_product_discount.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/update_pricing_rule_fields.py b/erpnext/patches/v12_0/update_pricing_rule_fields.py index 6f102e9b42b..b7c36ae7780 100644 --- a/erpnext/patches/v12_0/update_pricing_rule_fields.py +++ b/erpnext/patches/v12_0/update_pricing_rule_fields.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v12_0/update_uom_conversion_factor.py b/erpnext/patches/v12_0/update_uom_conversion_factor.py index 7c7477a6739..3184d1195f0 100644 --- a/erpnext/patches/v12_0/update_uom_conversion_factor.py +++ b/erpnext/patches/v12_0/update_uom_conversion_factor.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/add_default_interview_notification_templates.py b/erpnext/patches/v13_0/add_default_interview_notification_templates.py index 5e8a27fa40a..8d9f5cc89b5 100644 --- a/erpnext/patches/v13_0/add_default_interview_notification_templates.py +++ b/erpnext/patches/v13_0/add_default_interview_notification_templates.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import os diff --git a/erpnext/patches/v13_0/add_doctype_to_sla.py b/erpnext/patches/v13_0/add_doctype_to_sla.py index 7252b3e8a87..8cee378d900 100644 --- a/erpnext/patches/v13_0/add_doctype_to_sla.py +++ b/erpnext/patches/v13_0/add_doctype_to_sla.py @@ -1,7 +1,6 @@ # Copyright (c) 2020, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v13_0/add_naming_series_to_old_projects.py b/erpnext/patches/v13_0/add_naming_series_to_old_projects.py index f029f75accd..3bf2762456e 100644 --- a/erpnext/patches/v13_0/add_naming_series_to_old_projects.py +++ b/erpnext/patches/v13_0/add_naming_series_to_old_projects.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/add_po_to_global_search.py b/erpnext/patches/v13_0/add_po_to_global_search.py index 15b7c71dc2c..396d3343ba6 100644 --- a/erpnext/patches/v13_0/add_po_to_global_search.py +++ b/erpnext/patches/v13_0/add_po_to_global_search.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/add_standard_navbar_items.py b/erpnext/patches/v13_0/add_standard_navbar_items.py index 699c480c872..c739a7a93f9 100644 --- a/erpnext/patches/v13_0/add_standard_navbar_items.py +++ b/erpnext/patches/v13_0/add_standard_navbar_items.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals # import frappe from erpnext.setup.install import add_standard_navbar_items diff --git a/erpnext/patches/v13_0/bill_for_rejected_quantity_in_purchase_invoice.py b/erpnext/patches/v13_0/bill_for_rejected_quantity_in_purchase_invoice.py index 07d1cee64f8..a95f822d281 100644 --- a/erpnext/patches/v13_0/bill_for_rejected_quantity_in_purchase_invoice.py +++ b/erpnext/patches/v13_0/bill_for_rejected_quantity_in_purchase_invoice.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/change_default_pos_print_format.py b/erpnext/patches/v13_0/change_default_pos_print_format.py index 5a0320a7eb2..9664247ab41 100644 --- a/erpnext/patches/v13_0/change_default_pos_print_format.py +++ b/erpnext/patches/v13_0/change_default_pos_print_format.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/check_is_income_tax_component.py b/erpnext/patches/v13_0/check_is_income_tax_component.py index aac87ba36fa..b3ef5af1007 100644 --- a/erpnext/patches/v13_0/check_is_income_tax_component.py +++ b/erpnext/patches/v13_0/check_is_income_tax_component.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py b/erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py index 66ac62fdc4c..7ef154e6066 100644 --- a/erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py +++ b/erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/create_leave_policy_assignment_based_on_employee_current_leave_policy.py b/erpnext/patches/v13_0/create_leave_policy_assignment_based_on_employee_current_leave_policy.py index b1b5c24adc8..55125431b52 100644 --- a/erpnext/patches/v13_0/create_leave_policy_assignment_based_on_employee_current_leave_policy.py +++ b/erpnext/patches/v13_0/create_leave_policy_assignment_based_on_employee_current_leave_policy.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/create_uae_pos_invoice_fields.py b/erpnext/patches/v13_0/create_uae_pos_invoice_fields.py index 3bfa78fa282..87c9cf1ebd5 100644 --- a/erpnext/patches/v13_0/create_uae_pos_invoice_fields.py +++ b/erpnext/patches/v13_0/create_uae_pos_invoice_fields.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py b/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py index e136d64bb56..ce352a008be 100644 --- a/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py +++ b/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields diff --git a/erpnext/patches/v13_0/delete_old_bank_reconciliation_doctypes.py b/erpnext/patches/v13_0/delete_old_bank_reconciliation_doctypes.py index 089bbe3b48f..2c5c577978e 100644 --- a/erpnext/patches/v13_0/delete_old_bank_reconciliation_doctypes.py +++ b/erpnext/patches/v13_0/delete_old_bank_reconciliation_doctypes.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v13_0/delete_old_purchase_reports.py b/erpnext/patches/v13_0/delete_old_purchase_reports.py index 3cb7e120d67..e57d6d0d3e2 100644 --- a/erpnext/patches/v13_0/delete_old_purchase_reports.py +++ b/erpnext/patches/v13_0/delete_old_purchase_reports.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/delete_old_sales_reports.py b/erpnext/patches/v13_0/delete_old_sales_reports.py index c9a366655ce..c597fe86457 100644 --- a/erpnext/patches/v13_0/delete_old_sales_reports.py +++ b/erpnext/patches/v13_0/delete_old_sales_reports.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/delete_orphaned_tables.py b/erpnext/patches/v13_0/delete_orphaned_tables.py index 1ea22d63561..c32f83067bc 100644 --- a/erpnext/patches/v13_0/delete_orphaned_tables.py +++ b/erpnext/patches/v13_0/delete_orphaned_tables.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.utils import getdate diff --git a/erpnext/patches/v13_0/drop_razorpay_payload_column.py b/erpnext/patches/v13_0/drop_razorpay_payload_column.py index a7aee521983..aea498d8d30 100644 --- a/erpnext/patches/v13_0/drop_razorpay_payload_column.py +++ b/erpnext/patches/v13_0/drop_razorpay_payload_column.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/germany_fill_debtor_creditor_number.py b/erpnext/patches/v13_0/germany_fill_debtor_creditor_number.py index dca43b4193d..72cda751e6c 100644 --- a/erpnext/patches/v13_0/germany_fill_debtor_creditor_number.py +++ b/erpnext/patches/v13_0/germany_fill_debtor_creditor_number.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/germany_make_custom_fields.py b/erpnext/patches/v13_0/germany_make_custom_fields.py index 86ad1885990..80b6a3954a6 100644 --- a/erpnext/patches/v13_0/germany_make_custom_fields.py +++ b/erpnext/patches/v13_0/germany_make_custom_fields.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/gst_fields_for_pos_invoice.py b/erpnext/patches/v13_0/gst_fields_for_pos_invoice.py index 5b790d9f173..cb3df3c5ddc 100644 --- a/erpnext/patches/v13_0/gst_fields_for_pos_invoice.py +++ b/erpnext/patches/v13_0/gst_fields_for_pos_invoice.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields diff --git a/erpnext/patches/v13_0/healthcare_lab_module_rename_doctypes.py b/erpnext/patches/v13_0/healthcare_lab_module_rename_doctypes.py index f2976544a40..d43e793b9a9 100644 --- a/erpnext/patches/v13_0/healthcare_lab_module_rename_doctypes.py +++ b/erpnext/patches/v13_0/healthcare_lab_module_rename_doctypes.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v13_0/loyalty_points_entry_for_pos_invoice.py b/erpnext/patches/v13_0/loyalty_points_entry_for_pos_invoice.py index 43c6c4941ea..68bcd8a8da5 100644 --- a/erpnext/patches/v13_0/loyalty_points_entry_for_pos_invoice.py +++ b/erpnext/patches/v13_0/loyalty_points_entry_for_pos_invoice.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/make_non_standard_user_type.py b/erpnext/patches/v13_0/make_non_standard_user_type.py index 746e4080b69..9faf298c262 100644 --- a/erpnext/patches/v13_0/make_non_standard_user_type.py +++ b/erpnext/patches/v13_0/make_non_standard_user_type.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from six import iteritems diff --git a/erpnext/patches/v13_0/modify_invalid_gain_loss_gl_entries.py b/erpnext/patches/v13_0/modify_invalid_gain_loss_gl_entries.py index 3af7dac3422..ad79c811c06 100644 --- a/erpnext/patches/v13_0/modify_invalid_gain_loss_gl_entries.py +++ b/erpnext/patches/v13_0/modify_invalid_gain_loss_gl_entries.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import json diff --git a/erpnext/patches/v13_0/move_branch_code_to_bank_account.py b/erpnext/patches/v13_0/move_branch_code_to_bank_account.py index 9116f5835a1..350744fd41f 100644 --- a/erpnext/patches/v13_0/move_branch_code_to_bank_account.py +++ b/erpnext/patches/v13_0/move_branch_code_to_bank_account.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/move_doctype_reports_and_notification_from_hr_to_payroll.py b/erpnext/patches/v13_0/move_doctype_reports_and_notification_from_hr_to_payroll.py index 064e8d71a04..c07caaef661 100644 --- a/erpnext/patches/v13_0/move_doctype_reports_and_notification_from_hr_to_payroll.py +++ b/erpnext/patches/v13_0/move_doctype_reports_and_notification_from_hr_to_payroll.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/move_payroll_setting_separately_from_hr_settings.py b/erpnext/patches/v13_0/move_payroll_setting_separately_from_hr_settings.py index 85d5109248d..fca7c09c91a 100644 --- a/erpnext/patches/v13_0/move_payroll_setting_separately_from_hr_settings.py +++ b/erpnext/patches/v13_0/move_payroll_setting_separately_from_hr_settings.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/move_tax_slabs_from_payroll_period_to_income_tax_slab.py b/erpnext/patches/v13_0/move_tax_slabs_from_payroll_period_to_income_tax_slab.py index e73fa7b9ecd..d1ea22f7f26 100644 --- a/erpnext/patches/v13_0/move_tax_slabs_from_payroll_period_to_income_tax_slab.py +++ b/erpnext/patches/v13_0/move_tax_slabs_from_payroll_period_to_income_tax_slab.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/patch_to_fix_reverse_linking_in_additional_salary_encashment_and_incentive.py b/erpnext/patches/v13_0/patch_to_fix_reverse_linking_in_additional_salary_encashment_and_incentive.py index bb539a7962c..3d999bf3240 100644 --- a/erpnext/patches/v13_0/patch_to_fix_reverse_linking_in_additional_salary_encashment_and_incentive.py +++ b/erpnext/patches/v13_0/patch_to_fix_reverse_linking_in_additional_salary_encashment_and_incentive.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/print_uom_after_quantity_patch.py b/erpnext/patches/v13_0/print_uom_after_quantity_patch.py index f2022b28b8b..3da6f749aff 100644 --- a/erpnext/patches/v13_0/print_uom_after_quantity_patch.py +++ b/erpnext/patches/v13_0/print_uom_after_quantity_patch.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from erpnext.setup.install import create_print_uom_after_qty_custom_field diff --git a/erpnext/patches/v13_0/rename_discharge_date_in_ip_record.py b/erpnext/patches/v13_0/rename_discharge_date_in_ip_record.py index 2a04211a407..e9778043229 100644 --- a/erpnext/patches/v13_0/rename_discharge_date_in_ip_record.py +++ b/erpnext/patches/v13_0/rename_discharge_date_in_ip_record.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v13_0/rename_issue_doctype_fields.py b/erpnext/patches/v13_0/rename_issue_doctype_fields.py index 4aeafeabe74..bf5438c4d2e 100644 --- a/erpnext/patches/v13_0/rename_issue_doctype_fields.py +++ b/erpnext/patches/v13_0/rename_issue_doctype_fields.py @@ -1,7 +1,6 @@ # Copyright (c) 2020, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v13_0/rename_issue_status_hold_to_on_hold.py b/erpnext/patches/v13_0/rename_issue_status_hold_to_on_hold.py index 1d245db4d59..b129cbe80bc 100644 --- a/erpnext/patches/v13_0/rename_issue_status_hold_to_on_hold.py +++ b/erpnext/patches/v13_0/rename_issue_status_hold_to_on_hold.py @@ -1,7 +1,6 @@ # Copyright (c) 2020, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/rename_membership_settings_to_non_profit_settings.py b/erpnext/patches/v13_0/rename_membership_settings_to_non_profit_settings.py index 23a782a1e82..ecd03441e0a 100644 --- a/erpnext/patches/v13_0/rename_membership_settings_to_non_profit_settings.py +++ b/erpnext/patches/v13_0/rename_membership_settings_to_non_profit_settings.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v13_0/replace_pos_page_with_point_of_sale_page.py b/erpnext/patches/v13_0/replace_pos_page_with_point_of_sale_page.py index 989f1a0a281..f49b1e4bd8c 100644 --- a/erpnext/patches/v13_0/replace_pos_page_with_point_of_sale_page.py +++ b/erpnext/patches/v13_0/replace_pos_page_with_point_of_sale_page.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/replace_pos_payment_mode_table.py b/erpnext/patches/v13_0/replace_pos_payment_mode_table.py index 103c79177f1..a2c960c8f37 100644 --- a/erpnext/patches/v13_0/replace_pos_payment_mode_table.py +++ b/erpnext/patches/v13_0/replace_pos_payment_mode_table.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/reset_clearance_date_for_intracompany_payment_entries.py b/erpnext/patches/v13_0/reset_clearance_date_for_intracompany_payment_entries.py index 29343b71bf7..69fc6a2dbcf 100644 --- a/erpnext/patches/v13_0/reset_clearance_date_for_intracompany_payment_entries.py +++ b/erpnext/patches/v13_0/reset_clearance_date_for_intracompany_payment_entries.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/set_company_field_in_healthcare_doctypes.py b/erpnext/patches/v13_0/set_company_field_in_healthcare_doctypes.py index e9396c2df29..b955686a17e 100644 --- a/erpnext/patches/v13_0/set_company_field_in_healthcare_doctypes.py +++ b/erpnext/patches/v13_0/set_company_field_in_healthcare_doctypes.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/set_payment_channel_in_payment_gateway_account.py b/erpnext/patches/v13_0/set_payment_channel_in_payment_gateway_account.py index da889e61bab..3b751415eed 100644 --- a/erpnext/patches/v13_0/set_payment_channel_in_payment_gateway_account.py +++ b/erpnext/patches/v13_0/set_payment_channel_in_payment_gateway_account.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/set_pos_closing_as_failed.py b/erpnext/patches/v13_0/set_pos_closing_as_failed.py index 8c7f5088b74..a838ce07b93 100644 --- a/erpnext/patches/v13_0/set_pos_closing_as_failed.py +++ b/erpnext/patches/v13_0/set_pos_closing_as_failed.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/set_training_event_attendance.py b/erpnext/patches/v13_0/set_training_event_attendance.py index 4e3d8f5e6a5..27a9d3ff089 100644 --- a/erpnext/patches/v13_0/set_training_event_attendance.py +++ b/erpnext/patches/v13_0/set_training_event_attendance.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/set_youtube_video_id.py b/erpnext/patches/v13_0/set_youtube_video_id.py index 1594e52e4e5..76aaaea279c 100644 --- a/erpnext/patches/v13_0/set_youtube_video_id.py +++ b/erpnext/patches/v13_0/set_youtube_video_id.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/setting_custom_roles_for_some_regional_reports.py b/erpnext/patches/v13_0/setting_custom_roles_for_some_regional_reports.py index a6a3ff3be4b..36bedf4f9ba 100644 --- a/erpnext/patches/v13_0/setting_custom_roles_for_some_regional_reports.py +++ b/erpnext/patches/v13_0/setting_custom_roles_for_some_regional_reports.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/setup_gratuity_rule_for_india_and_uae.py b/erpnext/patches/v13_0/setup_gratuity_rule_for_india_and_uae.py index 01e75a6009b..82cc1ff771c 100644 --- a/erpnext/patches/v13_0/setup_gratuity_rule_for_india_and_uae.py +++ b/erpnext/patches/v13_0/setup_gratuity_rule_for_india_and_uae.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/stock_entry_enhancements.py b/erpnext/patches/v13_0/stock_entry_enhancements.py index 5fcd6a3a625..968a83a4212 100644 --- a/erpnext/patches/v13_0/stock_entry_enhancements.py +++ b/erpnext/patches/v13_0/stock_entry_enhancements.py @@ -1,7 +1,6 @@ # Copyright(c) 2020, Frappe Technologies Pvt.Ltd.and Contributors # License: GNU General Public License v3.See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/update_actual_start_and_end_date_in_wo.py b/erpnext/patches/v13_0/update_actual_start_and_end_date_in_wo.py index dd87a5302d2..10ecd093069 100644 --- a/erpnext/patches/v13_0/update_actual_start_and_end_date_in_wo.py +++ b/erpnext/patches/v13_0/update_actual_start_and_end_date_in_wo.py @@ -2,7 +2,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.utils import add_to_date diff --git a/erpnext/patches/v13_0/update_deferred_settings.py b/erpnext/patches/v13_0/update_deferred_settings.py index 54059318c75..1b63635b678 100644 --- a/erpnext/patches/v13_0/update_deferred_settings.py +++ b/erpnext/patches/v13_0/update_deferred_settings.py @@ -1,6 +1,5 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/update_job_card_details.py b/erpnext/patches/v13_0/update_job_card_details.py index a0405e50396..12f9006b76e 100644 --- a/erpnext/patches/v13_0/update_job_card_details.py +++ b/erpnext/patches/v13_0/update_job_card_details.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/update_level_in_bom.py b/erpnext/patches/v13_0/update_level_in_bom.py index 6223500e6b6..499412ee270 100644 --- a/erpnext/patches/v13_0/update_level_in_bom.py +++ b/erpnext/patches/v13_0/update_level_in_bom.py @@ -1,7 +1,6 @@ # Copyright (c) 2020, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/update_member_email_address.py b/erpnext/patches/v13_0/update_member_email_address.py index 769658e2b8a..e4bc1b3e5c7 100644 --- a/erpnext/patches/v13_0/update_member_email_address.py +++ b/erpnext/patches/v13_0/update_member_email_address.py @@ -1,7 +1,6 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v13_0/update_old_loans.py b/erpnext/patches/v13_0/update_old_loans.py index b01a87722ef..bcd80d4c5c4 100644 --- a/erpnext/patches/v13_0/update_old_loans.py +++ b/erpnext/patches/v13_0/update_old_loans.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/patches/v13_0/update_payment_terms_outstanding.py b/erpnext/patches/v13_0/update_payment_terms_outstanding.py index c9e920b7cb5..aea09ad7a37 100644 --- a/erpnext/patches/v13_0/update_payment_terms_outstanding.py +++ b/erpnext/patches/v13_0/update_payment_terms_outstanding.py @@ -1,7 +1,6 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/update_pos_closing_entry_in_merge_log.py b/erpnext/patches/v13_0/update_pos_closing_entry_in_merge_log.py index 71fe9ed6805..b2e35591970 100644 --- a/erpnext/patches/v13_0/update_pos_closing_entry_in_merge_log.py +++ b/erpnext/patches/v13_0/update_pos_closing_entry_in_merge_log.py @@ -1,7 +1,6 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/update_project_template_tasks.py b/erpnext/patches/v13_0/update_project_template_tasks.py index f0d0a5a7ef5..29debc6ad14 100644 --- a/erpnext/patches/v13_0/update_project_template_tasks.py +++ b/erpnext/patches/v13_0/update_project_template_tasks.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/update_reason_for_resignation_in_employee.py b/erpnext/patches/v13_0/update_reason_for_resignation_in_employee.py index 84075024a47..f9bfc54502f 100644 --- a/erpnext/patches/v13_0/update_reason_for_resignation_in_employee.py +++ b/erpnext/patches/v13_0/update_reason_for_resignation_in_employee.py @@ -1,7 +1,6 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/update_recipient_email_digest.py b/erpnext/patches/v13_0/update_recipient_email_digest.py index f4a48107c45..d4d45afabaf 100644 --- a/erpnext/patches/v13_0/update_recipient_email_digest.py +++ b/erpnext/patches/v13_0/update_recipient_email_digest.py @@ -1,7 +1,6 @@ # Copyright (c) 2020, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/update_response_by_variance.py b/erpnext/patches/v13_0/update_response_by_variance.py index 444ec9ecb98..d65e9035c0e 100644 --- a/erpnext/patches/v13_0/update_response_by_variance.py +++ b/erpnext/patches/v13_0/update_response_by_variance.py @@ -1,7 +1,6 @@ # Copyright (c) 2020, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/update_sla_enhancements.py b/erpnext/patches/v13_0/update_sla_enhancements.py index bcfbf8b24cb..7f61020309d 100644 --- a/erpnext/patches/v13_0/update_sla_enhancements.py +++ b/erpnext/patches/v13_0/update_sla_enhancements.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/update_start_end_date_for_old_shift_assignment.py b/erpnext/patches/v13_0/update_start_end_date_for_old_shift_assignment.py index bcdf72ec69c..665cc39923a 100644 --- a/erpnext/patches/v13_0/update_start_end_date_for_old_shift_assignment.py +++ b/erpnext/patches/v13_0/update_start_end_date_for_old_shift_assignment.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v13_0/update_subscription.py b/erpnext/patches/v13_0/update_subscription.py index e0ea78fa4d9..b0bb1c86eea 100644 --- a/erpnext/patches/v13_0/update_subscription.py +++ b/erpnext/patches/v13_0/update_subscription.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from six import iteritems diff --git a/erpnext/patches/v13_0/update_timesheet_changes.py b/erpnext/patches/v13_0/update_timesheet_changes.py index d993d54191f..cc38a0c9a16 100644 --- a/erpnext/patches/v13_0/update_timesheet_changes.py +++ b/erpnext/patches/v13_0/update_timesheet_changes.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v13_0/validate_options_for_data_field.py b/erpnext/patches/v13_0/validate_options_for_data_field.py index 41a38fe29c1..ad777b8586d 100644 --- a/erpnext/patches/v13_0/validate_options_for_data_field.py +++ b/erpnext/patches/v13_0/validate_options_for_data_field.py @@ -1,7 +1,6 @@ # Copyright (c) 2021, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.model import data_field_options diff --git a/erpnext/patches/v14_0/update_opportunity_currency_fields.py b/erpnext/patches/v14_0/update_opportunity_currency_fields.py index 223be7f6262..8ef2a94b1c0 100644 --- a/erpnext/patches/v14_0/update_opportunity_currency_fields.py +++ b/erpnext/patches/v14_0/update_opportunity_currency_fields.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.utils import flt diff --git a/erpnext/patches/v4_2/repost_reserved_qty.py b/erpnext/patches/v4_2/repost_reserved_qty.py index 4fa3b468719..c2ca9be64aa 100644 --- a/erpnext/patches/v4_2/repost_reserved_qty.py +++ b/erpnext/patches/v4_2/repost_reserved_qty.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v4_2/update_requested_and_ordered_qty.py b/erpnext/patches/v4_2/update_requested_and_ordered_qty.py index 9330a443bf3..42b0b04076f 100644 --- a/erpnext/patches/v4_2/update_requested_and_ordered_qty.py +++ b/erpnext/patches/v4_2/update_requested_and_ordered_qty.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v5_7/update_item_description_based_on_item_master.py b/erpnext/patches/v5_7/update_item_description_based_on_item_master.py index 82b5b1cc2d2..e7ef5ff0b49 100644 --- a/erpnext/patches/v5_7/update_item_description_based_on_item_master.py +++ b/erpnext/patches/v5_7/update_item_description_based_on_item_master.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v8_1/removed_roles_from_gst_report_non_indian_account.py b/erpnext/patches/v8_1/removed_roles_from_gst_report_non_indian_account.py index ecfdc41f9b8..ed1dffe75c8 100644 --- a/erpnext/patches/v8_1/removed_roles_from_gst_report_non_indian_account.py +++ b/erpnext/patches/v8_1/removed_roles_from_gst_report_non_indian_account.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v8_1/setup_gst_india.py b/erpnext/patches/v8_1/setup_gst_india.py index 140b22656b1..98097d00501 100644 --- a/erpnext/patches/v8_1/setup_gst_india.py +++ b/erpnext/patches/v8_1/setup_gst_india.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.email import sendmail_to_system_managers diff --git a/erpnext/patches/v8_7/sync_india_custom_fields.py b/erpnext/patches/v8_7/sync_india_custom_fields.py index 65ec14e8826..b5d58dc2eb8 100644 --- a/erpnext/patches/v8_7/sync_india_custom_fields.py +++ b/erpnext/patches/v8_7/sync_india_custom_fields.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/payroll/doctype/additional_salary/additional_salary.py b/erpnext/payroll/doctype/additional_salary/additional_salary.py index b6377f40066..bf8bd05fcc0 100644 --- a/erpnext/payroll/doctype/additional_salary/additional_salary.py +++ b/erpnext/payroll/doctype/additional_salary/additional_salary.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _, bold diff --git a/erpnext/payroll/doctype/additional_salary/test_additional_salary.py b/erpnext/payroll/doctype/additional_salary/test_additional_salary.py index 2ad4afef251..84de912e431 100644 --- a/erpnext/payroll/doctype/additional_salary/test_additional_salary.py +++ b/erpnext/payroll/doctype/additional_salary/test_additional_salary.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/payroll/doctype/employee_benefit_application/employee_benefit_application.py b/erpnext/payroll/doctype/employee_benefit_application/employee_benefit_application.py index 9983f012875..eda50150ebd 100644 --- a/erpnext/payroll/doctype/employee_benefit_application/employee_benefit_application.py +++ b/erpnext/payroll/doctype/employee_benefit_application/employee_benefit_application.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/payroll/doctype/employee_benefit_application/test_employee_benefit_application.py b/erpnext/payroll/doctype/employee_benefit_application/test_employee_benefit_application.py index ea05e0e0e05..02149adfce5 100644 --- a/erpnext/payroll/doctype/employee_benefit_application/test_employee_benefit_application.py +++ b/erpnext/payroll/doctype/employee_benefit_application/test_employee_benefit_application.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/payroll/doctype/employee_benefit_application_detail/employee_benefit_application_detail.py b/erpnext/payroll/doctype/employee_benefit_application_detail/employee_benefit_application_detail.py index ddcbaa20619..51aa2c9dcfc 100644 --- a/erpnext/payroll/doctype/employee_benefit_application_detail/employee_benefit_application_detail.py +++ b/erpnext/payroll/doctype/employee_benefit_application_detail/employee_benefit_application_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/payroll/doctype/employee_benefit_claim/employee_benefit_claim.py b/erpnext/payroll/doctype/employee_benefit_claim/employee_benefit_claim.py index 7898e04cf44..801ce4ba367 100644 --- a/erpnext/payroll/doctype/employee_benefit_claim/employee_benefit_claim.py +++ b/erpnext/payroll/doctype/employee_benefit_claim/employee_benefit_claim.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/payroll/doctype/employee_benefit_claim/test_employee_benefit_claim.py b/erpnext/payroll/doctype/employee_benefit_claim/test_employee_benefit_claim.py index f3f2229fb2e..b1d3c66ca86 100644 --- a/erpnext/payroll/doctype/employee_benefit_claim/test_employee_benefit_claim.py +++ b/erpnext/payroll/doctype/employee_benefit_claim/test_employee_benefit_claim.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/payroll/doctype/employee_incentive/employee_incentive.py b/erpnext/payroll/doctype/employee_incentive/employee_incentive.py index 74d073668d7..a37e22425f7 100644 --- a/erpnext/payroll/doctype/employee_incentive/employee_incentive.py +++ b/erpnext/payroll/doctype/employee_incentive/employee_incentive.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/payroll/doctype/employee_incentive/test_employee_incentive.py b/erpnext/payroll/doctype/employee_incentive/test_employee_incentive.py index 3c95fa80ec0..e296fdf864f 100644 --- a/erpnext/payroll/doctype/employee_incentive/test_employee_incentive.py +++ b/erpnext/payroll/doctype/employee_incentive/test_employee_incentive.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/payroll/doctype/employee_other_income/employee_other_income.py b/erpnext/payroll/doctype/employee_other_income/employee_other_income.py index 73a0321c8fe..51059a1364a 100644 --- a/erpnext/payroll/doctype/employee_other_income/employee_other_income.py +++ b/erpnext/payroll/doctype/employee_other_income/employee_other_income.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/payroll/doctype/employee_other_income/test_employee_other_income.py b/erpnext/payroll/doctype/employee_other_income/test_employee_other_income.py index 5b735b37a16..8f0f6376504 100644 --- a/erpnext/payroll/doctype/employee_other_income/test_employee_other_income.py +++ b/erpnext/payroll/doctype/employee_other_income/test_employee_other_income.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/payroll/doctype/employee_tax_exemption_category/employee_tax_exemption_category.py b/erpnext/payroll/doctype/employee_tax_exemption_category/employee_tax_exemption_category.py index f88f551a2ee..5c109dec965 100644 --- a/erpnext/payroll/doctype/employee_tax_exemption_category/employee_tax_exemption_category.py +++ b/erpnext/payroll/doctype/employee_tax_exemption_category/employee_tax_exemption_category.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/payroll/doctype/employee_tax_exemption_category/test_employee_tax_exemption_category.py b/erpnext/payroll/doctype/employee_tax_exemption_category/test_employee_tax_exemption_category.py index e6bc3abf127..84e6183f3b7 100644 --- a/erpnext/payroll/doctype/employee_tax_exemption_category/test_employee_tax_exemption_category.py +++ b/erpnext/payroll/doctype/employee_tax_exemption_category/test_employee_tax_exemption_category.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/payroll/doctype/employee_tax_exemption_declaration/employee_tax_exemption_declaration.py b/erpnext/payroll/doctype/employee_tax_exemption_declaration/employee_tax_exemption_declaration.py index 099ab0dcde0..9b5eab636f1 100644 --- a/erpnext/payroll/doctype/employee_tax_exemption_declaration/employee_tax_exemption_declaration.py +++ b/erpnext/payroll/doctype/employee_tax_exemption_declaration/employee_tax_exemption_declaration.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/payroll/doctype/employee_tax_exemption_declaration/test_employee_tax_exemption_declaration.py b/erpnext/payroll/doctype/employee_tax_exemption_declaration/test_employee_tax_exemption_declaration.py index b7154a4da15..fc28afdc3e5 100644 --- a/erpnext/payroll/doctype/employee_tax_exemption_declaration/test_employee_tax_exemption_declaration.py +++ b/erpnext/payroll/doctype/employee_tax_exemption_declaration/test_employee_tax_exemption_declaration.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/payroll/doctype/employee_tax_exemption_declaration_category/employee_tax_exemption_declaration_category.py b/erpnext/payroll/doctype/employee_tax_exemption_declaration_category/employee_tax_exemption_declaration_category.py index 2923e57333d..4322f31c015 100644 --- a/erpnext/payroll/doctype/employee_tax_exemption_declaration_category/employee_tax_exemption_declaration_category.py +++ b/erpnext/payroll/doctype/employee_tax_exemption_declaration_category/employee_tax_exemption_declaration_category.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/payroll/doctype/employee_tax_exemption_proof_submission/employee_tax_exemption_proof_submission.py b/erpnext/payroll/doctype/employee_tax_exemption_proof_submission/employee_tax_exemption_proof_submission.py index f35fd3caf90..56e73b37dff 100644 --- a/erpnext/payroll/doctype/employee_tax_exemption_proof_submission/employee_tax_exemption_proof_submission.py +++ b/erpnext/payroll/doctype/employee_tax_exemption_proof_submission/employee_tax_exemption_proof_submission.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document from frappe.utils import flt diff --git a/erpnext/payroll/doctype/employee_tax_exemption_proof_submission/test_employee_tax_exemption_proof_submission.py b/erpnext/payroll/doctype/employee_tax_exemption_proof_submission/test_employee_tax_exemption_proof_submission.py index aafc0a13211..f2aa64c2878 100644 --- a/erpnext/payroll/doctype/employee_tax_exemption_proof_submission/test_employee_tax_exemption_proof_submission.py +++ b/erpnext/payroll/doctype/employee_tax_exemption_proof_submission/test_employee_tax_exemption_proof_submission.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/payroll/doctype/employee_tax_exemption_proof_submission_detail/employee_tax_exemption_proof_submission_detail.py b/erpnext/payroll/doctype/employee_tax_exemption_proof_submission_detail/employee_tax_exemption_proof_submission_detail.py index e0a11aec162..37209e5840b 100644 --- a/erpnext/payroll/doctype/employee_tax_exemption_proof_submission_detail/employee_tax_exemption_proof_submission_detail.py +++ b/erpnext/payroll/doctype/employee_tax_exemption_proof_submission_detail/employee_tax_exemption_proof_submission_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/payroll/doctype/employee_tax_exemption_sub_category/employee_tax_exemption_sub_category.py b/erpnext/payroll/doctype/employee_tax_exemption_sub_category/employee_tax_exemption_sub_category.py index 5948ef208bf..4ac11f7112d 100644 --- a/erpnext/payroll/doctype/employee_tax_exemption_sub_category/employee_tax_exemption_sub_category.py +++ b/erpnext/payroll/doctype/employee_tax_exemption_sub_category/employee_tax_exemption_sub_category.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/payroll/doctype/employee_tax_exemption_sub_category/test_employee_tax_exemption_sub_category.py b/erpnext/payroll/doctype/employee_tax_exemption_sub_category/test_employee_tax_exemption_sub_category.py index 0086086bde6..64d2e3a1e6f 100644 --- a/erpnext/payroll/doctype/employee_tax_exemption_sub_category/test_employee_tax_exemption_sub_category.py +++ b/erpnext/payroll/doctype/employee_tax_exemption_sub_category/test_employee_tax_exemption_sub_category.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/payroll/doctype/gratuity/gratuity.py b/erpnext/payroll/doctype/gratuity/gratuity.py index cc28dc4972f..f563c08a047 100644 --- a/erpnext/payroll/doctype/gratuity/gratuity.py +++ b/erpnext/payroll/doctype/gratuity/gratuity.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from math import floor diff --git a/erpnext/payroll/doctype/gratuity/gratuity_dashboard.py b/erpnext/payroll/doctype/gratuity/gratuity_dashboard.py index 1599fc2bdef..6276bd6640f 100644 --- a/erpnext/payroll/doctype/gratuity/gratuity_dashboard.py +++ b/erpnext/payroll/doctype/gratuity/gratuity_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/payroll/doctype/gratuity/test_gratuity.py b/erpnext/payroll/doctype/gratuity/test_gratuity.py index 1403e9b9389..78355cae645 100644 --- a/erpnext/payroll/doctype/gratuity/test_gratuity.py +++ b/erpnext/payroll/doctype/gratuity/test_gratuity.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/payroll/doctype/gratuity_applicable_component/gratuity_applicable_component.py b/erpnext/payroll/doctype/gratuity_applicable_component/gratuity_applicable_component.py index d76b26d05f6..9c1657d21da 100644 --- a/erpnext/payroll/doctype/gratuity_applicable_component/gratuity_applicable_component.py +++ b/erpnext/payroll/doctype/gratuity_applicable_component/gratuity_applicable_component.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/payroll/doctype/gratuity_rule/gratuity_rule.py b/erpnext/payroll/doctype/gratuity_rule/gratuity_rule.py index 95d2929fffa..d30cfc64848 100644 --- a/erpnext/payroll/doctype/gratuity_rule/gratuity_rule.py +++ b/erpnext/payroll/doctype/gratuity_rule/gratuity_rule.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/payroll/doctype/gratuity_rule/gratuity_rule_dashboard.py b/erpnext/payroll/doctype/gratuity_rule/gratuity_rule_dashboard.py index 60dcfa45297..15e15d13620 100644 --- a/erpnext/payroll/doctype/gratuity_rule/gratuity_rule_dashboard.py +++ b/erpnext/payroll/doctype/gratuity_rule/gratuity_rule_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/payroll/doctype/gratuity_rule/test_gratuity_rule.py b/erpnext/payroll/doctype/gratuity_rule/test_gratuity_rule.py index c81d7b7b9e6..8393050b4a0 100644 --- a/erpnext/payroll/doctype/gratuity_rule/test_gratuity_rule.py +++ b/erpnext/payroll/doctype/gratuity_rule/test_gratuity_rule.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/payroll/doctype/gratuity_rule_slab/gratuity_rule_slab.py b/erpnext/payroll/doctype/gratuity_rule_slab/gratuity_rule_slab.py index dcd7e468655..2ae6b547986 100644 --- a/erpnext/payroll/doctype/gratuity_rule_slab/gratuity_rule_slab.py +++ b/erpnext/payroll/doctype/gratuity_rule_slab/gratuity_rule_slab.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/payroll/doctype/income_tax_slab/income_tax_slab.py b/erpnext/payroll/doctype/income_tax_slab/income_tax_slab.py index f778fd90e13..040b2c89353 100644 --- a/erpnext/payroll/doctype/income_tax_slab/income_tax_slab.py +++ b/erpnext/payroll/doctype/income_tax_slab/income_tax_slab.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/payroll/doctype/income_tax_slab/test_income_tax_slab.py b/erpnext/payroll/doctype/income_tax_slab/test_income_tax_slab.py index d76299049de..680cb3bb000 100644 --- a/erpnext/payroll/doctype/income_tax_slab/test_income_tax_slab.py +++ b/erpnext/payroll/doctype/income_tax_slab/test_income_tax_slab.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/payroll/doctype/income_tax_slab_other_charges/income_tax_slab_other_charges.py b/erpnext/payroll/doctype/income_tax_slab_other_charges/income_tax_slab_other_charges.py index 3314677485f..53911a945bd 100644 --- a/erpnext/payroll/doctype/income_tax_slab_other_charges/income_tax_slab_other_charges.py +++ b/erpnext/payroll/doctype/income_tax_slab_other_charges/income_tax_slab_other_charges.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/payroll/doctype/payroll_employee_detail/payroll_employee_detail.py b/erpnext/payroll/doctype/payroll_employee_detail/payroll_employee_detail.py index 074d2232245..8cc426b9dba 100644 --- a/erpnext/payroll/doctype/payroll_employee_detail/payroll_employee_detail.py +++ b/erpnext/payroll/doctype/payroll_employee_detail/payroll_employee_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/payroll/doctype/payroll_entry/payroll_entry.py b/erpnext/payroll/doctype/payroll_entry/payroll_entry.py index f1557c78a37..84c59a2c2b8 100644 --- a/erpnext/payroll/doctype/payroll_entry/payroll_entry.py +++ b/erpnext/payroll/doctype/payroll_entry/payroll_entry.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from dateutil.relativedelta import relativedelta diff --git a/erpnext/payroll/doctype/payroll_entry/payroll_entry_dashboard.py b/erpnext/payroll/doctype/payroll_entry/payroll_entry_dashboard.py index 16e44d08684..138fed68f4c 100644 --- a/erpnext/payroll/doctype/payroll_entry/payroll_entry_dashboard.py +++ b/erpnext/payroll/doctype/payroll_entry/payroll_entry_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/payroll/doctype/payroll_entry/test_payroll_entry.py b/erpnext/payroll/doctype/payroll_entry/test_payroll_entry.py index dd0e1270800..c6f38972880 100644 --- a/erpnext/payroll/doctype/payroll_entry/test_payroll_entry.py +++ b/erpnext/payroll/doctype/payroll_entry/test_payroll_entry.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/payroll/doctype/payroll_period/payroll_period.py b/erpnext/payroll/doctype/payroll_period/payroll_period.py index 0de8d63df73..659ec6de7b6 100644 --- a/erpnext/payroll/doctype/payroll_period/payroll_period.py +++ b/erpnext/payroll/doctype/payroll_period/payroll_period.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/payroll/doctype/payroll_period/payroll_period_dashboard.py b/erpnext/payroll/doctype/payroll_period/payroll_period_dashboard.py index 4105d8ee928..eaa67732af4 100644 --- a/erpnext/payroll/doctype/payroll_period/payroll_period_dashboard.py +++ b/erpnext/payroll/doctype/payroll_period/payroll_period_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/payroll/doctype/payroll_period/test_payroll_period.py b/erpnext/payroll/doctype/payroll_period/test_payroll_period.py index e93c0e524de..61967c04bda 100644 --- a/erpnext/payroll/doctype/payroll_period/test_payroll_period.py +++ b/erpnext/payroll/doctype/payroll_period/test_payroll_period.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/payroll/doctype/payroll_period_date/payroll_period_date.py b/erpnext/payroll/doctype/payroll_period_date/payroll_period_date.py index fa6835da53b..c90a76a829a 100644 --- a/erpnext/payroll/doctype/payroll_period_date/payroll_period_date.py +++ b/erpnext/payroll/doctype/payroll_period_date/payroll_period_date.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/payroll/doctype/payroll_settings/payroll_settings.py b/erpnext/payroll/doctype/payroll_settings/payroll_settings.py index b85d5545d04..6fd30946f55 100644 --- a/erpnext/payroll/doctype/payroll_settings/payroll_settings.py +++ b/erpnext/payroll/doctype/payroll_settings/payroll_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/payroll/doctype/payroll_settings/test_payroll_settings.py b/erpnext/payroll/doctype/payroll_settings/test_payroll_settings.py index 30a6a332b7c..3b96db6ed4c 100644 --- a/erpnext/payroll/doctype/payroll_settings/test_payroll_settings.py +++ b/erpnext/payroll/doctype/payroll_settings/test_payroll_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/payroll/doctype/retention_bonus/retention_bonus.py b/erpnext/payroll/doctype/retention_bonus/retention_bonus.py index 7e731e7fce1..10e8381007b 100644 --- a/erpnext/payroll/doctype/retention_bonus/retention_bonus.py +++ b/erpnext/payroll/doctype/retention_bonus/retention_bonus.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/payroll/doctype/retention_bonus/test_retention_bonus.py b/erpnext/payroll/doctype/retention_bonus/test_retention_bonus.py index a380d9fb44a..c86bf335114 100644 --- a/erpnext/payroll/doctype/retention_bonus/test_retention_bonus.py +++ b/erpnext/payroll/doctype/retention_bonus/test_retention_bonus.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/payroll/doctype/salary_component/salary_component.py b/erpnext/payroll/doctype/salary_component/salary_component.py index 761d4436f37..b8def58643a 100644 --- a/erpnext/payroll/doctype/salary_component/salary_component.py +++ b/erpnext/payroll/doctype/salary_component/salary_component.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document from frappe.model.naming import append_number_if_name_exists diff --git a/erpnext/payroll/doctype/salary_component/test_salary_component.py b/erpnext/payroll/doctype/salary_component/test_salary_component.py index 939fa4aade1..6e00971a230 100644 --- a/erpnext/payroll/doctype/salary_component/test_salary_component.py +++ b/erpnext/payroll/doctype/salary_component/test_salary_component.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/payroll/doctype/salary_detail/salary_detail.py b/erpnext/payroll/doctype/salary_detail/salary_detail.py index 50d1958caec..c74bd546eb3 100644 --- a/erpnext/payroll/doctype/salary_detail/salary_detail.py +++ b/erpnext/payroll/doctype/salary_detail/salary_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/payroll/doctype/salary_slip/__init__.py b/erpnext/payroll/doctype/salary_slip/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/payroll/doctype/salary_slip/__init__.py +++ b/erpnext/payroll/doctype/salary_slip/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/payroll/doctype/salary_slip/salary_slip.py b/erpnext/payroll/doctype/salary_slip/salary_slip.py index bee96b6430c..7a5b6d0f6d4 100644 --- a/erpnext/payroll/doctype/salary_slip/salary_slip.py +++ b/erpnext/payroll/doctype/salary_slip/salary_slip.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import datetime import math diff --git a/erpnext/payroll/doctype/salary_slip/test_salary_slip.py b/erpnext/payroll/doctype/salary_slip/test_salary_slip.py index c4b6a38c4e3..e4618c31f20 100644 --- a/erpnext/payroll/doctype/salary_slip/test_salary_slip.py +++ b/erpnext/payroll/doctype/salary_slip/test_salary_slip.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import calendar import random diff --git a/erpnext/payroll/doctype/salary_slip_leave/salary_slip_leave.py b/erpnext/payroll/doctype/salary_slip_leave/salary_slip_leave.py index fc8282b82ba..b29a60bd4a8 100644 --- a/erpnext/payroll/doctype/salary_slip_leave/salary_slip_leave.py +++ b/erpnext/payroll/doctype/salary_slip_leave/salary_slip_leave.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/payroll/doctype/salary_slip_timesheet/salary_slip_timesheet.py b/erpnext/payroll/doctype/salary_slip_timesheet/salary_slip_timesheet.py index 79c4c6e5715..022eba05fdd 100644 --- a/erpnext/payroll/doctype/salary_slip_timesheet/salary_slip_timesheet.py +++ b/erpnext/payroll/doctype/salary_slip_timesheet/salary_slip_timesheet.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/payroll/doctype/salary_structure/__init__.py b/erpnext/payroll/doctype/salary_structure/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/payroll/doctype/salary_structure/__init__.py +++ b/erpnext/payroll/doctype/salary_structure/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/payroll/doctype/salary_structure/salary_structure.py b/erpnext/payroll/doctype/salary_structure/salary_structure.py index ef401b2d1a7..ae83c046a5e 100644 --- a/erpnext/payroll/doctype/salary_structure/salary_structure.py +++ b/erpnext/payroll/doctype/salary_structure/salary_structure.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/payroll/doctype/salary_structure/salary_structure_dashboard.py b/erpnext/payroll/doctype/salary_structure/salary_structure_dashboard.py index 11d9a944096..27eb5ed8b11 100644 --- a/erpnext/payroll/doctype/salary_structure/salary_structure_dashboard.py +++ b/erpnext/payroll/doctype/salary_structure/salary_structure_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/payroll/doctype/salary_structure/test_salary_structure.py b/erpnext/payroll/doctype/salary_structure/test_salary_structure.py index ff4a55e29cf..e2d0d1c864c 100644 --- a/erpnext/payroll/doctype/salary_structure/test_salary_structure.py +++ b/erpnext/payroll/doctype/salary_structure/test_salary_structure.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.py b/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.py index 385cf36b7f5..e1ff9ca9f04 100644 --- a/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.py +++ b/erpnext/payroll/doctype/salary_structure_assignment/salary_structure_assignment.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/payroll/doctype/salary_structure_assignment/test_salary_structure_assignment.py b/erpnext/payroll/doctype/salary_structure_assignment/test_salary_structure_assignment.py index fbb894c43ed..56dd0d0fe50 100644 --- a/erpnext/payroll/doctype/salary_structure_assignment/test_salary_structure_assignment.py +++ b/erpnext/payroll/doctype/salary_structure_assignment/test_salary_structure_assignment.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/payroll/doctype/taxable_salary_slab/taxable_salary_slab.py b/erpnext/payroll/doctype/taxable_salary_slab/taxable_salary_slab.py index c0827c445db..d1ccbe38582 100644 --- a/erpnext/payroll/doctype/taxable_salary_slab/taxable_salary_slab.py +++ b/erpnext/payroll/doctype/taxable_salary_slab/taxable_salary_slab.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/payroll/notification/retention_bonus/retention_bonus.py b/erpnext/payroll/notification/retention_bonus/retention_bonus.py index f57de916dd1..19b550feea7 100644 --- a/erpnext/payroll/notification/retention_bonus/retention_bonus.py +++ b/erpnext/payroll/notification/retention_bonus/retention_bonus.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_context(context): diff --git a/erpnext/payroll/report/bank_remittance/bank_remittance.py b/erpnext/payroll/report/bank_remittance/bank_remittance.py index d55317e71e4..6c3bd37b043 100644 --- a/erpnext/payroll/report/bank_remittance/bank_remittance.py +++ b/erpnext/payroll/report/bank_remittance/bank_remittance.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _, get_all diff --git a/erpnext/payroll/report/income_tax_deductions/income_tax_deductions.py b/erpnext/payroll/report/income_tax_deductions/income_tax_deductions.py index 296a7c233f3..75a9f97ea58 100644 --- a/erpnext/payroll/report/income_tax_deductions/income_tax_deductions.py +++ b/erpnext/payroll/report/income_tax_deductions/income_tax_deductions.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/payroll/report/salary_payments_based_on_payment_mode/salary_payments_based_on_payment_mode.py b/erpnext/payroll/report/salary_payments_based_on_payment_mode/salary_payments_based_on_payment_mode.py index 57ea1b3c283..fa68575e688 100644 --- a/erpnext/payroll/report/salary_payments_based_on_payment_mode/salary_payments_based_on_payment_mode.py +++ b/erpnext/payroll/report/salary_payments_based_on_payment_mode/salary_payments_based_on_payment_mode.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/payroll/report/salary_payments_via_ecs/salary_payments_via_ecs.py b/erpnext/payroll/report/salary_payments_via_ecs/salary_payments_via_ecs.py index bc8fd9d40b2..578c8164009 100644 --- a/erpnext/payroll/report/salary_payments_via_ecs/salary_payments_via_ecs.py +++ b/erpnext/payroll/report/salary_payments_via_ecs/salary_payments_via_ecs.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/payroll/report/salary_register/salary_register.py b/erpnext/payroll/report/salary_register/salary_register.py index 2a9dad66e25..13ee691d876 100644 --- a/erpnext/payroll/report/salary_register/salary_register.py +++ b/erpnext/payroll/report/salary_register/salary_register.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/portal/doctype/homepage/homepage.py b/erpnext/portal/doctype/homepage/homepage.py index 7eeaf4b80a0..1e056a6dacb 100644 --- a/erpnext/portal/doctype/homepage/homepage.py +++ b/erpnext/portal/doctype/homepage/homepage.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/portal/doctype/homepage/test_homepage.py b/erpnext/portal/doctype/homepage/test_homepage.py index bc8a8282472..fb0367f9031 100644 --- a/erpnext/portal/doctype/homepage/test_homepage.py +++ b/erpnext/portal/doctype/homepage/test_homepage.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/portal/doctype/homepage_featured_product/homepage_featured_product.py b/erpnext/portal/doctype/homepage_featured_product/homepage_featured_product.py index 8e8f77605e6..c21461d631d 100644 --- a/erpnext/portal/doctype/homepage_featured_product/homepage_featured_product.py +++ b/erpnext/portal/doctype/homepage_featured_product/homepage_featured_product.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/portal/doctype/homepage_section/homepage_section.py b/erpnext/portal/doctype/homepage_section/homepage_section.py index 081786126e7..7181affbea7 100644 --- a/erpnext/portal/doctype/homepage_section/homepage_section.py +++ b/erpnext/portal/doctype/homepage_section/homepage_section.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document from frappe.utils import cint diff --git a/erpnext/portal/doctype/homepage_section/test_homepage_section.py b/erpnext/portal/doctype/homepage_section/test_homepage_section.py index 6fb7d0a6f07..b30d983adc3 100644 --- a/erpnext/portal/doctype/homepage_section/test_homepage_section.py +++ b/erpnext/portal/doctype/homepage_section/test_homepage_section.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/portal/doctype/homepage_section_card/homepage_section_card.py b/erpnext/portal/doctype/homepage_section_card/homepage_section_card.py index b71045207cc..eeff63c3f35 100644 --- a/erpnext/portal/doctype/homepage_section_card/homepage_section_card.py +++ b/erpnext/portal/doctype/homepage_section_card/homepage_section_card.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/portal/doctype/products_settings/products_settings.py b/erpnext/portal/doctype/products_settings/products_settings.py index d4f09b9c8c2..0e106c634b8 100644 --- a/erpnext/portal/doctype/products_settings/products_settings.py +++ b/erpnext/portal/doctype/products_settings/products_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/portal/doctype/products_settings/test_products_settings.py b/erpnext/portal/doctype/products_settings/test_products_settings.py index 5495cc9d961..66026fc0467 100644 --- a/erpnext/portal/doctype/products_settings/test_products_settings.py +++ b/erpnext/portal/doctype/products_settings/test_products_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/portal/doctype/website_attribute/website_attribute.py b/erpnext/portal/doctype/website_attribute/website_attribute.py index f9ba733b85d..58a73768be2 100644 --- a/erpnext/portal/doctype/website_attribute/website_attribute.py +++ b/erpnext/portal/doctype/website_attribute/website_attribute.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/portal/doctype/website_filter_field/website_filter_field.py b/erpnext/portal/doctype/website_filter_field/website_filter_field.py index 335d4575b61..8067ebba0fa 100644 --- a/erpnext/portal/doctype/website_filter_field/website_filter_field.py +++ b/erpnext/portal/doctype/website_filter_field/website_filter_field.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/portal/product_configurator/test_product_configurator.py b/erpnext/portal/product_configurator/test_product_configurator.py index 5db74f2c40d..7a17d1422d9 100644 --- a/erpnext/portal/product_configurator/test_product_configurator.py +++ b/erpnext/portal/product_configurator/test_product_configurator.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import unittest diff --git a/erpnext/portal/utils.py b/erpnext/portal/utils.py index bae8f353b35..d0a5819fd34 100644 --- a/erpnext/portal/utils.py +++ b/erpnext/portal/utils.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.utils.nestedset import get_root_of diff --git a/erpnext/projects/doctype/__init__.py b/erpnext/projects/doctype/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/projects/doctype/__init__.py +++ b/erpnext/projects/doctype/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/projects/doctype/activity_cost/activity_cost.py b/erpnext/projects/doctype/activity_cost/activity_cost.py index e210324862b..bc4bb9dcba4 100644 --- a/erpnext/projects/doctype/activity_cost/activity_cost.py +++ b/erpnext/projects/doctype/activity_cost/activity_cost.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/projects/doctype/activity_cost/test_activity_cost.py b/erpnext/projects/doctype/activity_cost/test_activity_cost.py index c031f3cedab..d53e582adc6 100644 --- a/erpnext/projects/doctype/activity_cost/test_activity_cost.py +++ b/erpnext/projects/doctype/activity_cost/test_activity_cost.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/projects/doctype/activity_type/activity_type.py b/erpnext/projects/doctype/activity_type/activity_type.py index 4c94fe45650..5151098bec3 100644 --- a/erpnext/projects/doctype/activity_type/activity_type.py +++ b/erpnext/projects/doctype/activity_type/activity_type.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/projects/doctype/activity_type/test_activity_type.py b/erpnext/projects/doctype/activity_type/test_activity_type.py index 02619af7abd..bb74b881f4c 100644 --- a/erpnext/projects/doctype/activity_type/test_activity_type.py +++ b/erpnext/projects/doctype/activity_type/test_activity_type.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/projects/doctype/dependent_task/dependent_task.py b/erpnext/projects/doctype/dependent_task/dependent_task.py index 3f62cef7056..73ce8f9c3d3 100644 --- a/erpnext/projects/doctype/dependent_task/dependent_task.py +++ b/erpnext/projects/doctype/dependent_task/dependent_task.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/projects/doctype/project/__init__.py b/erpnext/projects/doctype/project/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/projects/doctype/project/__init__.py +++ b/erpnext/projects/doctype/project/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py index df970f34c2b..6281c1a8185 100644 --- a/erpnext/projects/doctype/project/project.py +++ b/erpnext/projects/doctype/project/project.py @@ -1,7 +1,6 @@ # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from email_reply_parser import EmailReplyParser diff --git a/erpnext/projects/doctype/project/project_dashboard.py b/erpnext/projects/doctype/project/project_dashboard.py index 64fbbf5ebab..df274ed9a94 100644 --- a/erpnext/projects/doctype/project/project_dashboard.py +++ b/erpnext/projects/doctype/project/project_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/projects/doctype/project/test_project.py b/erpnext/projects/doctype/project/test_project.py index c64ac8d0ea8..df42e82ad47 100644 --- a/erpnext/projects/doctype/project/test_project.py +++ b/erpnext/projects/doctype/project/test_project.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/projects/doctype/project_template/project_template.py b/erpnext/projects/doctype/project_template/project_template.py index 493ce5b07cb..3cc8d6855f2 100644 --- a/erpnext/projects/doctype/project_template/project_template.py +++ b/erpnext/projects/doctype/project_template/project_template.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/projects/doctype/project_template/project_template_dashboard.py b/erpnext/projects/doctype/project_template/project_template_dashboard.py index 8eeaa8d6bd8..65cd8d4b55a 100644 --- a/erpnext/projects/doctype/project_template/project_template_dashboard.py +++ b/erpnext/projects/doctype/project_template/project_template_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/projects/doctype/project_template/test_project_template.py b/erpnext/projects/doctype/project_template/test_project_template.py index f71984f3a41..842483343a2 100644 --- a/erpnext/projects/doctype/project_template/test_project_template.py +++ b/erpnext/projects/doctype/project_template/test_project_template.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/projects/doctype/project_template_task/project_template_task.py b/erpnext/projects/doctype/project_template_task/project_template_task.py index e0861419886..01ec93500c3 100644 --- a/erpnext/projects/doctype/project_template_task/project_template_task.py +++ b/erpnext/projects/doctype/project_template_task/project_template_task.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/projects/doctype/project_type/project_type.py b/erpnext/projects/doctype/project_type/project_type.py index 1089483cb3f..4a3724d6a5e 100644 --- a/erpnext/projects/doctype/project_type/project_type.py +++ b/erpnext/projects/doctype/project_type/project_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/projects/doctype/project_type/test_project_type.py b/erpnext/projects/doctype/project_type/test_project_type.py index a79020f14ff..3e670d06bd5 100644 --- a/erpnext/projects/doctype/project_type/test_project_type.py +++ b/erpnext/projects/doctype/project_type/test_project_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/projects/doctype/project_update/project_update.py b/erpnext/projects/doctype/project_update/project_update.py index 147e591f8fd..42ba5f6075c 100644 --- a/erpnext/projects/doctype/project_update/project_update.py +++ b/erpnext/projects/doctype/project_update/project_update.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/projects/doctype/project_update/test_project_update.py b/erpnext/projects/doctype/project_update/test_project_update.py index 15966039799..f29c931ac05 100644 --- a/erpnext/projects/doctype/project_update/test_project_update.py +++ b/erpnext/projects/doctype/project_update/test_project_update.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/projects/doctype/project_user/project_user.py b/erpnext/projects/doctype/project_user/project_user.py index 7abe9459f24..a52bcb170a0 100644 --- a/erpnext/projects/doctype/project_user/project_user.py +++ b/erpnext/projects/doctype/project_user/project_user.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/projects/doctype/projects_settings/projects_settings.py b/erpnext/projects/doctype/projects_settings/projects_settings.py index 88bb247a3c6..db1dc45d764 100644 --- a/erpnext/projects/doctype/projects_settings/projects_settings.py +++ b/erpnext/projects/doctype/projects_settings/projects_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/projects/doctype/projects_settings/test_projects_settings.py b/erpnext/projects/doctype/projects_settings/test_projects_settings.py index 326624686da..79e78320bb4 100644 --- a/erpnext/projects/doctype/projects_settings/test_projects_settings.py +++ b/erpnext/projects/doctype/projects_settings/test_projects_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/projects/doctype/task/__init__.py b/erpnext/projects/doctype/task/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/projects/doctype/task/__init__.py +++ b/erpnext/projects/doctype/task/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py index 6b9062297ed..9b1ea043be6 100755 --- a/erpnext/projects/doctype/task/task.py +++ b/erpnext/projects/doctype/task/task.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/projects/doctype/task/task_dashboard.py b/erpnext/projects/doctype/task/task_dashboard.py index b776b98f676..40d04e13ebc 100644 --- a/erpnext/projects/doctype/task/task_dashboard.py +++ b/erpnext/projects/doctype/task/task_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/projects/doctype/task/test_task.py b/erpnext/projects/doctype/task/test_task.py index 41a9c168dfa..a0ac7c14978 100644 --- a/erpnext/projects/doctype/task/test_task.py +++ b/erpnext/projects/doctype/task/test_task.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/projects/doctype/task_depends_on/task_depends_on.py b/erpnext/projects/doctype/task_depends_on/task_depends_on.py index ddb67ee30cb..0db1f81f28d 100644 --- a/erpnext/projects/doctype/task_depends_on/task_depends_on.py +++ b/erpnext/projects/doctype/task_depends_on/task_depends_on.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/projects/doctype/task_type/task_type.py b/erpnext/projects/doctype/task_type/task_type.py index 5aacf8a2395..08bed6973d0 100644 --- a/erpnext/projects/doctype/task_type/task_type.py +++ b/erpnext/projects/doctype/task_type/task_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/projects/doctype/task_type/test_task_type.py b/erpnext/projects/doctype/task_type/test_task_type.py index 7690c3775af..ef99402f7ad 100644 --- a/erpnext/projects/doctype/task_type/test_task_type.py +++ b/erpnext/projects/doctype/task_type/test_task_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/projects/doctype/timesheet/test_timesheet.py b/erpnext/projects/doctype/timesheet/test_timesheet.py index 6b32c66dfe5..d59cc01013b 100644 --- a/erpnext/projects/doctype/timesheet/test_timesheet.py +++ b/erpnext/projects/doctype/timesheet/test_timesheet.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import datetime import unittest diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py index 363c3b6a3ca..e92785e06cf 100644 --- a/erpnext/projects/doctype/timesheet/timesheet.py +++ b/erpnext/projects/doctype/timesheet/timesheet.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/projects/doctype/timesheet/timesheet_dashboard.py b/erpnext/projects/doctype/timesheet/timesheet_dashboard.py index 3ef1d92dcdb..d9a341d4dff 100644 --- a/erpnext/projects/doctype/timesheet/timesheet_dashboard.py +++ b/erpnext/projects/doctype/timesheet/timesheet_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/projects/doctype/timesheet_detail/timesheet_detail.py b/erpnext/projects/doctype/timesheet_detail/timesheet_detail.py index 4fd233ebb21..d527a3c9223 100644 --- a/erpnext/projects/doctype/timesheet_detail/timesheet_detail.py +++ b/erpnext/projects/doctype/timesheet_detail/timesheet_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/projects/report/billing_summary.py b/erpnext/projects/report/billing_summary.py index dec2824fcc0..46479d0a19b 100644 --- a/erpnext/projects/report/billing_summary.py +++ b/erpnext/projects/report/billing_summary.py @@ -2,7 +2,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.py b/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.py index 3a33b4b1a7e..f73376871aa 100644 --- a/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.py +++ b/erpnext/projects/report/daily_timesheet_summary/daily_timesheet_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/projects/report/delayed_tasks_summary/delayed_tasks_summary.py b/erpnext/projects/report/delayed_tasks_summary/delayed_tasks_summary.py index 301639015c3..3ab2bb652b0 100644 --- a/erpnext/projects/report/delayed_tasks_summary/delayed_tasks_summary.py +++ b/erpnext/projects/report/delayed_tasks_summary/delayed_tasks_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.utils import date_diff, nowdate diff --git a/erpnext/projects/report/delayed_tasks_summary/test_delayed_tasks_summary.py b/erpnext/projects/report/delayed_tasks_summary/test_delayed_tasks_summary.py index 88c77c88b43..0d97ddf85ae 100644 --- a/erpnext/projects/report/delayed_tasks_summary/test_delayed_tasks_summary.py +++ b/erpnext/projects/report/delayed_tasks_summary/test_delayed_tasks_summary.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import unittest diff --git a/erpnext/projects/report/employee_billing_summary/employee_billing_summary.py b/erpnext/projects/report/employee_billing_summary/employee_billing_summary.py index 30bd9f0182f..a2f7378d1b7 100644 --- a/erpnext/projects/report/employee_billing_summary/employee_billing_summary.py +++ b/erpnext/projects/report/employee_billing_summary/employee_billing_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/projects/report/employee_hours_utilization_based_on_timesheet/employee_hours_utilization_based_on_timesheet.py b/erpnext/projects/report/employee_hours_utilization_based_on_timesheet/employee_hours_utilization_based_on_timesheet.py index d59a2ac52a6..2854ea31fe0 100644 --- a/erpnext/projects/report/employee_hours_utilization_based_on_timesheet/employee_hours_utilization_based_on_timesheet.py +++ b/erpnext/projects/report/employee_hours_utilization_based_on_timesheet/employee_hours_utilization_based_on_timesheet.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/projects/report/employee_hours_utilization_based_on_timesheet/test_employee_util.py b/erpnext/projects/report/employee_hours_utilization_based_on_timesheet/test_employee_util.py index f456c84a588..99593822052 100644 --- a/erpnext/projects/report/employee_hours_utilization_based_on_timesheet/test_employee_util.py +++ b/erpnext/projects/report/employee_hours_utilization_based_on_timesheet/test_employee_util.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import unittest diff --git a/erpnext/projects/report/project_billing_summary/project_billing_summary.py b/erpnext/projects/report/project_billing_summary/project_billing_summary.py index 30bd9f0182f..a2f7378d1b7 100644 --- a/erpnext/projects/report/project_billing_summary/project_billing_summary.py +++ b/erpnext/projects/report/project_billing_summary/project_billing_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/projects/report/project_profitability/project_profitability.py b/erpnext/projects/report/project_profitability/project_profitability.py index 13e02c89355..9520cd17be2 100644 --- a/erpnext/projects/report/project_profitability/project_profitability.py +++ b/erpnext/projects/report/project_profitability/project_profitability.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/projects/report/project_profitability/test_project_profitability.py b/erpnext/projects/report/project_profitability/test_project_profitability.py index 8cf169b38f4..31fd361fce5 100644 --- a/erpnext/projects/report/project_profitability/test_project_profitability.py +++ b/erpnext/projects/report/project_profitability/test_project_profitability.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import unittest diff --git a/erpnext/projects/report/project_summary/project_summary.py b/erpnext/projects/report/project_summary/project_summary.py index dbb4e848578..ce1b70160c8 100644 --- a/erpnext/projects/report/project_summary/project_summary.py +++ b/erpnext/projects/report/project_summary/project_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.py b/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.py index 5d2b7dbc5be..31bcc3b2ca3 100644 --- a/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.py +++ b/erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/projects/utils.py b/erpnext/projects/utils.py index 69264704b4b..5d7455039af 100644 --- a/erpnext/projects/utils.py +++ b/erpnext/projects/utils.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/projects/web_form/tasks/tasks.py b/erpnext/projects/web_form/tasks/tasks.py index aed794261ea..67cad05a482 100644 --- a/erpnext/projects/web_form/tasks/tasks.py +++ b/erpnext/projects/web_form/tasks/tasks.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/quality_management/doctype/non_conformance/non_conformance.py b/erpnext/quality_management/doctype/non_conformance/non_conformance.py index a4613fdaf6b..a2198f374ad 100644 --- a/erpnext/quality_management/doctype/non_conformance/non_conformance.py +++ b/erpnext/quality_management/doctype/non_conformance/non_conformance.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/quality_management/doctype/non_conformance/test_non_conformance.py b/erpnext/quality_management/doctype/non_conformance/test_non_conformance.py index 759b117f9b0..3e94b35745c 100644 --- a/erpnext/quality_management/doctype/non_conformance/test_non_conformance.py +++ b/erpnext/quality_management/doctype/non_conformance/test_non_conformance.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/quality_management/doctype/quality_action/quality_action.py b/erpnext/quality_management/doctype/quality_action/quality_action.py index 646a0dfc2c8..87245f9a3f8 100644 --- a/erpnext/quality_management/doctype/quality_action/quality_action.py +++ b/erpnext/quality_management/doctype/quality_action/quality_action.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/quality_management/doctype/quality_action/test_quality_action.py b/erpnext/quality_management/doctype/quality_action/test_quality_action.py index 33229d4b451..fefa9dfe9cd 100644 --- a/erpnext/quality_management/doctype/quality_action/test_quality_action.py +++ b/erpnext/quality_management/doctype/quality_action/test_quality_action.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/quality_management/doctype/quality_action_resolution/quality_action_resolution.py b/erpnext/quality_management/doctype/quality_action_resolution/quality_action_resolution.py index b456fb7e9a0..7ede3e4de00 100644 --- a/erpnext/quality_management/doctype/quality_action_resolution/quality_action_resolution.py +++ b/erpnext/quality_management/doctype/quality_action_resolution/quality_action_resolution.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/quality_management/doctype/quality_feedback/quality_feedback.py b/erpnext/quality_management/doctype/quality_feedback/quality_feedback.py index 9189c282973..ec5d67f4f03 100644 --- a/erpnext/quality_management/doctype/quality_feedback/quality_feedback.py +++ b/erpnext/quality_management/doctype/quality_feedback/quality_feedback.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/quality_management/doctype/quality_feedback/test_quality_feedback.py b/erpnext/quality_management/doctype/quality_feedback/test_quality_feedback.py index 7a87c362446..fe36cc6e5b1 100644 --- a/erpnext/quality_management/doctype/quality_feedback/test_quality_feedback.py +++ b/erpnext/quality_management/doctype/quality_feedback/test_quality_feedback.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/quality_management/doctype/quality_feedback_parameter/quality_feedback_parameter.py b/erpnext/quality_management/doctype/quality_feedback_parameter/quality_feedback_parameter.py index 9a21b263603..ff2c8415766 100644 --- a/erpnext/quality_management/doctype/quality_feedback_parameter/quality_feedback_parameter.py +++ b/erpnext/quality_management/doctype/quality_feedback_parameter/quality_feedback_parameter.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/quality_management/doctype/quality_feedback_template/quality_feedback_template.py b/erpnext/quality_management/doctype/quality_feedback_template/quality_feedback_template.py index c6a520a3c59..4590f9d3a05 100644 --- a/erpnext/quality_management/doctype/quality_feedback_template/quality_feedback_template.py +++ b/erpnext/quality_management/doctype/quality_feedback_template/quality_feedback_template.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/quality_management/doctype/quality_feedback_template/test_quality_feedback_template.py b/erpnext/quality_management/doctype/quality_feedback_template/test_quality_feedback_template.py index 1de58aae3ed..4b8bc0f0437 100644 --- a/erpnext/quality_management/doctype/quality_feedback_template/test_quality_feedback_template.py +++ b/erpnext/quality_management/doctype/quality_feedback_template/test_quality_feedback_template.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/quality_management/doctype/quality_feedback_template_parameter/quality_feedback_template_parameter.py b/erpnext/quality_management/doctype/quality_feedback_template_parameter/quality_feedback_template_parameter.py index 44a6b014a0c..13e215f954a 100644 --- a/erpnext/quality_management/doctype/quality_feedback_template_parameter/quality_feedback_template_parameter.py +++ b/erpnext/quality_management/doctype/quality_feedback_template_parameter/quality_feedback_template_parameter.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/quality_management/doctype/quality_goal/quality_goal.py b/erpnext/quality_management/doctype/quality_goal/quality_goal.py index 2888401782a..22ba81073d1 100644 --- a/erpnext/quality_management/doctype/quality_goal/quality_goal.py +++ b/erpnext/quality_management/doctype/quality_goal/quality_goal.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/quality_management/doctype/quality_goal/test_quality_goal.py b/erpnext/quality_management/doctype/quality_goal/test_quality_goal.py index 84240d227ea..67fdaca6d9b 100644 --- a/erpnext/quality_management/doctype/quality_goal/test_quality_goal.py +++ b/erpnext/quality_management/doctype/quality_goal/test_quality_goal.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/quality_management/doctype/quality_goal_objective/quality_goal_objective.py b/erpnext/quality_management/doctype/quality_goal_objective/quality_goal_objective.py index c9c2c6e564c..eaa8db21563 100644 --- a/erpnext/quality_management/doctype/quality_goal_objective/quality_goal_objective.py +++ b/erpnext/quality_management/doctype/quality_goal_objective/quality_goal_objective.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/quality_management/doctype/quality_meeting/quality_meeting.py b/erpnext/quality_management/doctype/quality_meeting/quality_meeting.py index 0ac0484399e..481b3c17f11 100644 --- a/erpnext/quality_management/doctype/quality_meeting/quality_meeting.py +++ b/erpnext/quality_management/doctype/quality_meeting/quality_meeting.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/quality_management/doctype/quality_meeting/test_quality_meeting.py b/erpnext/quality_management/doctype/quality_meeting/test_quality_meeting.py index e57256d2896..910b8a1130a 100644 --- a/erpnext/quality_management/doctype/quality_meeting/test_quality_meeting.py +++ b/erpnext/quality_management/doctype/quality_meeting/test_quality_meeting.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/quality_management/doctype/quality_meeting_agenda/quality_meeting_agenda.py b/erpnext/quality_management/doctype/quality_meeting_agenda/quality_meeting_agenda.py index 5e4d9ff37a7..c2f5b3f17c1 100644 --- a/erpnext/quality_management/doctype/quality_meeting_agenda/quality_meeting_agenda.py +++ b/erpnext/quality_management/doctype/quality_meeting_agenda/quality_meeting_agenda.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/quality_management/doctype/quality_meeting_agenda/test_quality_meeting_agenda.py b/erpnext/quality_management/doctype/quality_meeting_agenda/test_quality_meeting_agenda.py index 8744d275ed8..8b09f6db7fc 100644 --- a/erpnext/quality_management/doctype/quality_meeting_agenda/test_quality_meeting_agenda.py +++ b/erpnext/quality_management/doctype/quality_meeting_agenda/test_quality_meeting_agenda.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/quality_management/doctype/quality_meeting_minutes/quality_meeting_minutes.py b/erpnext/quality_management/doctype/quality_meeting_minutes/quality_meeting_minutes.py index e3d061b36ca..f6998df35cb 100644 --- a/erpnext/quality_management/doctype/quality_meeting_minutes/quality_meeting_minutes.py +++ b/erpnext/quality_management/doctype/quality_meeting_minutes/quality_meeting_minutes.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/quality_management/doctype/quality_procedure/quality_procedure.py b/erpnext/quality_management/doctype/quality_procedure/quality_procedure.py index 56293c98e09..0f535ba2e11 100644 --- a/erpnext/quality_management/doctype/quality_procedure/quality_procedure.py +++ b/erpnext/quality_management/doctype/quality_procedure/quality_procedure.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/quality_management/doctype/quality_procedure/test_quality_procedure.py b/erpnext/quality_management/doctype/quality_procedure/test_quality_procedure.py index b064011bf6c..6130895e38d 100644 --- a/erpnext/quality_management/doctype/quality_procedure/test_quality_procedure.py +++ b/erpnext/quality_management/doctype/quality_procedure/test_quality_procedure.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/quality_management/doctype/quality_procedure_process/quality_procedure_process.py b/erpnext/quality_management/doctype/quality_procedure_process/quality_procedure_process.py index e281294643d..a03c871a85d 100644 --- a/erpnext/quality_management/doctype/quality_procedure_process/quality_procedure_process.py +++ b/erpnext/quality_management/doctype/quality_procedure_process/quality_procedure_process.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/quality_management/doctype/quality_review/quality_review.py b/erpnext/quality_management/doctype/quality_review/quality_review.py index b766623510a..b896f8dfe0c 100644 --- a/erpnext/quality_management/doctype/quality_review/quality_review.py +++ b/erpnext/quality_management/doctype/quality_review/quality_review.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/quality_management/doctype/quality_review/test_quality_review.py b/erpnext/quality_management/doctype/quality_review/test_quality_review.py index 2f28ddac45e..8a254dba2a5 100644 --- a/erpnext/quality_management/doctype/quality_review/test_quality_review.py +++ b/erpnext/quality_management/doctype/quality_review/test_quality_review.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/quality_management/doctype/quality_review_objective/quality_review_objective.py b/erpnext/quality_management/doctype/quality_review_objective/quality_review_objective.py index 23b11e87e6a..462a97118ef 100644 --- a/erpnext/quality_management/doctype/quality_review_objective/quality_review_objective.py +++ b/erpnext/quality_management/doctype/quality_review_objective/quality_review_objective.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/regional/__init__.py b/erpnext/regional/__init__.py index d7dcbf4fe18..c460286078d 100644 --- a/erpnext/regional/__init__.py +++ b/erpnext/regional/__init__.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/regional/address_template/test_regional_address_template.py b/erpnext/regional/address_template/test_regional_address_template.py index 2880d6253f9..9ad3d470d4a 100644 --- a/erpnext/regional/address_template/test_regional_address_template.py +++ b/erpnext/regional/address_template/test_regional_address_template.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from unittest import TestCase diff --git a/erpnext/regional/doctype/datev_settings/datev_settings.py b/erpnext/regional/doctype/datev_settings/datev_settings.py index 0d2d9eb4b47..686a93e529d 100644 --- a/erpnext/regional/doctype/datev_settings/datev_settings.py +++ b/erpnext/regional/doctype/datev_settings/datev_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/regional/doctype/datev_settings/test_datev_settings.py b/erpnext/regional/doctype/datev_settings/test_datev_settings.py index 73412f755d7..ba70eb472fe 100644 --- a/erpnext/regional/doctype/datev_settings/test_datev_settings.py +++ b/erpnext/regional/doctype/datev_settings/test_datev_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/regional/doctype/gst_hsn_code/gst_hsn_code.py b/erpnext/regional/doctype/gst_hsn_code/gst_hsn_code.py index 0704de8387f..3b73a5c23ec 100644 --- a/erpnext/regional/doctype/gst_hsn_code/gst_hsn_code.py +++ b/erpnext/regional/doctype/gst_hsn_code/gst_hsn_code.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/regional/doctype/gst_hsn_code/test_gst_hsn_code.py b/erpnext/regional/doctype/gst_hsn_code/test_gst_hsn_code.py index 1a90e6d711c..6dbca1af1a9 100644 --- a/erpnext/regional/doctype/gst_hsn_code/test_gst_hsn_code.py +++ b/erpnext/regional/doctype/gst_hsn_code/test_gst_hsn_code.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/regional/doctype/gst_settings/gst_settings.py b/erpnext/regional/doctype/gst_settings/gst_settings.py index 7b27fb6c5bc..13ef3e04885 100644 --- a/erpnext/regional/doctype/gst_settings/gst_settings.py +++ b/erpnext/regional/doctype/gst_settings/gst_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import os diff --git a/erpnext/regional/doctype/gst_settings/test_gst_settings.py b/erpnext/regional/doctype/gst_settings/test_gst_settings.py index 836d3a88c33..5c7d2b4602f 100644 --- a/erpnext/regional/doctype/gst_settings/test_gst_settings.py +++ b/erpnext/regional/doctype/gst_settings/test_gst_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py b/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py index d8ce3197395..8445408e640 100644 --- a/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py +++ b/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json import os diff --git a/erpnext/regional/doctype/gstr_3b_report/test_gstr_3b_report.py b/erpnext/regional/doctype/gstr_3b_report/test_gstr_3b_report.py index 115f9b88165..0f0c0b99158 100644 --- a/erpnext/regional/doctype/gstr_3b_report/test_gstr_3b_report.py +++ b/erpnext/regional/doctype/gstr_3b_report/test_gstr_3b_report.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import json import unittest diff --git a/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py b/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py index 76cb621f541..97b8488c2fe 100644 --- a/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py +++ b/erpnext/regional/doctype/import_supplier_invoice/import_supplier_invoice.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import re import zipfile diff --git a/erpnext/regional/doctype/import_supplier_invoice/test_import_supplier_invoice.py b/erpnext/regional/doctype/import_supplier_invoice/test_import_supplier_invoice.py index 4be4c3a22f9..78c07c558a5 100644 --- a/erpnext/regional/doctype/import_supplier_invoice/test_import_supplier_invoice.py +++ b/erpnext/regional/doctype/import_supplier_invoice/test_import_supplier_invoice.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.py b/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.py index 821e0171bbd..f14888189a0 100644 --- a/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.py +++ b/erpnext/regional/doctype/lower_deduction_certificate/lower_deduction_certificate.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/regional/doctype/lower_deduction_certificate/test_lower_deduction_certificate.py b/erpnext/regional/doctype/lower_deduction_certificate/test_lower_deduction_certificate.py index 54443c0206a..d8e78019311 100644 --- a/erpnext/regional/doctype/lower_deduction_certificate/test_lower_deduction_certificate.py +++ b/erpnext/regional/doctype/lower_deduction_certificate/test_lower_deduction_certificate.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/regional/doctype/tax_exemption_80g_certificate/tax_exemption_80g_certificate.py b/erpnext/regional/doctype/tax_exemption_80g_certificate/tax_exemption_80g_certificate.py index 64b2ec5646c..9a72410f67b 100644 --- a/erpnext/regional/doctype/tax_exemption_80g_certificate/tax_exemption_80g_certificate.py +++ b/erpnext/regional/doctype/tax_exemption_80g_certificate/tax_exemption_80g_certificate.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/regional/doctype/tax_exemption_80g_certificate/test_tax_exemption_80g_certificate.py b/erpnext/regional/doctype/tax_exemption_80g_certificate/test_tax_exemption_80g_certificate.py index 74e9ced3941..6fa3b85d061 100644 --- a/erpnext/regional/doctype/tax_exemption_80g_certificate/test_tax_exemption_80g_certificate.py +++ b/erpnext/regional/doctype/tax_exemption_80g_certificate/test_tax_exemption_80g_certificate.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/regional/doctype/tax_exemption_80g_certificate_detail/tax_exemption_80g_certificate_detail.py b/erpnext/regional/doctype/tax_exemption_80g_certificate_detail/tax_exemption_80g_certificate_detail.py index 76d8912b004..bb7f07f6883 100644 --- a/erpnext/regional/doctype/tax_exemption_80g_certificate_detail/tax_exemption_80g_certificate_detail.py +++ b/erpnext/regional/doctype/tax_exemption_80g_certificate_detail/tax_exemption_80g_certificate_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/regional/doctype/uae_vat_account/uae_vat_account.py b/erpnext/regional/doctype/uae_vat_account/uae_vat_account.py index a1b27d7e3d3..f2fc34d391a 100644 --- a/erpnext/regional/doctype/uae_vat_account/uae_vat_account.py +++ b/erpnext/regional/doctype/uae_vat_account/uae_vat_account.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/regional/doctype/uae_vat_settings/test_uae_vat_settings.py b/erpnext/regional/doctype/uae_vat_settings/test_uae_vat_settings.py index cec30e61cef..464c2e67be2 100644 --- a/erpnext/regional/doctype/uae_vat_settings/test_uae_vat_settings.py +++ b/erpnext/regional/doctype/uae_vat_settings/test_uae_vat_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/regional/doctype/uae_vat_settings/uae_vat_settings.py b/erpnext/regional/doctype/uae_vat_settings/uae_vat_settings.py index 1bf37dd499d..1af32e4be34 100644 --- a/erpnext/regional/doctype/uae_vat_settings/uae_vat_settings.py +++ b/erpnext/regional/doctype/uae_vat_settings/uae_vat_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/regional/france/setup.py b/erpnext/regional/france/setup.py index db6419e9462..5d482030233 100644 --- a/erpnext/regional/france/setup.py +++ b/erpnext/regional/france/setup.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields diff --git a/erpnext/regional/france/utils.py b/erpnext/regional/france/utils.py index 63c5a1f583b..841316586dc 100644 --- a/erpnext/regional/france/utils.py +++ b/erpnext/regional/france/utils.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals # don't remove this function it is used in tests diff --git a/erpnext/regional/germany/utils/datev/datev_csv.py b/erpnext/regional/germany/utils/datev/datev_csv.py index 9d1fabbada7..d46abe91873 100644 --- a/erpnext/regional/germany/utils/datev/datev_csv.py +++ b/erpnext/regional/germany/utils/datev/datev_csv.py @@ -1,5 +1,4 @@ # coding: utf-8 -from __future__ import unicode_literals import datetime import zipfile diff --git a/erpnext/regional/india/__init__.py b/erpnext/regional/india/__init__.py index 5c4d30881d1..2dc762f0ebd 100644 --- a/erpnext/regional/india/__init__.py +++ b/erpnext/regional/india/__init__.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from six import iteritems diff --git a/erpnext/regional/india/setup.py b/erpnext/regional/india/setup.py index 1cbb154125f..42ee27171fb 100644 --- a/erpnext/regional/india/setup.py +++ b/erpnext/regional/india/setup.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe, os, json from frappe.custom.doctype.custom_field.custom_field import create_custom_fields diff --git a/erpnext/regional/india/test_utils.py b/erpnext/regional/india/test_utils.py index 2c77c8d8aa8..61a0e97fe3e 100644 --- a/erpnext/regional/india/test_utils.py +++ b/erpnext/regional/india/test_utils.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import unittest from unittest.mock import patch diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 0c87421012b..e7539f516e4 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import json import re diff --git a/erpnext/regional/italy/setup.py b/erpnext/regional/italy/setup.py index 7db2f6b0f8d..531f10d3f99 100644 --- a/erpnext/regional/italy/setup.py +++ b/erpnext/regional/italy/setup.py @@ -2,7 +2,6 @@ # License: GNU General Public License v3. See license.txt # coding=utf-8 -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/regional/italy/utils.py b/erpnext/regional/italy/utils.py index d6c7f1dbfa9..8d1558be227 100644 --- a/erpnext/regional/italy/utils.py +++ b/erpnext/regional/italy/utils.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import io import json diff --git a/erpnext/regional/report/datev/datev.py b/erpnext/regional/report/datev/datev.py index 5acf1da7125..889732229ed 100644 --- a/erpnext/regional/report/datev/datev.py +++ b/erpnext/regional/report/datev/datev.py @@ -7,7 +7,6 @@ Provide a report and downloadable CSV according to the German DATEV format. - CSV download functionality `download_datev_csv` that provides a CSV file with all required columns. Used to import the data into the DATEV Software. """ -from __future__ import unicode_literals import json diff --git a/erpnext/regional/report/datev/test_datev.py b/erpnext/regional/report/datev/test_datev.py index b53889366f1..7ca0b1b50fe 100644 --- a/erpnext/regional/report/datev/test_datev.py +++ b/erpnext/regional/report/datev/test_datev.py @@ -1,5 +1,4 @@ # coding=utf-8 -from __future__ import unicode_literals import zipfile from unittest import TestCase diff --git a/erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.py b/erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.py index f4ce7a77ad9..1ae3d16c97a 100644 --- a/erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.py +++ b/erpnext/regional/report/electronic_invoice_register/electronic_invoice_register.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from erpnext.accounts.report.sales_register.sales_register import _execute diff --git a/erpnext/regional/report/eway_bill/eway_bill.py b/erpnext/regional/report/eway_bill/eway_bill.py index c78084f7dff..91a47674d7b 100644 --- a/erpnext/regional/report/eway_bill/eway_bill.py +++ b/erpnext/regional/report/eway_bill/eway_bill.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, FinByz Tech Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json import re diff --git a/erpnext/regional/report/fichier_des_ecritures_comptables_[fec]/fichier_des_ecritures_comptables_[fec].py b/erpnext/regional/report/fichier_des_ecritures_comptables_[fec]/fichier_des_ecritures_comptables_[fec].py index 9567916cd2a..59888ff94e7 100644 --- a/erpnext/regional/report/fichier_des_ecritures_comptables_[fec]/fichier_des_ecritures_comptables_[fec].py +++ b/erpnext/regional/report/fichier_des_ecritures_comptables_[fec]/fichier_des_ecritures_comptables_[fec].py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import re diff --git a/erpnext/regional/report/gst_itemised_purchase_register/gst_itemised_purchase_register.py b/erpnext/regional/report/gst_itemised_purchase_register/gst_itemised_purchase_register.py index 092f72adf15..528868cf176 100644 --- a/erpnext/regional/report/gst_itemised_purchase_register/gst_itemised_purchase_register.py +++ b/erpnext/regional/report/gst_itemised_purchase_register/gst_itemised_purchase_register.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from erpnext.accounts.report.item_wise_purchase_register.item_wise_purchase_register import ( _execute, diff --git a/erpnext/regional/report/gst_itemised_sales_register/gst_itemised_sales_register.py b/erpnext/regional/report/gst_itemised_sales_register/gst_itemised_sales_register.py index 44f623bfae9..386e2197569 100644 --- a/erpnext/regional/report/gst_itemised_sales_register/gst_itemised_sales_register.py +++ b/erpnext/regional/report/gst_itemised_sales_register/gst_itemised_sales_register.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from erpnext.accounts.report.item_wise_sales_register.item_wise_sales_register import _execute diff --git a/erpnext/regional/report/gst_purchase_register/gst_purchase_register.py b/erpnext/regional/report/gst_purchase_register/gst_purchase_register.py index e9724441b17..2d994082c31 100644 --- a/erpnext/regional/report/gst_purchase_register/gst_purchase_register.py +++ b/erpnext/regional/report/gst_purchase_register/gst_purchase_register.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from erpnext.accounts.report.purchase_register.purchase_register import _execute diff --git a/erpnext/regional/report/gst_sales_register/gst_sales_register.py b/erpnext/regional/report/gst_sales_register/gst_sales_register.py index 6975af35854..a6f2b3dbf4d 100644 --- a/erpnext/regional/report/gst_sales_register/gst_sales_register.py +++ b/erpnext/regional/report/gst_sales_register/gst_sales_register.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from erpnext.accounts.report.sales_register.sales_register import _execute diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py index 7d401bab669..933c522de25 100644 --- a/erpnext/regional/report/gstr_1/gstr_1.py +++ b/erpnext/regional/report/gstr_1/gstr_1.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json from datetime import date diff --git a/erpnext/regional/report/gstr_2/gstr_2.py b/erpnext/regional/report/gstr_2/gstr_2.py index 5e44955ce30..47c856dfaae 100644 --- a/erpnext/regional/report/gstr_2/gstr_2.py +++ b/erpnext/regional/report/gstr_2/gstr_2.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from datetime import date diff --git a/erpnext/regional/report/hsn_wise_summary_of_outward_supplies/hsn_wise_summary_of_outward_supplies.py b/erpnext/regional/report/hsn_wise_summary_of_outward_supplies/hsn_wise_summary_of_outward_supplies.py index 7a938c7e0f2..17d611738d3 100644 --- a/erpnext/regional/report/hsn_wise_summary_of_outward_supplies/hsn_wise_summary_of_outward_supplies.py +++ b/erpnext/regional/report/hsn_wise_summary_of_outward_supplies/hsn_wise_summary_of_outward_supplies.py @@ -1,7 +1,6 @@ # Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/regional/report/ksa_vat/ksa_vat.py b/erpnext/regional/report/ksa_vat/ksa_vat.py index a42ebc9f7e5..198b0b2b1b1 100644 --- a/erpnext/regional/report/ksa_vat/ksa_vat.py +++ b/erpnext/regional/report/ksa_vat/ksa_vat.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Havenir Solutions and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/regional/report/professional_tax_deductions/professional_tax_deductions.py b/erpnext/regional/report/professional_tax_deductions/professional_tax_deductions.py index 5300b928925..def43798289 100644 --- a/erpnext/regional/report/professional_tax_deductions/professional_tax_deductions.py +++ b/erpnext/regional/report/professional_tax_deductions/professional_tax_deductions.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/regional/report/provident_fund_deductions/provident_fund_deductions.py b/erpnext/regional/report/provident_fund_deductions/provident_fund_deductions.py index ae5d6b90b4e..190f408fe0e 100644 --- a/erpnext/regional/report/provident_fund_deductions/provident_fund_deductions.py +++ b/erpnext/regional/report/provident_fund_deductions/provident_fund_deductions.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/regional/report/uae_vat_201/test_uae_vat_201.py b/erpnext/regional/report/uae_vat_201/test_uae_vat_201.py index e19aeaa0eff..62d694ba7ba 100644 --- a/erpnext/regional/report/uae_vat_201/test_uae_vat_201.py +++ b/erpnext/regional/report/uae_vat_201/test_uae_vat_201.py @@ -1,5 +1,4 @@ # coding=utf-8 -from __future__ import unicode_literals from unittest import TestCase diff --git a/erpnext/regional/report/uae_vat_201/uae_vat_201.py b/erpnext/regional/report/uae_vat_201/uae_vat_201.py index 2b5ecc3b18c..f8379aa17ab 100644 --- a/erpnext/regional/report/uae_vat_201/uae_vat_201.py +++ b/erpnext/regional/report/uae_vat_201/uae_vat_201.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/regional/report/vat_audit_report/test_vat_audit_report.py b/erpnext/regional/report/vat_audit_report/test_vat_audit_report.py index 77beff36ecd..f22abae1ff8 100644 --- a/erpnext/regional/report/vat_audit_report/test_vat_audit_report.py +++ b/erpnext/regional/report/vat_audit_report/test_vat_audit_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from unittest import TestCase diff --git a/erpnext/regional/report/vat_audit_report/vat_audit_report.py b/erpnext/regional/report/vat_audit_report/vat_audit_report.py index 3637bcaf439..5a281a4cbb2 100644 --- a/erpnext/regional/report/vat_audit_report/vat_audit_report.py +++ b/erpnext/regional/report/vat_audit_report/vat_audit_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/regional/saudi_arabia/setup.py b/erpnext/regional/saudi_arabia/setup.py index 6113f48d3f1..ee25b38846e 100644 --- a/erpnext/regional/saudi_arabia/setup.py +++ b/erpnext/regional/saudi_arabia/setup.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.permissions import add_permission, update_permission_property from erpnext.regional.united_arab_emirates.setup import make_custom_fields as uae_custom_fields, add_print_formats diff --git a/erpnext/regional/south_africa/setup.py b/erpnext/regional/south_africa/setup.py index 8a75987c3d7..6af135b960a 100644 --- a/erpnext/regional/south_africa/setup.py +++ b/erpnext/regional/south_africa/setup.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields diff --git a/erpnext/regional/turkey/setup.py b/erpnext/regional/turkey/setup.py index 2396aab91f5..aedebdfc6a9 100644 --- a/erpnext/regional/turkey/setup.py +++ b/erpnext/regional/turkey/setup.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def setup(company=None, patch=True): pass diff --git a/erpnext/regional/united_arab_emirates/setup.py b/erpnext/regional/united_arab_emirates/setup.py index 8b1905051c5..922443b924a 100644 --- a/erpnext/regional/united_arab_emirates/setup.py +++ b/erpnext/regional/united_arab_emirates/setup.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields diff --git a/erpnext/regional/united_arab_emirates/utils.py b/erpnext/regional/united_arab_emirates/utils.py index 66a96514fc1..891e75e0033 100644 --- a/erpnext/regional/united_arab_emirates/utils.py +++ b/erpnext/regional/united_arab_emirates/utils.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/regional/united_states/setup.py b/erpnext/regional/united_states/setup.py index cf78f927c59..db6a9c35475 100644 --- a/erpnext/regional/united_states/setup.py +++ b/erpnext/regional/united_states/setup.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe import os import json diff --git a/erpnext/regional/united_states/test_united_states.py b/erpnext/regional/united_states/test_united_states.py index 19e9a3546f8..652b4835a18 100644 --- a/erpnext/regional/united_states/test_united_states.py +++ b/erpnext/regional/united_states/test_united_states.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/restaurant/doctype/restaurant/restaurant.py b/erpnext/restaurant/doctype/restaurant/restaurant.py index 486afc3a11e..67838d29a37 100644 --- a/erpnext/restaurant/doctype/restaurant/restaurant.py +++ b/erpnext/restaurant/doctype/restaurant/restaurant.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/restaurant/doctype/restaurant/restaurant_dashboard.py b/erpnext/restaurant/doctype/restaurant/restaurant_dashboard.py index 5b78bb2f45a..c91ef56142d 100644 --- a/erpnext/restaurant/doctype/restaurant/restaurant_dashboard.py +++ b/erpnext/restaurant/doctype/restaurant/restaurant_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/restaurant/doctype/restaurant/test_restaurant.py b/erpnext/restaurant/doctype/restaurant/test_restaurant.py index 574cd1f9e4a..f88f9801290 100644 --- a/erpnext/restaurant/doctype/restaurant/test_restaurant.py +++ b/erpnext/restaurant/doctype/restaurant/test_restaurant.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/restaurant/doctype/restaurant_menu/restaurant_menu.py b/erpnext/restaurant/doctype/restaurant_menu/restaurant_menu.py index 632f4850d8a..64eb40f3645 100644 --- a/erpnext/restaurant/doctype/restaurant_menu/restaurant_menu.py +++ b/erpnext/restaurant/doctype/restaurant_menu/restaurant_menu.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/restaurant/doctype/restaurant_menu/test_restaurant_menu.py b/erpnext/restaurant/doctype/restaurant_menu/test_restaurant_menu.py index 00cbf358d6f..27020eb869f 100644 --- a/erpnext/restaurant/doctype/restaurant_menu/test_restaurant_menu.py +++ b/erpnext/restaurant/doctype/restaurant_menu/test_restaurant_menu.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/restaurant/doctype/restaurant_menu_item/restaurant_menu_item.py b/erpnext/restaurant/doctype/restaurant_menu_item/restaurant_menu_item.py index 5d095f49a8e..98b245edece 100644 --- a/erpnext/restaurant/doctype/restaurant_menu_item/restaurant_menu_item.py +++ b/erpnext/restaurant/doctype/restaurant_menu_item/restaurant_menu_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/restaurant/doctype/restaurant_order_entry/restaurant_order_entry.py b/erpnext/restaurant/doctype/restaurant_order_entry/restaurant_order_entry.py index 1ed5921f350..f9e75b47a0f 100644 --- a/erpnext/restaurant/doctype/restaurant_order_entry/restaurant_order_entry.py +++ b/erpnext/restaurant/doctype/restaurant_order_entry/restaurant_order_entry.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/restaurant/doctype/restaurant_order_entry_item/restaurant_order_entry_item.py b/erpnext/restaurant/doctype/restaurant_order_entry_item/restaurant_order_entry_item.py index ee8928b13a1..0d9c236c0ea 100644 --- a/erpnext/restaurant/doctype/restaurant_order_entry_item/restaurant_order_entry_item.py +++ b/erpnext/restaurant/doctype/restaurant_order_entry_item/restaurant_order_entry_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/restaurant/doctype/restaurant_reservation/restaurant_reservation.py b/erpnext/restaurant/doctype/restaurant_reservation/restaurant_reservation.py index f6d2a7c8cc4..02ffaf6c20b 100644 --- a/erpnext/restaurant/doctype/restaurant_reservation/restaurant_reservation.py +++ b/erpnext/restaurant/doctype/restaurant_reservation/restaurant_reservation.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from datetime import timedelta diff --git a/erpnext/restaurant/doctype/restaurant_reservation/test_restaurant_reservation.py b/erpnext/restaurant/doctype/restaurant_reservation/test_restaurant_reservation.py index 885da724aa0..11a3541bd56 100644 --- a/erpnext/restaurant/doctype/restaurant_reservation/test_restaurant_reservation.py +++ b/erpnext/restaurant/doctype/restaurant_reservation/test_restaurant_reservation.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/restaurant/doctype/restaurant_table/restaurant_table.py b/erpnext/restaurant/doctype/restaurant_table/restaurant_table.py index 0b5d6352711..29f8a1a12b1 100644 --- a/erpnext/restaurant/doctype/restaurant_table/restaurant_table.py +++ b/erpnext/restaurant/doctype/restaurant_table/restaurant_table.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import re diff --git a/erpnext/restaurant/doctype/restaurant_table/test_restaurant_table.py b/erpnext/restaurant/doctype/restaurant_table/test_restaurant_table.py index 44059aee607..00d14d2bb2a 100644 --- a/erpnext/restaurant/doctype/restaurant_table/test_restaurant_table.py +++ b/erpnext/restaurant/doctype/restaurant_table/test_restaurant_table.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/selling/doctype/__init__.py b/erpnext/selling/doctype/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/selling/doctype/__init__.py +++ b/erpnext/selling/doctype/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/selling/doctype/customer/__init__.py b/erpnext/selling/doctype/customer/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/selling/doctype/customer/__init__.py +++ b/erpnext/selling/doctype/customer/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py index 7adf2cd909f..d4ad719534b 100644 --- a/erpnext/selling/doctype/customer/customer.py +++ b/erpnext/selling/doctype/customer/customer.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/selling/doctype/customer/customer_dashboard.py b/erpnext/selling/doctype/customer/customer_dashboard.py index 532c11b86e4..faf8a4403ca 100644 --- a/erpnext/selling/doctype/customer/customer_dashboard.py +++ b/erpnext/selling/doctype/customer/customer_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/selling/doctype/customer/test_customer.py b/erpnext/selling/doctype/customer/test_customer.py index fd1db8fd526..83af81654c5 100644 --- a/erpnext/selling/doctype/customer/test_customer.py +++ b/erpnext/selling/doctype/customer/test_customer.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/selling/doctype/customer_credit_limit/customer_credit_limit.py b/erpnext/selling/doctype/customer_credit_limit/customer_credit_limit.py index 53bcc1b102e..193027b89a4 100644 --- a/erpnext/selling/doctype/customer_credit_limit/customer_credit_limit.py +++ b/erpnext/selling/doctype/customer_credit_limit/customer_credit_limit.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/selling/doctype/industry_type/__init__.py b/erpnext/selling/doctype/industry_type/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/selling/doctype/industry_type/__init__.py +++ b/erpnext/selling/doctype/industry_type/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/selling/doctype/industry_type/industry_type.py b/erpnext/selling/doctype/industry_type/industry_type.py index 6d413ece2e7..fbe0131dd31 100644 --- a/erpnext/selling/doctype/industry_type/industry_type.py +++ b/erpnext/selling/doctype/industry_type/industry_type.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/selling/doctype/industry_type/test_industry_type.py b/erpnext/selling/doctype/industry_type/test_industry_type.py index d6cf79ba89b..250c2bec485 100644 --- a/erpnext/selling/doctype/industry_type/test_industry_type.py +++ b/erpnext/selling/doctype/industry_type/test_industry_type.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/selling/doctype/installation_note/__init__.py b/erpnext/selling/doctype/installation_note/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/selling/doctype/installation_note/__init__.py +++ b/erpnext/selling/doctype/installation_note/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/selling/doctype/installation_note/installation_note.py b/erpnext/selling/doctype/installation_note/installation_note.py index 128a9415c87..36acdbea612 100644 --- a/erpnext/selling/doctype/installation_note/installation_note.py +++ b/erpnext/selling/doctype/installation_note/installation_note.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/selling/doctype/installation_note/test_installation_note.py b/erpnext/selling/doctype/installation_note/test_installation_note.py index abfda9cd6b8..d3c8be53574 100644 --- a/erpnext/selling/doctype/installation_note/test_installation_note.py +++ b/erpnext/selling/doctype/installation_note/test_installation_note.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/selling/doctype/installation_note_item/__init__.py b/erpnext/selling/doctype/installation_note_item/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/selling/doctype/installation_note_item/__init__.py +++ b/erpnext/selling/doctype/installation_note_item/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/selling/doctype/installation_note_item/installation_note_item.py b/erpnext/selling/doctype/installation_note_item/installation_note_item.py index 862c2a1bb51..2169a7b6144 100644 --- a/erpnext/selling/doctype/installation_note_item/installation_note_item.py +++ b/erpnext/selling/doctype/installation_note_item/installation_note_item.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/selling/doctype/product_bundle/product_bundle.py b/erpnext/selling/doctype/product_bundle/product_bundle.py index 4c73916f852..2bb876e6d0f 100644 --- a/erpnext/selling/doctype/product_bundle/product_bundle.py +++ b/erpnext/selling/doctype/product_bundle/product_bundle.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/selling/doctype/product_bundle/test_product_bundle.py b/erpnext/selling/doctype/product_bundle/test_product_bundle.py index 13bd2a30923..b966c62f66c 100644 --- a/erpnext/selling/doctype/product_bundle/test_product_bundle.py +++ b/erpnext/selling/doctype/product_bundle/test_product_bundle.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/selling/doctype/product_bundle_item/product_bundle_item.py b/erpnext/selling/doctype/product_bundle_item/product_bundle_item.py index 5f71a27f369..5c95a555c8f 100644 --- a/erpnext/selling/doctype/product_bundle_item/product_bundle_item.py +++ b/erpnext/selling/doctype/product_bundle_item/product_bundle_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/selling/doctype/quotation/__init__.py b/erpnext/selling/doctype/quotation/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/selling/doctype/quotation/__init__.py +++ b/erpnext/selling/doctype/quotation/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 99c43bfc87e..31b62d6da5a 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/selling/doctype/quotation/quotation_dashboard.py b/erpnext/selling/doctype/quotation/quotation_dashboard.py index 9586cb10b59..46de292cc4d 100644 --- a/erpnext/selling/doctype/quotation/quotation_dashboard.py +++ b/erpnext/selling/doctype/quotation/quotation_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py index a44089a9ce4..769e0661b12 100644 --- a/erpnext/selling/doctype/quotation/test_quotation.py +++ b/erpnext/selling/doctype/quotation/test_quotation.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/selling/doctype/quotation_item/__init__.py b/erpnext/selling/doctype/quotation_item/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/selling/doctype/quotation_item/__init__.py +++ b/erpnext/selling/doctype/quotation_item/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/selling/doctype/quotation_item/quotation_item.py b/erpnext/selling/doctype/quotation_item/quotation_item.py index ea472497299..8c2aabbf3fa 100644 --- a/erpnext/selling/doctype/quotation_item/quotation_item.py +++ b/erpnext/selling/doctype/quotation_item/quotation_item.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/selling/doctype/sales_order/__init__.py b/erpnext/selling/doctype/sales_order/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/selling/doctype/sales_order/__init__.py +++ b/erpnext/selling/doctype/sales_order/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index dcf478bda6e..1ab8aa4f3af 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/selling/doctype/sales_order/sales_order_dashboard.py b/erpnext/selling/doctype/sales_order/sales_order_dashboard.py index ee3c707b5b8..abf507a9e54 100644 --- a/erpnext/selling/doctype/sales_order/sales_order_dashboard.py +++ b/erpnext/selling/doctype/sales_order/sales_order_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/selling/doctype/sales_order/test_sales_order.py b/erpnext/selling/doctype/sales_order/test_sales_order.py index 222e74ee6c5..644c0ac905d 100644 --- a/erpnext/selling/doctype/sales_order/test_sales_order.py +++ b/erpnext/selling/doctype/sales_order/test_sales_order.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json import unittest diff --git a/erpnext/selling/doctype/sales_order_item/__init__.py b/erpnext/selling/doctype/sales_order_item/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/selling/doctype/sales_order_item/__init__.py +++ b/erpnext/selling/doctype/sales_order_item/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/selling/doctype/sales_order_item/sales_order_item.py b/erpnext/selling/doctype/sales_order_item/sales_order_item.py index 772aa6c8ae5..441a6ac9709 100644 --- a/erpnext/selling/doctype/sales_order_item/sales_order_item.py +++ b/erpnext/selling/doctype/sales_order_item/sales_order_item.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/selling/doctype/sales_partner_type/sales_partner_type.py b/erpnext/selling/doctype/sales_partner_type/sales_partner_type.py index bdabef2fdbe..0a07073af05 100644 --- a/erpnext/selling/doctype/sales_partner_type/sales_partner_type.py +++ b/erpnext/selling/doctype/sales_partner_type/sales_partner_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/selling/doctype/sales_partner_type/test_sales_partner_type.py b/erpnext/selling/doctype/sales_partner_type/test_sales_partner_type.py index 895b0ecf00a..04d40898254 100644 --- a/erpnext/selling/doctype/sales_partner_type/test_sales_partner_type.py +++ b/erpnext/selling/doctype/sales_partner_type/test_sales_partner_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/selling/doctype/sales_team/__init__.py b/erpnext/selling/doctype/sales_team/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/selling/doctype/sales_team/__init__.py +++ b/erpnext/selling/doctype/sales_team/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/selling/doctype/sales_team/sales_team.py b/erpnext/selling/doctype/sales_team/sales_team.py index 9b542c0eead..d3eae3a5978 100644 --- a/erpnext/selling/doctype/sales_team/sales_team.py +++ b/erpnext/selling/doctype/sales_team/sales_team.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/selling/doctype/selling_settings/selling_settings.py b/erpnext/selling/doctype/selling_settings/selling_settings.py index 5bed43e4609..e7c5e769965 100644 --- a/erpnext/selling/doctype/selling_settings/selling_settings.py +++ b/erpnext/selling/doctype/selling_settings/selling_settings.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.custom.doctype.property_setter.property_setter import make_property_setter diff --git a/erpnext/selling/doctype/selling_settings/test_selling_settings.py b/erpnext/selling/doctype/selling_settings/test_selling_settings.py index 572a110cc3e..fc6754a7c59 100644 --- a/erpnext/selling/doctype/selling_settings/test_selling_settings.py +++ b/erpnext/selling/doctype/selling_settings/test_selling_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/selling/doctype/sms_center/__init__.py b/erpnext/selling/doctype/sms_center/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/selling/doctype/sms_center/__init__.py +++ b/erpnext/selling/doctype/sms_center/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/selling/doctype/sms_center/sms_center.py b/erpnext/selling/doctype/sms_center/sms_center.py index 45aee4ea6f0..d192457ee07 100644 --- a/erpnext/selling/doctype/sms_center/sms_center.py +++ b/erpnext/selling/doctype/sms_center/sms_center.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/selling/page/__init__.py b/erpnext/selling/page/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/selling/page/__init__.py +++ b/erpnext/selling/page/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py index b4338c920a9..db5b20e3e19 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.py +++ b/erpnext/selling/page/point_of_sale/point_of_sale.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/selling/page/sales_funnel/sales_funnel.py b/erpnext/selling/page/sales_funnel/sales_funnel.py index 043a3e7f0fa..a75108e4032 100644 --- a/erpnext/selling/page/sales_funnel/sales_funnel.py +++ b/erpnext/selling/page/sales_funnel/sales_funnel.py @@ -1,7 +1,6 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe import pandas as pd diff --git a/erpnext/selling/report/address_and_contacts/address_and_contacts.py b/erpnext/selling/report/address_and_contacts/address_and_contacts.py index fea19f9f16d..319e78f4889 100644 --- a/erpnext/selling/report/address_and_contacts/address_and_contacts.py +++ b/erpnext/selling/report/address_and_contacts/address_and_contacts.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from six import iteritems diff --git a/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.py b/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.py index c7040bef708..e702a51d0e7 100644 --- a/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.py +++ b/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.utils import flt diff --git a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.py b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.py index a29b5c8a627..2426cbb0b55 100644 --- a/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.py +++ b/erpnext/selling/report/customer_acquisition_and_loyalty/customer_acquisition_and_loyalty.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import calendar diff --git a/erpnext/selling/report/customer_credit_balance/customer_credit_balance.py b/erpnext/selling/report/customer_credit_balance/customer_credit_balance.py index ed2fbfd595c..777b02ca66d 100644 --- a/erpnext/selling/report/customer_credit_balance/customer_credit_balance.py +++ b/erpnext/selling/report/customer_credit_balance/customer_credit_balance.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/selling/report/customer_wise_item_price/customer_wise_item_price.py b/erpnext/selling/report/customer_wise_item_price/customer_wise_item_price.py index 535d551cfab..e5f93543209 100644 --- a/erpnext/selling/report/customer_wise_item_price/customer_wise_item_price.py +++ b/erpnext/selling/report/customer_wise_item_price/customer_wise_item_price.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/selling/report/inactive_customers/inactive_customers.py b/erpnext/selling/report/inactive_customers/inactive_customers.py index c79efe24b78..d97e1c6dcb0 100644 --- a/erpnext/selling/report/inactive_customers/inactive_customers.py +++ b/erpnext/selling/report/inactive_customers/inactive_customers.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.py b/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.py index 539631240e1..4a245e1f778 100644 --- a/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.py +++ b/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.py @@ -1,7 +1,6 @@ # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.py b/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.py index f241a3e13d9..01421e8fd0e 100644 --- a/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.py +++ b/erpnext/selling/report/pending_so_items_for_purchase_request/pending_so_items_for_purchase_request.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/selling/report/pending_so_items_for_purchase_request/test_pending_so_items_for_purchase_request.py b/erpnext/selling/report/pending_so_items_for_purchase_request/test_pending_so_items_for_purchase_request.py index 95e332ac537..9c30afc5b1a 100644 --- a/erpnext/selling/report/pending_so_items_for_purchase_request/test_pending_so_items_for_purchase_request.py +++ b/erpnext/selling/report/pending_so_items_for_purchase_request/test_pending_so_items_for_purchase_request.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/selling/report/quotation_trends/quotation_trends.py b/erpnext/selling/report/quotation_trends/quotation_trends.py index d2ee9a8b742..047b09081af 100644 --- a/erpnext/selling/report/quotation_trends/quotation_trends.py +++ b/erpnext/selling/report/quotation_trends/quotation_trends.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/selling/report/sales_analytics/sales_analytics.py b/erpnext/selling/report/sales_analytics/sales_analytics.py index 56bcb3180a3..a380f842ebf 100644 --- a/erpnext/selling/report/sales_analytics/sales_analytics.py +++ b/erpnext/selling/report/sales_analytics/sales_analytics.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _, scrub diff --git a/erpnext/selling/report/sales_analytics/test_analytics.py b/erpnext/selling/report/sales_analytics/test_analytics.py index a1800993f4f..8ffc5d6d0a7 100644 --- a/erpnext/selling/report/sales_analytics/test_analytics.py +++ b/erpnext/selling/report/sales_analytics/test_analytics.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py index 5c4d8b601f4..82e5d0ce57d 100644 --- a/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py +++ b/erpnext/selling/report/sales_order_analysis/sales_order_analysis.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import copy diff --git a/erpnext/selling/report/sales_order_trends/sales_order_trends.py b/erpnext/selling/report/sales_order_trends/sales_order_trends.py index 89daf447781..5a711712620 100644 --- a/erpnext/selling/report/sales_order_trends/sales_order_trends.py +++ b/erpnext/selling/report/sales_order_trends/sales_order_trends.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/selling/report/sales_partner_commission_summary/sales_partner_commission_summary.py b/erpnext/selling/report/sales_partner_commission_summary/sales_partner_commission_summary.py index a84dec032e5..b775907bd53 100644 --- a/erpnext/selling/report/sales_partner_commission_summary/sales_partner_commission_summary.py +++ b/erpnext/selling/report/sales_partner_commission_summary/sales_partner_commission_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/item_group_wise_sales_target_variance.py b/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/item_group_wise_sales_target_variance.py index d4f49c71464..a647eb4fea2 100644 --- a/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/item_group_wise_sales_target_variance.py +++ b/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/item_group_wise_sales_target_variance.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/sales_partner_target_variance_based_on_item_group.py b/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/sales_partner_target_variance_based_on_item_group.py index de21c4ad02d..f2b6a54a8a6 100644 --- a/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/sales_partner_target_variance_based_on_item_group.py +++ b/erpnext/selling/report/sales_partner_target_variance_based_on_item_group/sales_partner_target_variance_based_on_item_group.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from erpnext.selling.report.sales_partner_target_variance_based_on_item_group.item_group_wise_sales_target_variance import ( get_data_column, diff --git a/erpnext/selling/report/sales_partner_transaction_summary/sales_partner_transaction_summary.py b/erpnext/selling/report/sales_partner_transaction_summary/sales_partner_transaction_summary.py index 39ec072f6ba..c64555bf2d3 100644 --- a/erpnext/selling/report/sales_partner_transaction_summary/sales_partner_transaction_summary.py +++ b/erpnext/selling/report/sales_partner_transaction_summary/sales_partner_transaction_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/selling/report/sales_person_commission_summary/sales_person_commission_summary.py b/erpnext/selling/report/sales_person_commission_summary/sales_person_commission_summary.py index 13245b789ef..1542e31feff 100644 --- a/erpnext/selling/report/sales_person_commission_summary/sales_person_commission_summary.py +++ b/erpnext/selling/report/sales_person_commission_summary/sales_person_commission_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/selling/report/sales_person_target_variance_based_on_item_group/sales_person_target_variance_based_on_item_group.py b/erpnext/selling/report/sales_person_target_variance_based_on_item_group/sales_person_target_variance_based_on_item_group.py index 83a1c2ce75c..dda24662bb2 100644 --- a/erpnext/selling/report/sales_person_target_variance_based_on_item_group/sales_person_target_variance_based_on_item_group.py +++ b/erpnext/selling/report/sales_person_target_variance_based_on_item_group/sales_person_target_variance_based_on_item_group.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from erpnext.selling.report.sales_partner_target_variance_based_on_item_group.item_group_wise_sales_target_variance import ( get_data_column, diff --git a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py index 9dc2923b0a2..c621be88295 100644 --- a/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py +++ b/erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/selling/report/territory_target_variance_based_on_item_group/territory_target_variance_based_on_item_group.py b/erpnext/selling/report/territory_target_variance_based_on_item_group/territory_target_variance_based_on_item_group.py index b340124a040..eee2d42a786 100644 --- a/erpnext/selling/report/territory_target_variance_based_on_item_group/territory_target_variance_based_on_item_group.py +++ b/erpnext/selling/report/territory_target_variance_based_on_item_group/territory_target_variance_based_on_item_group.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from erpnext.selling.report.sales_partner_target_variance_based_on_item_group.item_group_wise_sales_target_variance import ( get_data_column, diff --git a/erpnext/selling/report/territory_wise_sales/territory_wise_sales.py b/erpnext/selling/report/territory_wise_sales/territory_wise_sales.py index c334381b430..b7b4d3aa4ca 100644 --- a/erpnext/selling/report/territory_wise_sales/territory_wise_sales.py +++ b/erpnext/selling/report/territory_wise_sales/territory_wise_sales.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/setup/default_energy_point_rules.py b/erpnext/setup/default_energy_point_rules.py index c41d000215b..cfff75e525c 100644 --- a/erpnext/setup/default_energy_point_rules.py +++ b/erpnext/setup/default_energy_point_rules.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/setup/default_success_action.py b/erpnext/setup/default_success_action.py index be072fc47f3..338fb43f249 100644 --- a/erpnext/setup/default_success_action.py +++ b/erpnext/setup/default_success_action.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/setup/doctype/__init__.py b/erpnext/setup/doctype/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/__init__.py +++ b/erpnext/setup/doctype/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/authorization_control/__init__.py b/erpnext/setup/doctype/authorization_control/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/authorization_control/__init__.py +++ b/erpnext/setup/doctype/authorization_control/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/authorization_control/authorization_control.py b/erpnext/setup/doctype/authorization_control/authorization_control.py index 332d7f438a7..2a0d785520a 100644 --- a/erpnext/setup/doctype/authorization_control/authorization_control.py +++ b/erpnext/setup/doctype/authorization_control/authorization_control.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, session diff --git a/erpnext/setup/doctype/authorization_rule/__init__.py b/erpnext/setup/doctype/authorization_rule/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/authorization_rule/__init__.py +++ b/erpnext/setup/doctype/authorization_rule/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/authorization_rule/authorization_rule.py b/erpnext/setup/doctype/authorization_rule/authorization_rule.py index ab0f4201219..e07de3b2934 100644 --- a/erpnext/setup/doctype/authorization_rule/authorization_rule.py +++ b/erpnext/setup/doctype/authorization_rule/authorization_rule.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/setup/doctype/authorization_rule/test_authorization_rule.py b/erpnext/setup/doctype/authorization_rule/test_authorization_rule.py index 8a0f6649078..7d3d5d4c4d3 100644 --- a/erpnext/setup/doctype/authorization_rule/test_authorization_rule.py +++ b/erpnext/setup/doctype/authorization_rule/test_authorization_rule.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/setup/doctype/brand/__init__.py b/erpnext/setup/doctype/brand/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/brand/__init__.py +++ b/erpnext/setup/doctype/brand/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/brand/brand.py b/erpnext/setup/doctype/brand/brand.py index 4cfb018c865..9b91b456c34 100644 --- a/erpnext/setup/doctype/brand/brand.py +++ b/erpnext/setup/doctype/brand/brand.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import copy diff --git a/erpnext/setup/doctype/brand/test_brand.py b/erpnext/setup/doctype/brand/test_brand.py index 16873c9fc92..1c71448cb8d 100644 --- a/erpnext/setup/doctype/brand/test_brand.py +++ b/erpnext/setup/doctype/brand/test_brand.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/setup/doctype/company/__init__.py b/erpnext/setup/doctype/company/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/company/__init__.py +++ b/erpnext/setup/doctype/company/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index 0b1b4a1ec02..d40ed912f6e 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import functools import json diff --git a/erpnext/setup/doctype/company/company_dashboard.py b/erpnext/setup/doctype/company/company_dashboard.py index 3afea098a0f..b63c05dbd11 100644 --- a/erpnext/setup/doctype/company/company_dashboard.py +++ b/erpnext/setup/doctype/company/company_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/setup/doctype/company/test_company.py b/erpnext/setup/doctype/company/test_company.py index abc4689a20e..4ee94927381 100644 --- a/erpnext/setup/doctype/company/test_company.py +++ b/erpnext/setup/doctype/company/test_company.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json import unittest diff --git a/erpnext/setup/doctype/currency_exchange/currency_exchange.py b/erpnext/setup/doctype/currency_exchange/currency_exchange.py index 0b86e293778..4191935742f 100644 --- a/erpnext/setup/doctype/currency_exchange/currency_exchange.py +++ b/erpnext/setup/doctype/currency_exchange/currency_exchange.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals from frappe import _, throw from frappe.model.document import Document diff --git a/erpnext/setup/doctype/customer_group/__init__.py b/erpnext/setup/doctype/customer_group/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/customer_group/__init__.py +++ b/erpnext/setup/doctype/customer_group/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/customer_group/customer_group.py b/erpnext/setup/doctype/customer_group/customer_group.py index 6e72810c561..5b917265d99 100644 --- a/erpnext/setup/doctype/customer_group/customer_group.py +++ b/erpnext/setup/doctype/customer_group/customer_group.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/setup/doctype/customer_group/test_customer_group.py b/erpnext/setup/doctype/customer_group/test_customer_group.py index e04b79b8f39..f02ae097928 100644 --- a/erpnext/setup/doctype/customer_group/test_customer_group.py +++ b/erpnext/setup/doctype/customer_group/test_customer_group.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals test_ignore = ["Price List"] diff --git a/erpnext/setup/doctype/email_digest/__init__.py b/erpnext/setup/doctype/email_digest/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/email_digest/__init__.py +++ b/erpnext/setup/doctype/email_digest/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py index 4e9a8ccad87..02f9156e196 100644 --- a/erpnext/setup/doctype/email_digest/email_digest.py +++ b/erpnext/setup/doctype/email_digest/email_digest.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from datetime import timedelta diff --git a/erpnext/setup/doctype/email_digest/quotes.py b/erpnext/setup/doctype/email_digest/quotes.py index c77fe824ac9..0fbadd98cd5 100644 --- a/erpnext/setup/doctype/email_digest/quotes.py +++ b/erpnext/setup/doctype/email_digest/quotes.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals import random diff --git a/erpnext/setup/doctype/email_digest/test_email_digest.py b/erpnext/setup/doctype/email_digest/test_email_digest.py index b3d0ce325b8..3fdf168a65e 100644 --- a/erpnext/setup/doctype/email_digest/test_email_digest.py +++ b/erpnext/setup/doctype/email_digest/test_email_digest.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/setup/doctype/email_digest_recipient/email_digest_recipient.py b/erpnext/setup/doctype/email_digest_recipient/email_digest_recipient.py index 5c8d695b6e5..06bf6273c07 100644 --- a/erpnext/setup/doctype/email_digest_recipient/email_digest_recipient.py +++ b/erpnext/setup/doctype/email_digest_recipient/email_digest_recipient.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/setup/doctype/global_defaults/__init__.py b/erpnext/setup/doctype/global_defaults/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/global_defaults/__init__.py +++ b/erpnext/setup/doctype/global_defaults/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/global_defaults/global_defaults.py b/erpnext/setup/doctype/global_defaults/global_defaults.py index 66d3b9ee480..f0b720a42e1 100644 --- a/erpnext/setup/doctype/global_defaults/global_defaults.py +++ b/erpnext/setup/doctype/global_defaults/global_defaults.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals """Global Defaults""" import frappe diff --git a/erpnext/setup/doctype/global_defaults/test_global_defaults.py b/erpnext/setup/doctype/global_defaults/test_global_defaults.py index 70a7c08c111..a9d62ad30fa 100644 --- a/erpnext/setup/doctype/global_defaults/test_global_defaults.py +++ b/erpnext/setup/doctype/global_defaults/test_global_defaults.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/setup/doctype/item_group/__init__.py b/erpnext/setup/doctype/item_group/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/item_group/__init__.py +++ b/erpnext/setup/doctype/item_group/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py index ab50a58c4fb..4c42b61f01e 100644 --- a/erpnext/setup/doctype/item_group/item_group.py +++ b/erpnext/setup/doctype/item_group/item_group.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import copy diff --git a/erpnext/setup/doctype/item_group/test_item_group.py b/erpnext/setup/doctype/item_group/test_item_group.py index a816f391c62..f6e9ed4ce59 100644 --- a/erpnext/setup/doctype/item_group/test_item_group.py +++ b/erpnext/setup/doctype/item_group/test_item_group.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import print_function, unicode_literals import unittest diff --git a/erpnext/setup/doctype/naming_series/__init__.py b/erpnext/setup/doctype/naming_series/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/naming_series/__init__.py +++ b/erpnext/setup/doctype/naming_series/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/naming_series/naming_series.py b/erpnext/setup/doctype/naming_series/naming_series.py index 005cfec769a..4def6eb9e8a 100644 --- a/erpnext/setup/doctype/naming_series/naming_series.py +++ b/erpnext/setup/doctype/naming_series/naming_series.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint, throw diff --git a/erpnext/setup/doctype/party_type/party_type.py b/erpnext/setup/doctype/party_type/party_type.py index 8424c7fe938..d0d2946e94a 100644 --- a/erpnext/setup/doctype/party_type/party_type.py +++ b/erpnext/setup/doctype/party_type/party_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/setup/doctype/party_type/test_party_type.py b/erpnext/setup/doctype/party_type/test_party_type.py index e5f2908eb46..a9a3db8777e 100644 --- a/erpnext/setup/doctype/party_type/test_party_type.py +++ b/erpnext/setup/doctype/party_type/test_party_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/setup/doctype/print_heading/__init__.py b/erpnext/setup/doctype/print_heading/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/print_heading/__init__.py +++ b/erpnext/setup/doctype/print_heading/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/print_heading/print_heading.py b/erpnext/setup/doctype/print_heading/print_heading.py index cf25638608b..3a2f15f4b2a 100644 --- a/erpnext/setup/doctype/print_heading/print_heading.py +++ b/erpnext/setup/doctype/print_heading/print_heading.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/setup/doctype/print_heading/test_print_heading.py b/erpnext/setup/doctype/print_heading/test_print_heading.py index 06f801a654e..04de08d2697 100644 --- a/erpnext/setup/doctype/print_heading/test_print_heading.py +++ b/erpnext/setup/doctype/print_heading/test_print_heading.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/setup/doctype/quotation_lost_reason/__init__.py b/erpnext/setup/doctype/quotation_lost_reason/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/quotation_lost_reason/__init__.py +++ b/erpnext/setup/doctype/quotation_lost_reason/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.py b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.py index 9131cc334a7..651705c6e5b 100644 --- a/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.py +++ b/erpnext/setup/doctype/quotation_lost_reason/quotation_lost_reason.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/setup/doctype/quotation_lost_reason/test_quotation_lost_reason.py b/erpnext/setup/doctype/quotation_lost_reason/test_quotation_lost_reason.py index ab8d61f1ebe..9330ba85870 100644 --- a/erpnext/setup/doctype/quotation_lost_reason/test_quotation_lost_reason.py +++ b/erpnext/setup/doctype/quotation_lost_reason/test_quotation_lost_reason.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/setup/doctype/quotation_lost_reason_detail/quotation_lost_reason_detail.py b/erpnext/setup/doctype/quotation_lost_reason_detail/quotation_lost_reason_detail.py index 434f24ea925..dda64e9c624 100644 --- a/erpnext/setup/doctype/quotation_lost_reason_detail/quotation_lost_reason_detail.py +++ b/erpnext/setup/doctype/quotation_lost_reason_detail/quotation_lost_reason_detail.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/setup/doctype/sales_partner/__init__.py b/erpnext/setup/doctype/sales_partner/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/sales_partner/__init__.py +++ b/erpnext/setup/doctype/sales_partner/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.py b/erpnext/setup/doctype/sales_partner/sales_partner.py index 6c741a8fb44..d2ec49dd6c3 100644 --- a/erpnext/setup/doctype/sales_partner/sales_partner.py +++ b/erpnext/setup/doctype/sales_partner/sales_partner.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.contacts.address_and_contact import load_address_and_contact diff --git a/erpnext/setup/doctype/sales_partner/test_sales_partner.py b/erpnext/setup/doctype/sales_partner/test_sales_partner.py index 6ece2390405..80ef3680147 100644 --- a/erpnext/setup/doctype/sales_partner/test_sales_partner.py +++ b/erpnext/setup/doctype/sales_partner/test_sales_partner.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/setup/doctype/sales_person/__init__.py b/erpnext/setup/doctype/sales_person/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/sales_person/__init__.py +++ b/erpnext/setup/doctype/sales_person/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/sales_person/sales_person.py b/erpnext/setup/doctype/sales_person/sales_person.py index c7cad6bb998..b79a566578d 100644 --- a/erpnext/setup/doctype/sales_person/sales_person.py +++ b/erpnext/setup/doctype/sales_person/sales_person.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/setup/doctype/sales_person/sales_person_dashboard.py b/erpnext/setup/doctype/sales_person/sales_person_dashboard.py index 61c1ba46d35..d0a5dd99dfc 100644 --- a/erpnext/setup/doctype/sales_person/sales_person_dashboard.py +++ b/erpnext/setup/doctype/sales_person/sales_person_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/setup/doctype/sales_person/test_sales_person.py b/erpnext/setup/doctype/sales_person/test_sales_person.py index 497aaad74f8..786d2cac4da 100644 --- a/erpnext/setup/doctype/sales_person/test_sales_person.py +++ b/erpnext/setup/doctype/sales_person/test_sales_person.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals test_dependencies = ["Employee"] diff --git a/erpnext/setup/doctype/supplier_group/__init__.py b/erpnext/setup/doctype/supplier_group/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/supplier_group/__init__.py +++ b/erpnext/setup/doctype/supplier_group/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/supplier_group/supplier_group.py b/erpnext/setup/doctype/supplier_group/supplier_group.py index 0ca35257926..381e1250c82 100644 --- a/erpnext/setup/doctype/supplier_group/supplier_group.py +++ b/erpnext/setup/doctype/supplier_group/supplier_group.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.utils.nestedset import NestedSet, get_root_of diff --git a/erpnext/setup/doctype/supplier_group/test_supplier_group.py b/erpnext/setup/doctype/supplier_group/test_supplier_group.py index b3a636635ec..283b3bfec3c 100644 --- a/erpnext/setup/doctype/supplier_group/test_supplier_group.py +++ b/erpnext/setup/doctype/supplier_group/test_supplier_group.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/setup/doctype/target_detail/__init__.py b/erpnext/setup/doctype/target_detail/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/target_detail/__init__.py +++ b/erpnext/setup/doctype/target_detail/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/target_detail/target_detail.py b/erpnext/setup/doctype/target_detail/target_detail.py index 89cd814f2d1..e27f5b6020d 100644 --- a/erpnext/setup/doctype/target_detail/target_detail.py +++ b/erpnext/setup/doctype/target_detail/target_detail.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/setup/doctype/terms_and_conditions/__init__.py b/erpnext/setup/doctype/terms_and_conditions/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/terms_and_conditions/__init__.py +++ b/erpnext/setup/doctype/terms_and_conditions/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py index 8c9059f61ef..8e6421eba8a 100644 --- a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py +++ b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/setup/doctype/terms_and_conditions/test_terms_and_conditions.py b/erpnext/setup/doctype/terms_and_conditions/test_terms_and_conditions.py index abfa9214d64..ca9e6c1aef8 100644 --- a/erpnext/setup/doctype/terms_and_conditions/test_terms_and_conditions.py +++ b/erpnext/setup/doctype/terms_and_conditions/test_terms_and_conditions.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/setup/doctype/territory/__init__.py b/erpnext/setup/doctype/territory/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/territory/__init__.py +++ b/erpnext/setup/doctype/territory/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/territory/territory.py b/erpnext/setup/doctype/territory/territory.py index f61796b9bdf..4c47d829e98 100644 --- a/erpnext/setup/doctype/territory/territory.py +++ b/erpnext/setup/doctype/territory/territory.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/setup/doctype/territory/test_territory.py b/erpnext/setup/doctype/territory/test_territory.py index a3aa866fff3..a18b7bf70ef 100644 --- a/erpnext/setup/doctype/territory/test_territory.py +++ b/erpnext/setup/doctype/territory/test_territory.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/setup/doctype/transaction_deletion_record/test_transaction_deletion_record.py b/erpnext/setup/doctype/transaction_deletion_record/test_transaction_deletion_record.py index aa0f79b4c86..095c3d0b6fb 100644 --- a/erpnext/setup/doctype/transaction_deletion_record/test_transaction_deletion_record.py +++ b/erpnext/setup/doctype/transaction_deletion_record/test_transaction_deletion_record.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py index efb038faccc..83ce042cde0 100644 --- a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py +++ b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/setup/doctype/transaction_deletion_record_item/transaction_deletion_record_item.py b/erpnext/setup/doctype/transaction_deletion_record_item/transaction_deletion_record_item.py index a113d504538..92ca8a2ac73 100644 --- a/erpnext/setup/doctype/transaction_deletion_record_item/transaction_deletion_record_item.py +++ b/erpnext/setup/doctype/transaction_deletion_record_item/transaction_deletion_record_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/setup/doctype/uom/__init__.py b/erpnext/setup/doctype/uom/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/doctype/uom/__init__.py +++ b/erpnext/setup/doctype/uom/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/doctype/uom/test_uom.py b/erpnext/setup/doctype/uom/test_uom.py index e222c134942..feb43293079 100644 --- a/erpnext/setup/doctype/uom/test_uom.py +++ b/erpnext/setup/doctype/uom/test_uom.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/setup/doctype/uom/uom.py b/erpnext/setup/doctype/uom/uom.py index f0e97b34e25..ddb512a0852 100644 --- a/erpnext/setup/doctype/uom/uom.py +++ b/erpnext/setup/doctype/uom/uom.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/setup/doctype/uom_conversion_factor/test_uom_conversion_factor.py b/erpnext/setup/doctype/uom_conversion_factor/test_uom_conversion_factor.py index 33795d6b5b2..5683b5bc30d 100644 --- a/erpnext/setup/doctype/uom_conversion_factor/test_uom_conversion_factor.py +++ b/erpnext/setup/doctype/uom_conversion_factor/test_uom_conversion_factor.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/setup/doctype/uom_conversion_factor/uom_conversion_factor.py b/erpnext/setup/doctype/uom_conversion_factor/uom_conversion_factor.py index 45342e9fee9..12642fe7e25 100644 --- a/erpnext/setup/doctype/uom_conversion_factor/uom_conversion_factor.py +++ b/erpnext/setup/doctype/uom_conversion_factor/uom_conversion_factor.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/setup/doctype/website_item_group/website_item_group.py b/erpnext/setup/doctype/website_item_group/website_item_group.py index 2f720134484..87fcb984530 100644 --- a/erpnext/setup/doctype/website_item_group/website_item_group.py +++ b/erpnext/setup/doctype/website_item_group/website_item_group.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py index cdc83c14620..67d11438714 100644 --- a/erpnext/setup/install.py +++ b/erpnext/setup/install.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import print_function, unicode_literals import frappe from frappe import _ diff --git a/erpnext/setup/page/__init__.py b/erpnext/setup/page/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/setup/page/__init__.py +++ b/erpnext/setup/page/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/setup/setup_wizard/data/dashboard_charts.py b/erpnext/setup/setup_wizard/data/dashboard_charts.py index 5369bbab356..e3b33df237f 100644 --- a/erpnext/setup/setup_wizard/data/dashboard_charts.py +++ b/erpnext/setup/setup_wizard/data/dashboard_charts.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import json diff --git a/erpnext/setup/setup_wizard/data/industry_type.py b/erpnext/setup/setup_wizard/data/industry_type.py index 2c83a5c721c..542dfc76dcb 100644 --- a/erpnext/setup/setup_wizard/data/industry_type.py +++ b/erpnext/setup/setup_wizard/data/industry_type.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/setup/setup_wizard/operations/company_setup.py b/erpnext/setup/setup_wizard/operations/company_setup.py index bea3906ebaf..358b9218312 100644 --- a/erpnext/setup/setup_wizard/operations/company_setup.py +++ b/erpnext/setup/setup_wizard/operations/company_setup.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import cstr, getdate diff --git a/erpnext/setup/setup_wizard/operations/default_website.py b/erpnext/setup/setup_wizard/operations/default_website.py index 2288ae06746..c11910b584c 100644 --- a/erpnext/setup/setup_wizard/operations/default_website.py +++ b/erpnext/setup/setup_wizard/operations/default_website.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/setup/setup_wizard/operations/defaults_setup.py b/erpnext/setup/setup_wizard/operations/defaults_setup.py index 55d5ec8630e..e4b1fa26ae0 100644 --- a/erpnext/setup/setup_wizard/operations/defaults_setup.py +++ b/erpnext/setup/setup_wizard/operations/defaults_setup.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import cstr, getdate diff --git a/erpnext/setup/setup_wizard/operations/install_fixtures.py b/erpnext/setup/setup_wizard/operations/install_fixtures.py index d61d94c3c69..503aeacd015 100644 --- a/erpnext/setup/setup_wizard/operations/install_fixtures.py +++ b/erpnext/setup/setup_wizard/operations/install_fixtures.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json import os diff --git a/erpnext/setup/setup_wizard/operations/sample_data.py b/erpnext/setup/setup_wizard/operations/sample_data.py index 3aef40d3ebb..16859947741 100644 --- a/erpnext/setup/setup_wizard/operations/sample_data.py +++ b/erpnext/setup/setup_wizard/operations/sample_data.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json import os diff --git a/erpnext/setup/setup_wizard/operations/taxes_setup.py b/erpnext/setup/setup_wizard/operations/taxes_setup.py index 58a14d20f20..289ffa58b87 100644 --- a/erpnext/setup/setup_wizard/operations/taxes_setup.py +++ b/erpnext/setup/setup_wizard/operations/taxes_setup.py @@ -1,7 +1,6 @@ # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import os import json diff --git a/erpnext/setup/setup_wizard/setup_wizard.py b/erpnext/setup/setup_wizard/setup_wizard.py index ecb07d53b7c..c9ed184e04e 100644 --- a/erpnext/setup/setup_wizard/setup_wizard.py +++ b/erpnext/setup/setup_wizard/setup_wizard.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/setup/setup_wizard/utils.py b/erpnext/setup/setup_wizard/utils.py index 30b88aecbcd..afab7e712bb 100644 --- a/erpnext/setup/setup_wizard/utils.py +++ b/erpnext/setup/setup_wizard/utils.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import json import os diff --git a/erpnext/setup/utils.py b/erpnext/setup/utils.py index 2302a66fa03..1478007da83 100644 --- a/erpnext/setup/utils.py +++ b/erpnext/setup/utils.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py index 3f1dfde0160..a7d90ea201a 100644 --- a/erpnext/shopping_cart/cart.py +++ b/erpnext/shopping_cart/cart.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe import frappe.defaults diff --git a/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.py b/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.py index 8f4afda57e4..4a755998dd4 100644 --- a/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.py +++ b/erpnext/shopping_cart/doctype/shopping_cart_settings/shopping_cart_settings.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/shopping_cart/doctype/shopping_cart_settings/test_shopping_cart_settings.py b/erpnext/shopping_cart/doctype/shopping_cart_settings/test_shopping_cart_settings.py index 1164a5d3949..c3809b30b0f 100644 --- a/erpnext/shopping_cart/doctype/shopping_cart_settings/test_shopping_cart_settings.py +++ b/erpnext/shopping_cart/doctype/shopping_cart_settings/test_shopping_cart_settings.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/shopping_cart/filters.py b/erpnext/shopping_cart/filters.py index 4787ae534cf..ef0badc8c89 100644 --- a/erpnext/shopping_cart/filters.py +++ b/erpnext/shopping_cart/filters.py @@ -1,7 +1,6 @@ # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/shopping_cart/product_info.py b/erpnext/shopping_cart/product_info.py index fa6863696a8..977f12fb9ef 100644 --- a/erpnext/shopping_cart/product_info.py +++ b/erpnext/shopping_cart/product_info.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/shopping_cart/test_shopping_cart.py b/erpnext/shopping_cart/test_shopping_cart.py index d1284cdf008..60c220a0878 100644 --- a/erpnext/shopping_cart/test_shopping_cart.py +++ b/erpnext/shopping_cart/test_shopping_cart.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/startup/__init__.py b/erpnext/startup/__init__.py index 3aa52979134..d1933d23969 100644 --- a/erpnext/startup/__init__.py +++ b/erpnext/startup/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # ERPNext - web based ERP (http://erpnext.com) # Copyright (C) 2012 Frappe Technologies Pvt Ltd @@ -17,7 +16,6 @@ # along with this program. If not, see . # default settings that can be made for a user. -from __future__ import unicode_literals product_name = "ERPNext" user_defaults = { diff --git a/erpnext/startup/boot.py b/erpnext/startup/boot.py index bb76f5a6f97..ed8c878ad4a 100644 --- a/erpnext/startup/boot.py +++ b/erpnext/startup/boot.py @@ -2,7 +2,6 @@ # License: GNU General Public License v3. See license.txt" -from __future__ import unicode_literals import frappe from frappe.utils import cint diff --git a/erpnext/startup/leaderboard.py b/erpnext/startup/leaderboard.py index 60e67f8f580..a92abf11130 100644 --- a/erpnext/startup/leaderboard.py +++ b/erpnext/startup/leaderboard.py @@ -1,5 +1,4 @@ -from __future__ import print_function, unicode_literals import frappe from frappe.utils import cint diff --git a/erpnext/startup/notifications.py b/erpnext/startup/notifications.py index 01bb344d15b..0965ead57c6 100644 --- a/erpnext/startup/notifications.py +++ b/erpnext/startup/notifications.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/startup/report_data_map.py b/erpnext/startup/report_data_map.py index 1eaf738dde5..65b48bf043b 100644 --- a/erpnext/startup/report_data_map.py +++ b/erpnext/startup/report_data_map.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals # mappings for table dumps # "remember to add indexes!" diff --git a/erpnext/stock/__init__.py b/erpnext/stock/__init__.py index 575aa0fa5d0..9fd1f0e8ce1 100644 --- a/erpnext/stock/__init__.py +++ b/erpnext/stock/__init__.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/dashboard/item_dashboard.py b/erpnext/stock/dashboard/item_dashboard.py index df6b632d251..9a83372f3e3 100644 --- a/erpnext/stock/dashboard/item_dashboard.py +++ b/erpnext/stock/dashboard/item_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.model.db_query import DatabaseQuery diff --git a/erpnext/stock/dashboard/warehouse_capacity_dashboard.py b/erpnext/stock/dashboard/warehouse_capacity_dashboard.py index 5d8b703aa5e..e8b0bea468e 100644 --- a/erpnext/stock/dashboard/warehouse_capacity_dashboard.py +++ b/erpnext/stock/dashboard/warehouse_capacity_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe.model.db_query import DatabaseQuery diff --git a/erpnext/stock/dashboard_chart_source/warehouse_wise_stock_value/warehouse_wise_stock_value.py b/erpnext/stock/dashboard_chart_source/warehouse_wise_stock_value/warehouse_wise_stock_value.py index 1753002a819..d835420b9e2 100644 --- a/erpnext/stock/dashboard_chart_source/warehouse_wise_stock_value/warehouse_wise_stock_value.py +++ b/erpnext/stock/dashboard_chart_source/warehouse_wise_stock_value/warehouse_wise_stock_value.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/doctype/__init__.py b/erpnext/stock/doctype/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/__init__.py +++ b/erpnext/stock/doctype/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/batch/__init__.py b/erpnext/stock/doctype/batch/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/batch/__init__.py +++ b/erpnext/stock/doctype/batch/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index 76db581a063..3ce2d87f711 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/doctype/batch/batch_dashboard.py b/erpnext/stock/doctype/batch/batch_dashboard.py index eb6a97ecfd8..afa0fca99a0 100644 --- a/erpnext/stock/doctype/batch/batch_dashboard.py +++ b/erpnext/stock/doctype/batch/batch_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/stock/doctype/bin/__init__.py b/erpnext/stock/doctype/bin/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/bin/__init__.py +++ b/erpnext/stock/doctype/bin/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/bin/bin.py b/erpnext/stock/doctype/bin/bin.py index 4be0415564d..48b1cc53967 100644 --- a/erpnext/stock/doctype/bin/bin.py +++ b/erpnext/stock/doctype/bin/bin.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/stock/doctype/bin/test_bin.py b/erpnext/stock/doctype/bin/test_bin.py index f0dbe8c0dd8..9c390d94b4e 100644 --- a/erpnext/stock/doctype/bin/test_bin.py +++ b/erpnext/stock/doctype/bin/test_bin.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/stock/doctype/customs_tariff_number/customs_tariff_number.py b/erpnext/stock/doctype/customs_tariff_number/customs_tariff_number.py index d484301572b..b52acb1ad65 100644 --- a/erpnext/stock/doctype/customs_tariff_number/customs_tariff_number.py +++ b/erpnext/stock/doctype/customs_tariff_number/customs_tariff_number.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/customs_tariff_number/test_customs_tariff_number.py b/erpnext/stock/doctype/customs_tariff_number/test_customs_tariff_number.py index 7c9807c762b..b3aa1f48245 100644 --- a/erpnext/stock/doctype/customs_tariff_number/test_customs_tariff_number.py +++ b/erpnext/stock/doctype/customs_tariff_number/test_customs_tariff_number.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/stock/doctype/delivery_note/__init__.py b/erpnext/stock/doctype/delivery_note/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/delivery_note/__init__.py +++ b/erpnext/stock/doctype/delivery_note/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py index f75b52cec8e..52684607b4b 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py b/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py index 31fc708eabd..61d8de4a06d 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py index f58b586ab20..4f89a19f3c7 100644 --- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py @@ -2,7 +2,6 @@ # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/stock/doctype/delivery_note_item/__init__.py b/erpnext/stock/doctype/delivery_note_item/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/delivery_note_item/__init__.py +++ b/erpnext/stock/doctype/delivery_note_item/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py index 693caabfb85..cd0d7251aee 100644 --- a/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py +++ b/erpnext/stock/doctype/delivery_note_item/delivery_note_item.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/delivery_settings/delivery_settings.py b/erpnext/stock/doctype/delivery_settings/delivery_settings.py index c25907defeb..ab1ca80e393 100644 --- a/erpnext/stock/doctype/delivery_settings/delivery_settings.py +++ b/erpnext/stock/doctype/delivery_settings/delivery_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/delivery_settings/test_delivery_settings.py b/erpnext/stock/doctype/delivery_settings/test_delivery_settings.py index 25c9da16aa8..37745dc4088 100644 --- a/erpnext/stock/doctype/delivery_settings/test_delivery_settings.py +++ b/erpnext/stock/doctype/delivery_settings/test_delivery_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/stock/doctype/delivery_stop/delivery_stop.py b/erpnext/stock/doctype/delivery_stop/delivery_stop.py index f94ccb80215..9da8bfa9869 100644 --- a/erpnext/stock/doctype/delivery_stop/delivery_stop.py +++ b/erpnext/stock/doctype/delivery_stop/delivery_stop.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, newmatik.io / ESO Electronic Service Ottenbreit and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/delivery_trip/delivery_trip.py b/erpnext/stock/doctype/delivery_trip/delivery_trip.py index fe9818242fe..c749b2e6706 100644 --- a/erpnext/stock/doctype/delivery_trip/delivery_trip.py +++ b/erpnext/stock/doctype/delivery_trip/delivery_trip.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import datetime diff --git a/erpnext/stock/doctype/delivery_trip/test_delivery_trip.py b/erpnext/stock/doctype/delivery_trip/test_delivery_trip.py index c6ff73e633b..321f48b2c59 100644 --- a/erpnext/stock/doctype/delivery_trip/test_delivery_trip.py +++ b/erpnext/stock/doctype/delivery_trip/test_delivery_trip.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/stock/doctype/item/__init__.py b/erpnext/stock/doctype/item/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/item/__init__.py +++ b/erpnext/stock/doctype/item/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/item/item_dashboard.py b/erpnext/stock/doctype/item/item_dashboard.py index e80ed6fcda9..b0f1bbc2d52 100644 --- a/erpnext/stock/doctype/item/item_dashboard.py +++ b/erpnext/stock/doctype/item/item_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/stock/doctype/item/test_item.py b/erpnext/stock/doctype/item/test_item.py index 9198272513b..7237178b15b 100644 --- a/erpnext/stock/doctype/item/test_item.py +++ b/erpnext/stock/doctype/item/test_item.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/stock/doctype/item_alternative/item_alternative.py b/erpnext/stock/doctype/item_alternative/item_alternative.py index 6f2a389b707..766647b32e5 100644 --- a/erpnext/stock/doctype/item_alternative/item_alternative.py +++ b/erpnext/stock/doctype/item_alternative/item_alternative.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/doctype/item_alternative/test_item_alternative.py b/erpnext/stock/doctype/item_alternative/test_item_alternative.py index af6cc472e34..3976af4e88c 100644 --- a/erpnext/stock/doctype/item_alternative/test_item_alternative.py +++ b/erpnext/stock/doctype/item_alternative/test_item_alternative.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/stock/doctype/item_attribute/item_attribute.py b/erpnext/stock/doctype/item_attribute/item_attribute.py index 9894788b8c2..5a28a9e231c 100644 --- a/erpnext/stock/doctype/item_attribute/item_attribute.py +++ b/erpnext/stock/doctype/item_attribute/item_attribute.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/doctype/item_attribute/test_item_attribute.py b/erpnext/stock/doctype/item_attribute/test_item_attribute.py index 2cd711bbb19..0b7ca257151 100644 --- a/erpnext/stock/doctype/item_attribute/test_item_attribute.py +++ b/erpnext/stock/doctype/item_attribute/test_item_attribute.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/stock/doctype/item_attribute_value/item_attribute_value.py b/erpnext/stock/doctype/item_attribute_value/item_attribute_value.py index ceffb4972a9..bc6fb4f3994 100644 --- a/erpnext/stock/doctype/item_attribute_value/item_attribute_value.py +++ b/erpnext/stock/doctype/item_attribute_value/item_attribute_value.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/item_barcode/item_barcode.py b/erpnext/stock/doctype/item_barcode/item_barcode.py index e85f93b71e9..64c39dabde1 100644 --- a/erpnext/stock/doctype/item_barcode/item_barcode.py +++ b/erpnext/stock/doctype/item_barcode/item_barcode.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/item_customer_detail/__init__.py b/erpnext/stock/doctype/item_customer_detail/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/item_customer_detail/__init__.py +++ b/erpnext/stock/doctype/item_customer_detail/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/item_customer_detail/item_customer_detail.py b/erpnext/stock/doctype/item_customer_detail/item_customer_detail.py index 55fd0ec3436..ba81b443bba 100644 --- a/erpnext/stock/doctype/item_customer_detail/item_customer_detail.py +++ b/erpnext/stock/doctype/item_customer_detail/item_customer_detail.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/item_default/item_default.py b/erpnext/stock/doctype/item_default/item_default.py index 6239c540434..8a9693e3a65 100644 --- a/erpnext/stock/doctype/item_default/item_default.py +++ b/erpnext/stock/doctype/item_default/item_default.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/item_manufacturer/item_manufacturer.py b/erpnext/stock/doctype/item_manufacturer/item_manufacturer.py index 044ac7c2350..469ccd8f2df 100644 --- a/erpnext/stock/doctype/item_manufacturer/item_manufacturer.py +++ b/erpnext/stock/doctype/item_manufacturer/item_manufacturer.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/doctype/item_manufacturer/test_item_manufacturer.py b/erpnext/stock/doctype/item_manufacturer/test_item_manufacturer.py index 5a4ca6a44ad..de043569399 100644 --- a/erpnext/stock/doctype/item_manufacturer/test_item_manufacturer.py +++ b/erpnext/stock/doctype/item_manufacturer/test_item_manufacturer.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/stock/doctype/item_price/__init__.py b/erpnext/stock/doctype/item_price/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/item_price/__init__.py +++ b/erpnext/stock/doctype/item_price/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/item_price/item_price.py b/erpnext/stock/doctype/item_price/item_price.py index 197b147e7ee..010e01a78ba 100644 --- a/erpnext/stock/doctype/item_price/item_price.py +++ b/erpnext/stock/doctype/item_price/item_price.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/doctype/item_price/test_item_price.py b/erpnext/stock/doctype/item_price/test_item_price.py index 3a51fbbe17e..f81770e487d 100644 --- a/erpnext/stock/doctype/item_price/test_item_price.py +++ b/erpnext/stock/doctype/item_price/test_item_price.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.test_runner import make_test_records_for_doctype diff --git a/erpnext/stock/doctype/item_quality_inspection_parameter/__init__.py b/erpnext/stock/doctype/item_quality_inspection_parameter/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/item_quality_inspection_parameter/__init__.py +++ b/erpnext/stock/doctype/item_quality_inspection_parameter/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.py b/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.py index 0dd7e431054..6cadb9973c2 100644 --- a/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.py +++ b/erpnext/stock/doctype/item_quality_inspection_parameter/item_quality_inspection_parameter.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/item_reorder/item_reorder.py b/erpnext/stock/doctype/item_reorder/item_reorder.py index 598339deee8..c3cc69b3201 100644 --- a/erpnext/stock/doctype/item_reorder/item_reorder.py +++ b/erpnext/stock/doctype/item_reorder/item_reorder.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/item_supplier/__init__.py b/erpnext/stock/doctype/item_supplier/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/item_supplier/__init__.py +++ b/erpnext/stock/doctype/item_supplier/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/item_supplier/item_supplier.py b/erpnext/stock/doctype/item_supplier/item_supplier.py index 9b5da55f600..84f55566614 100644 --- a/erpnext/stock/doctype/item_supplier/item_supplier.py +++ b/erpnext/stock/doctype/item_supplier/item_supplier.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/item_tax/__init__.py b/erpnext/stock/doctype/item_tax/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/item_tax/__init__.py +++ b/erpnext/stock/doctype/item_tax/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/item_tax/item_tax.py b/erpnext/stock/doctype/item_tax/item_tax.py index 33c1e49f409..aa827198a9e 100644 --- a/erpnext/stock/doctype/item_tax/item_tax.py +++ b/erpnext/stock/doctype/item_tax/item_tax.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/item_variant/item_variant.py b/erpnext/stock/doctype/item_variant/item_variant.py index 47ab07fe98d..f1580fcba9c 100644 --- a/erpnext/stock/doctype/item_variant/item_variant.py +++ b/erpnext/stock/doctype/item_variant/item_variant.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.py b/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.py index 78dda6535fc..76b88b85c05 100644 --- a/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.py +++ b/erpnext/stock/doctype/item_variant_attribute/item_variant_attribute.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/item_variant_settings/item_variant_settings.py b/erpnext/stock/doctype/item_variant_settings/item_variant_settings.py index cb6626fd17b..f63498b9ac6 100644 --- a/erpnext/stock/doctype/item_variant_settings/item_variant_settings.py +++ b/erpnext/stock/doctype/item_variant_settings/item_variant_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/doctype/item_variant_settings/test_item_variant_settings.py b/erpnext/stock/doctype/item_variant_settings/test_item_variant_settings.py index 040382a66f7..5f33d674074 100644 --- a/erpnext/stock/doctype/item_variant_settings/test_item_variant_settings.py +++ b/erpnext/stock/doctype/item_variant_settings/test_item_variant_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/stock/doctype/item_website_specification/item_website_specification.py b/erpnext/stock/doctype/item_website_specification/item_website_specification.py index 85491b73921..af9612c186c 100644 --- a/erpnext/stock/doctype/item_website_specification/item_website_specification.py +++ b/erpnext/stock/doctype/item_website_specification/item_website_specification.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/landed_cost_item/__init__.py b/erpnext/stock/doctype/landed_cost_item/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/landed_cost_item/__init__.py +++ b/erpnext/stock/doctype/landed_cost_item/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/landed_cost_item/landed_cost_item.py b/erpnext/stock/doctype/landed_cost_item/landed_cost_item.py index 7dd3aa5c346..35a3740564a 100644 --- a/erpnext/stock/doctype/landed_cost_item/landed_cost_item.py +++ b/erpnext/stock/doctype/landed_cost_item/landed_cost_item.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/landed_cost_purchase_receipt/__init__.py b/erpnext/stock/doctype/landed_cost_purchase_receipt/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/landed_cost_purchase_receipt/__init__.py +++ b/erpnext/stock/doctype/landed_cost_purchase_receipt/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.py b/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.py index 3d81d964111..f5bbc4ad52a 100644 --- a/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.py +++ b/erpnext/stock/doctype/landed_cost_purchase_receipt/landed_cost_purchase_receipt.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.py b/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.py index e649e4d0797..a4a1c583969 100644 --- a/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.py +++ b/erpnext/stock/doctype/landed_cost_taxes_and_charges/landed_cost_taxes_and_charges.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py index 51ccea982d9..7aff95d1e81 100644 --- a/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py +++ b/erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py b/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py index 339eaaaf7a5..9204842b8f6 100644 --- a/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py +++ b/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py @@ -2,7 +2,6 @@ # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.utils import flt diff --git a/erpnext/stock/doctype/manufacturer/manufacturer.py b/erpnext/stock/doctype/manufacturer/manufacturer.py index 314a2808045..426affc40b8 100644 --- a/erpnext/stock/doctype/manufacturer/manufacturer.py +++ b/erpnext/stock/doctype/manufacturer/manufacturer.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.contacts.address_and_contact import load_address_and_contact from frappe.model.document import Document diff --git a/erpnext/stock/doctype/manufacturer/test_manufacturer.py b/erpnext/stock/doctype/manufacturer/test_manufacturer.py index c0c61b00d0b..66323478c83 100644 --- a/erpnext/stock/doctype/manufacturer/test_manufacturer.py +++ b/erpnext/stock/doctype/manufacturer/test_manufacturer.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py index ec01cae2567..a9ee4b07426 100644 --- a/erpnext/stock/doctype/material_request/material_request.py +++ b/erpnext/stock/doctype/material_request/material_request.py @@ -4,7 +4,6 @@ # ERPNext - web based ERP (http://erpnext.com) # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/stock/doctype/material_request/material_request_dashboard.py b/erpnext/stock/doctype/material_request/material_request_dashboard.py index 291cfb53c90..9133859b24f 100644 --- a/erpnext/stock/doctype/material_request/material_request_dashboard.py +++ b/erpnext/stock/doctype/material_request/material_request_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/stock/doctype/material_request/test_material_request.py b/erpnext/stock/doctype/material_request/test_material_request.py index f66a228e35e..383b0ae806e 100644 --- a/erpnext/stock/doctype/material_request/test_material_request.py +++ b/erpnext/stock/doctype/material_request/test_material_request.py @@ -4,7 +4,6 @@ # ERPNext - web based ERP (http://erpnext.com) # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.utils import flt, today diff --git a/erpnext/stock/doctype/material_request_item/material_request_item.py b/erpnext/stock/doctype/material_request_item/material_request_item.py index 0c98b97e57e..32407d0fb09 100644 --- a/erpnext/stock/doctype/material_request_item/material_request_item.py +++ b/erpnext/stock/doctype/material_request_item/material_request_item.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/stock/doctype/packed_item/packed_item.py b/erpnext/stock/doctype/packed_item/packed_item.py index 08a24472576..3f73093d673 100644 --- a/erpnext/stock/doctype/packed_item/packed_item.py +++ b/erpnext/stock/doctype/packed_item/packed_item.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/stock/doctype/packing_slip/__init__.py b/erpnext/stock/doctype/packing_slip/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/packing_slip/__init__.py +++ b/erpnext/stock/doctype/packing_slip/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.py b/erpnext/stock/doctype/packing_slip/packing_slip.py index 4a843e0fde9..b092862415a 100644 --- a/erpnext/stock/doctype/packing_slip/packing_slip.py +++ b/erpnext/stock/doctype/packing_slip/packing_slip.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/doctype/packing_slip/test_packing_slip.py b/erpnext/stock/doctype/packing_slip/test_packing_slip.py index c70cba67f2b..5eb6b7399ae 100644 --- a/erpnext/stock/doctype/packing_slip/test_packing_slip.py +++ b/erpnext/stock/doctype/packing_slip/test_packing_slip.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/stock/doctype/packing_slip_item/__init__.py b/erpnext/stock/doctype/packing_slip_item/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/packing_slip_item/__init__.py +++ b/erpnext/stock/doctype/packing_slip_item/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/packing_slip_item/packing_slip_item.py b/erpnext/stock/doctype/packing_slip_item/packing_slip_item.py index 8363968187b..ec148aa5bc7 100644 --- a/erpnext/stock/doctype/packing_slip_item/packing_slip_item.py +++ b/erpnext/stock/doctype/packing_slip_item/packing_slip_item.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index 4c02f3db43b..b7987543f2b 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt diff --git a/erpnext/stock/doctype/pick_list/pick_list_dashboard.py b/erpnext/stock/doctype/pick_list/pick_list_dashboard.py index 50a767bafa7..d19bedeeafe 100644 --- a/erpnext/stock/doctype/pick_list/pick_list_dashboard.py +++ b/erpnext/stock/doctype/pick_list/pick_list_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_data(): diff --git a/erpnext/stock/doctype/pick_list/test_pick_list.py b/erpnext/stock/doctype/pick_list/test_pick_list.py index 58b46e1eefc..41e3150f0d7 100644 --- a/erpnext/stock/doctype/pick_list/test_pick_list.py +++ b/erpnext/stock/doctype/pick_list/test_pick_list.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import frappe from frappe import _dict diff --git a/erpnext/stock/doctype/pick_list_item/pick_list_item.py b/erpnext/stock/doctype/pick_list_item/pick_list_item.py index 4cd81f7f85b..6ecccb12482 100644 --- a/erpnext/stock/doctype/pick_list_item/pick_list_item.py +++ b/erpnext/stock/doctype/pick_list_item/pick_list_item.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/stock/doctype/price_list/__init__.py b/erpnext/stock/doctype/price_list/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/price_list/__init__.py +++ b/erpnext/stock/doctype/price_list/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/price_list/price_list.py b/erpnext/stock/doctype/price_list/price_list.py index 01040c6b8bc..74b823ada3e 100644 --- a/erpnext/stock/doctype/price_list/price_list.py +++ b/erpnext/stock/doctype/price_list/price_list.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, throw diff --git a/erpnext/stock/doctype/price_list/test_price_list.py b/erpnext/stock/doctype/price_list/test_price_list.py index baf6170e850..b8218b942e7 100644 --- a/erpnext/stock/doctype/price_list/test_price_list.py +++ b/erpnext/stock/doctype/price_list/test_price_list.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/stock/doctype/price_list_country/price_list_country.py b/erpnext/stock/doctype/price_list_country/price_list_country.py index a57729fb2e4..94e1107b2cf 100644 --- a/erpnext/stock/doctype/price_list_country/price_list_country.py +++ b/erpnext/stock/doctype/price_list_country/price_list_country.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/purchase_receipt/__init__.py b/erpnext/stock/doctype/purchase_receipt/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/purchase_receipt/__init__.py +++ b/erpnext/stock/doctype/purchase_receipt/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 47c8df9a2c9..954e47d3bef 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, throw diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py index b60850f2855..18da88c3753 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index de177444285..a4883523fae 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json import unittest diff --git a/erpnext/stock/doctype/purchase_receipt_item/__init__.py b/erpnext/stock/doctype/purchase_receipt_item/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/__init__.py +++ b/erpnext/stock/doctype/purchase_receipt_item/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.py b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.py index 2d25140d2b6..b4b9fd33635 100644 --- a/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.py +++ b/erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/putaway_rule/putaway_rule.py b/erpnext/stock/doctype/putaway_rule/putaway_rule.py index aa9d8968063..25330b71833 100644 --- a/erpnext/stock/doctype/putaway_rule/putaway_rule.py +++ b/erpnext/stock/doctype/putaway_rule/putaway_rule.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import copy import json diff --git a/erpnext/stock/doctype/putaway_rule/test_putaway_rule.py b/erpnext/stock/doctype/putaway_rule/test_putaway_rule.py index c25bca94dbb..bd4d811e76c 100644 --- a/erpnext/stock/doctype/putaway_rule/test_putaway_rule.py +++ b/erpnext/stock/doctype/putaway_rule/test_putaway_rule.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/stock/doctype/quality_inspection/__init__.py b/erpnext/stock/doctype/quality_inspection/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/quality_inspection/__init__.py +++ b/erpnext/stock/doctype/quality_inspection/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/quality_inspection/quality_inspection.py b/erpnext/stock/doctype/quality_inspection/quality_inspection.py index 8b2f8da9dfd..913ee1559d4 100644 --- a/erpnext/stock/doctype/quality_inspection/quality_inspection.py +++ b/erpnext/stock/doctype/quality_inspection/quality_inspection.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/doctype/quality_inspection_parameter/quality_inspection_parameter.py b/erpnext/stock/doctype/quality_inspection_parameter/quality_inspection_parameter.py index fa682012e59..d5123c7ce6e 100644 --- a/erpnext/stock/doctype/quality_inspection_parameter/quality_inspection_parameter.py +++ b/erpnext/stock/doctype/quality_inspection_parameter/quality_inspection_parameter.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/stock/doctype/quality_inspection_parameter/test_quality_inspection_parameter.py b/erpnext/stock/doctype/quality_inspection_parameter/test_quality_inspection_parameter.py index f3041aa863d..3cc1fdeff82 100644 --- a/erpnext/stock/doctype/quality_inspection_parameter/test_quality_inspection_parameter.py +++ b/erpnext/stock/doctype/quality_inspection_parameter/test_quality_inspection_parameter.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/stock/doctype/quality_inspection_parameter_group/quality_inspection_parameter_group.py b/erpnext/stock/doctype/quality_inspection_parameter_group/quality_inspection_parameter_group.py index b5e28f3ec9d..26e93615169 100644 --- a/erpnext/stock/doctype/quality_inspection_parameter_group/quality_inspection_parameter_group.py +++ b/erpnext/stock/doctype/quality_inspection_parameter_group/quality_inspection_parameter_group.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/stock/doctype/quality_inspection_parameter_group/test_quality_inspection_parameter_group.py b/erpnext/stock/doctype/quality_inspection_parameter_group/test_quality_inspection_parameter_group.py index ded47e8ca80..1630ad0a3f4 100644 --- a/erpnext/stock/doctype/quality_inspection_parameter_group/test_quality_inspection_parameter_group.py +++ b/erpnext/stock/doctype/quality_inspection_parameter_group/test_quality_inspection_parameter_group.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/stock/doctype/quality_inspection_reading/__init__.py b/erpnext/stock/doctype/quality_inspection_reading/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/quality_inspection_reading/__init__.py +++ b/erpnext/stock/doctype/quality_inspection_reading/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/quality_inspection_reading/quality_inspection_reading.py b/erpnext/stock/doctype/quality_inspection_reading/quality_inspection_reading.py index 7b56603321a..81454f110b9 100644 --- a/erpnext/stock/doctype/quality_inspection_reading/quality_inspection_reading.py +++ b/erpnext/stock/doctype/quality_inspection_reading/quality_inspection_reading.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/quality_inspection_template/quality_inspection_template.py b/erpnext/stock/doctype/quality_inspection_template/quality_inspection_template.py index 50e28a6361f..7f8c871a93d 100644 --- a/erpnext/stock/doctype/quality_inspection_template/quality_inspection_template.py +++ b/erpnext/stock/doctype/quality_inspection_template/quality_inspection_template.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/stock/doctype/quality_inspection_template/test_quality_inspection_template.py b/erpnext/stock/doctype/quality_inspection_template/test_quality_inspection_template.py index 6286523c861..9523bbaa378 100644 --- a/erpnext/stock/doctype/quality_inspection_template/test_quality_inspection_template.py +++ b/erpnext/stock/doctype/quality_inspection_template/test_quality_inspection_template.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/stock/doctype/quick_stock_balance/quick_stock_balance.py b/erpnext/stock/doctype/quick_stock_balance/quick_stock_balance.py index 8ca5521de02..7a0f5d08210 100644 --- a/erpnext/stock/doctype/quick_stock_balance/quick_stock_balance.py +++ b/erpnext/stock/doctype/quick_stock_balance/quick_stock_balance.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py index d86e52fa641..86b4b860f85 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/doctype/serial_no/__init__.py b/erpnext/stock/doctype/serial_no/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/serial_no/__init__.py +++ b/erpnext/stock/doctype/serial_no/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py index a9254fb9ecf..8f41c9da54f 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.py +++ b/erpnext/stock/doctype/serial_no/serial_no.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/stock/doctype/serial_no/test_serial_no.py b/erpnext/stock/doctype/serial_no/test_serial_no.py index 570f22e6af3..99000d12016 100644 --- a/erpnext/stock/doctype/serial_no/test_serial_no.py +++ b/erpnext/stock/doctype/serial_no/test_serial_no.py @@ -4,7 +4,6 @@ # ERPNext - web based ERP (http://erpnext.com) # For license information, please see license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/stock/doctype/shipment/shipment.py b/erpnext/stock/doctype/shipment/shipment.py index 2cacd0dfab4..666de57f34f 100644 --- a/erpnext/stock/doctype/shipment/shipment.py +++ b/erpnext/stock/doctype/shipment/shipment.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/doctype/shipment/test_shipment.py b/erpnext/stock/doctype/shipment/test_shipment.py index dcd0b7c17c7..705b2651f65 100644 --- a/erpnext/stock/doctype/shipment/test_shipment.py +++ b/erpnext/stock/doctype/shipment/test_shipment.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals from datetime import date, timedelta diff --git a/erpnext/stock/doctype/shipment_delivery_note/shipment_delivery_note.py b/erpnext/stock/doctype/shipment_delivery_note/shipment_delivery_note.py index 795c952bcdd..2b58a39dfb4 100644 --- a/erpnext/stock/doctype/shipment_delivery_note/shipment_delivery_note.py +++ b/erpnext/stock/doctype/shipment_delivery_note/shipment_delivery_note.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/stock/doctype/shipment_parcel/shipment_parcel.py b/erpnext/stock/doctype/shipment_parcel/shipment_parcel.py index 69fecb6e5ce..a6070213bb3 100644 --- a/erpnext/stock/doctype/shipment_parcel/shipment_parcel.py +++ b/erpnext/stock/doctype/shipment_parcel/shipment_parcel.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/stock/doctype/shipment_parcel_template/shipment_parcel_template.py b/erpnext/stock/doctype/shipment_parcel_template/shipment_parcel_template.py index 0eaa2d3d5b8..a5de312d6b4 100644 --- a/erpnext/stock/doctype/shipment_parcel_template/shipment_parcel_template.py +++ b/erpnext/stock/doctype/shipment_parcel_template/shipment_parcel_template.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/stock/doctype/shipment_parcel_template/test_shipment_parcel_template.py b/erpnext/stock/doctype/shipment_parcel_template/test_shipment_parcel_template.py index 5f2a3993353..b6b7ca633de 100644 --- a/erpnext/stock/doctype/shipment_parcel_template/test_shipment_parcel_template.py +++ b/erpnext/stock/doctype/shipment_parcel_template/test_shipment_parcel_template.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/stock/doctype/stock_entry/__init__.py b/erpnext/stock/doctype/stock_entry/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/stock_entry/__init__.py +++ b/erpnext/stock/doctype/stock_entry/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index bd7d22bcbc0..882b8dfae0c 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json from collections import defaultdict diff --git a/erpnext/stock/doctype/stock_entry/stock_entry_utils.py b/erpnext/stock/doctype/stock_entry/stock_entry_utils.py index f54dc4604ed..5832fe49b2d 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry_utils.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry_utils.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import frappe from frappe.utils import cint, flt diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py index c9d0af5f3b1..d5d40c116e3 100644 --- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/stock/doctype/stock_entry_detail/__init__.py b/erpnext/stock/doctype/stock_entry_detail/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/stock_entry_detail/__init__.py +++ b/erpnext/stock/doctype/stock_entry_detail/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py index 6c03425a9e2..000ff2dcf8b 100644 --- a/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py +++ b/erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/stock_entry_type/stock_entry_type.py b/erpnext/stock/doctype/stock_entry_type/stock_entry_type.py index 3d6e26409e1..efd97c04ac6 100644 --- a/erpnext/stock/doctype/stock_entry_type/stock_entry_type.py +++ b/erpnext/stock/doctype/stock_entry_type/stock_entry_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/stock/doctype/stock_entry_type/test_stock_entry_type.py b/erpnext/stock/doctype/stock_entry_type/test_stock_entry_type.py index 7eea8f5c35c..83ebe7e651b 100644 --- a/erpnext/stock/doctype/stock_entry_type/test_stock_entry_type.py +++ b/erpnext/stock/doctype/stock_entry_type/test_stock_entry_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/stock/doctype/stock_ledger_entry/__init__.py b/erpnext/stock/doctype/stock_ledger_entry/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/__init__.py +++ b/erpnext/stock/doctype/stock_ledger_entry/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py index 2cf71accf83..9f0af495949 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py @@ -2,7 +2,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from datetime import date diff --git a/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py index ff33c2789b7..cafbd7581ce 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import frappe from frappe.core.page.permission_manager.permission_manager import reset diff --git a/erpnext/stock/doctype/stock_reconciliation/__init__.py b/erpnext/stock/doctype/stock_reconciliation/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/stock_reconciliation/__init__.py +++ b/erpnext/stock/doctype/stock_reconciliation/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py index f59a4e6ff85..82a8c3717dc 100644 --- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, msgprint diff --git a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py index 415ac5eb267..de89b2b1c4d 100644 --- a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py +++ b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py @@ -4,7 +4,6 @@ # ERPNext - web based ERP (http://erpnext.com) # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.utils import add_days, flt, nowdate, nowtime, random_string diff --git a/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.py b/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.py index 227e72769b5..b3b5d082c9a 100644 --- a/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.py +++ b/erpnext/stock/doctype/stock_reconciliation_item/stock_reconciliation_item.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.py b/erpnext/stock/doctype/stock_settings/stock_settings.py index 2a634b3d16b..2dd103d607f 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.py +++ b/erpnext/stock/doctype/stock_settings/stock_settings.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/doctype/stock_settings/test_stock_settings.py b/erpnext/stock/doctype/stock_settings/test_stock_settings.py index bf8ac5dc79a..072b54b8205 100644 --- a/erpnext/stock/doctype/stock_settings/test_stock_settings.py +++ b/erpnext/stock/doctype/stock_settings/test_stock_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/stock/doctype/uom_category/test_uom_category.py b/erpnext/stock/doctype/uom_category/test_uom_category.py index dd5510a3dd3..b33084aa870 100644 --- a/erpnext/stock/doctype/uom_category/test_uom_category.py +++ b/erpnext/stock/doctype/uom_category/test_uom_category.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/stock/doctype/uom_category/uom_category.py b/erpnext/stock/doctype/uom_category/uom_category.py index 282ebb2f4e2..844f6e63643 100644 --- a/erpnext/stock/doctype/uom_category/uom_category.py +++ b/erpnext/stock/doctype/uom_category/uom_category.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/uom_conversion_detail/__init__.py b/erpnext/stock/doctype/uom_conversion_detail/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/uom_conversion_detail/__init__.py +++ b/erpnext/stock/doctype/uom_conversion_detail/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.py b/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.py index 9d9d4c6f25b..e17a01eabc1 100644 --- a/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.py +++ b/erpnext/stock/doctype/uom_conversion_detail/uom_conversion_detail.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/variant_field/test_variant_field.py b/erpnext/stock/doctype/variant_field/test_variant_field.py index 408e33b2f70..2c6b5f63903 100644 --- a/erpnext/stock/doctype/variant_field/test_variant_field.py +++ b/erpnext/stock/doctype/variant_field/test_variant_field.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/stock/doctype/variant_field/variant_field.py b/erpnext/stock/doctype/variant_field/variant_field.py index abcfdc7030f..e8e02a0e856 100644 --- a/erpnext/stock/doctype/variant_field/variant_field.py +++ b/erpnext/stock/doctype/variant_field/variant_field.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/stock/doctype/warehouse/__init__.py b/erpnext/stock/doctype/warehouse/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/doctype/warehouse/__init__.py +++ b/erpnext/stock/doctype/warehouse/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/doctype/warehouse/test_warehouse.py b/erpnext/stock/doctype/warehouse/test_warehouse.py index 98317ec9c57..ca92936a1dc 100644 --- a/erpnext/stock/doctype/warehouse/test_warehouse.py +++ b/erpnext/stock/doctype/warehouse/test_warehouse.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.test_runner import make_test_records diff --git a/erpnext/stock/doctype/warehouse/warehouse.py b/erpnext/stock/doctype/warehouse/warehouse.py index ecd8707fa69..b9dbc388805 100644 --- a/erpnext/stock/doctype/warehouse/warehouse.py +++ b/erpnext/stock/doctype/warehouse/warehouse.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from collections import defaultdict diff --git a/erpnext/stock/doctype/warehouse_type/test_warehouse_type.py b/erpnext/stock/doctype/warehouse_type/test_warehouse_type.py index 846e63be30a..273e7954f87 100644 --- a/erpnext/stock/doctype/warehouse_type/test_warehouse_type.py +++ b/erpnext/stock/doctype/warehouse_type/test_warehouse_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/stock/doctype/warehouse_type/warehouse_type.py b/erpnext/stock/doctype/warehouse_type/warehouse_type.py index fd83d787796..3e07fe7d3cf 100644 --- a/erpnext/stock/doctype/warehouse_type/warehouse_type.py +++ b/erpnext/stock/doctype/warehouse_type/warehouse_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index e0190b64a75..6de04c41a5f 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/stock/page/__init__.py b/erpnext/stock/page/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/stock/page/__init__.py +++ b/erpnext/stock/page/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/stock/reorder_item.py b/erpnext/stock/reorder_item.py index 7c6fbfd9cd1..21f2573a279 100644 --- a/erpnext/stock/reorder_item.py +++ b/erpnext/stock/reorder_item.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json from math import ceil diff --git a/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.py b/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.py index da57baddc8c..44e13869ddb 100644 --- a/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.py +++ b/erpnext/stock/report/batch_item_expiry_status/batch_item_expiry_status.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py index 01927c2d10f..9b21deabcd4 100644 --- a/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py +++ b/erpnext/stock/report/batch_wise_balance_history/batch_wise_balance_history.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/report/bom_search/bom_search.py b/erpnext/stock/report/bom_search/bom_search.py index 8b583f35880..960396d5345 100644 --- a/erpnext/stock/report/bom_search/bom_search.py +++ b/erpnext/stock/report/bom_search/bom_search.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from six import iteritems diff --git a/erpnext/stock/report/delayed_item_report/delayed_item_report.py b/erpnext/stock/report/delayed_item_report/delayed_item_report.py index 1dd0478b40c..4ec36ea417f 100644 --- a/erpnext/stock/report/delayed_item_report/delayed_item_report.py +++ b/erpnext/stock/report/delayed_item_report/delayed_item_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/report/delayed_order_report/delayed_order_report.py b/erpnext/stock/report/delayed_order_report/delayed_order_report.py index 677e30c5a41..26090ab8ffb 100644 --- a/erpnext/stock/report/delayed_order_report/delayed_order_report.py +++ b/erpnext/stock/report/delayed_order_report/delayed_order_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/stock/report/delivery_note_trends/delivery_note_trends.py b/erpnext/stock/report/delivery_note_trends/delivery_note_trends.py index 6d03ec1c050..b7ac7ff6a53 100644 --- a/erpnext/stock/report/delivery_note_trends/delivery_note_trends.py +++ b/erpnext/stock/report/delivery_note_trends/delivery_note_trends.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/stock/report/incorrect_stock_value_report/incorrect_stock_value_report.py b/erpnext/stock/report/incorrect_stock_value_report/incorrect_stock_value_report.py index bc520ae27d9..7cce4a7d22e 100644 --- a/erpnext/stock/report/incorrect_stock_value_report/incorrect_stock_value_report.py +++ b/erpnext/stock/report/incorrect_stock_value_report/incorrect_stock_value_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/report/item_price_stock/item_price_stock.py b/erpnext/stock/report/item_price_stock/item_price_stock.py index 6ffb5c8a983..65af9f51cdf 100644 --- a/erpnext/stock/report/item_price_stock/item_price_stock.py +++ b/erpnext/stock/report/item_price_stock/item_price_stock.py @@ -1,6 +1,5 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/report/item_prices/item_prices.py b/erpnext/stock/report/item_prices/item_prices.py index aa5ae0ed3d4..0d0e8d22924 100644 --- a/erpnext/stock/report/item_prices/item_prices.py +++ b/erpnext/stock/report/item_prices/item_prices.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/report/item_shortage_report/item_shortage_report.py b/erpnext/stock/report/item_shortage_report/item_shortage_report.py index 1438e6cda02..30c761421fd 100644 --- a/erpnext/stock/report/item_shortage_report/item_shortage_report.py +++ b/erpnext/stock/report/item_shortage_report/item_shortage_report.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/report/item_variant_details/item_variant_details.py b/erpnext/stock/report/item_variant_details/item_variant_details.py index eedda53bed2..10cef70215b 100644 --- a/erpnext/stock/report/item_variant_details/item_variant_details.py +++ b/erpnext/stock/report/item_variant_details/item_variant_details.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py index 08869af44ae..314f1608fa1 100644 --- a/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py +++ b/erpnext/stock/report/itemwise_recommended_reorder_level/itemwise_recommended_reorder_level.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/report/product_bundle_balance/product_bundle_balance.py b/erpnext/stock/report/product_bundle_balance/product_bundle_balance.py index 2e298e7da4d..3c4dbce73a6 100644 --- a/erpnext/stock/report/product_bundle_balance/product_bundle_balance.py +++ b/erpnext/stock/report/product_bundle_balance/product_bundle_balance.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.py b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.py index 29595323980..97384427fa4 100644 --- a/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.py +++ b/erpnext/stock/report/purchase_receipt_trends/purchase_receipt_trends.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/stock/report/serial_no_ledger/serial_no_ledger.py b/erpnext/stock/report/serial_no_ledger/serial_no_ledger.py index 897a130a51a..80ec848e5b6 100644 --- a/erpnext/stock/report/serial_no_ledger/serial_no_ledger.py +++ b/erpnext/stock/report/serial_no_ledger/serial_no_ledger.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/stock/report/stock_ageing/stock_ageing.py b/erpnext/stock/report/stock_ageing/stock_ageing.py index b4eca0ba96a..1209be21eda 100644 --- a/erpnext/stock/report/stock_ageing/stock_ageing.py +++ b/erpnext/stock/report/stock_ageing/stock_ageing.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from operator import itemgetter diff --git a/erpnext/stock/report/stock_and_account_value_comparison/stock_and_account_value_comparison.py b/erpnext/stock/report/stock_and_account_value_comparison/stock_and_account_value_comparison.py index f64774a20a8..6fd3fe7da48 100644 --- a/erpnext/stock/report/stock_and_account_value_comparison/stock_and_account_value_comparison.py +++ b/erpnext/stock/report/stock_and_account_value_comparison/stock_and_account_value_comparison.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/report/stock_balance/stock_balance.py b/erpnext/stock/report/stock_balance/stock_balance.py index bb53c557371..963c4489e44 100644 --- a/erpnext/stock/report/stock_balance/stock_balance.py +++ b/erpnext/stock/report/stock_balance/stock_balance.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from operator import itemgetter diff --git a/erpnext/stock/report/stock_ledger/stock_ledger.py b/erpnext/stock/report/stock_ledger/stock_ledger.py index 4e20b472617..c60a6ca56ea 100644 --- a/erpnext/stock/report/stock_ledger/stock_ledger.py +++ b/erpnext/stock/report/stock_ledger/stock_ledger.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py index 16f7c305a3c..a28b75250bf 100644 --- a/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py +++ b/erpnext/stock/report/stock_projected_qty/stock_projected_qty.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/report/stock_qty_vs_serial_no_count/stock_qty_vs_serial_no_count.py b/erpnext/stock/report/stock_qty_vs_serial_no_count/stock_qty_vs_serial_no_count.py index 5580636703e..a7b48356b8d 100644 --- a/erpnext/stock/report/stock_qty_vs_serial_no_count/stock_qty_vs_serial_no_count.py +++ b/erpnext/stock/report/stock_qty_vs_serial_no_count/stock_qty_vs_serial_no_count.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py index f15557b00bf..11559aa2081 100644 --- a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py +++ b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/report/total_stock_summary/total_stock_summary.py b/erpnext/stock/report/total_stock_summary/total_stock_summary.py index 779b5aabdbc..7e47b50b856 100644 --- a/erpnext/stock/report/total_stock_summary/total_stock_summary.py +++ b/erpnext/stock/report/total_stock_summary/total_stock_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py b/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py index 6cb37513666..b43921f8592 100644 --- a/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py +++ b/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py @@ -4,7 +4,6 @@ # Copyright (c) 2013, Tristar Enterprises and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/stock/stock_balance.py b/erpnext/stock/stock_balance.py index 1cb0f0d0a49..6ac8da16ee7 100644 --- a/erpnext/stock/stock_balance.py +++ b/erpnext/stock/stock_balance.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import print_function, unicode_literals import frappe from frappe.utils import cstr, flt, nowdate, nowtime diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index 70f4bcaef79..f694da03ea8 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import copy import json diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py index e1d5a89082e..5aafecf018a 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/support/__init__.py b/erpnext/support/__init__.py index bd1b3f88adc..b9a7c1e8cee 100644 --- a/erpnext/support/__init__.py +++ b/erpnext/support/__init__.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals install_docs = [ {'doctype':'Role', 'role_name':'Support Team', 'name':'Support Team'}, diff --git a/erpnext/support/doctype/__init__.py b/erpnext/support/doctype/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/support/doctype/__init__.py +++ b/erpnext/support/doctype/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/support/doctype/issue/issue.py b/erpnext/support/doctype/issue/issue.py index 0fe1068a76c..0dc3639f1eb 100644 --- a/erpnext/support/doctype/issue/issue.py +++ b/erpnext/support/doctype/issue/issue.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json from datetime import timedelta diff --git a/erpnext/support/doctype/issue/issue_dashboard.py b/erpnext/support/doctype/issue/issue_dashboard.py index 2ac7c816156..e2de992e197 100644 --- a/erpnext/support/doctype/issue/issue_dashboard.py +++ b/erpnext/support/doctype/issue/issue_dashboard.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/support/doctype/issue/test_issue.py b/erpnext/support/doctype/issue/test_issue.py index 6f0b8a67f3c..ab9a444bc34 100644 --- a/erpnext/support/doctype/issue/test_issue.py +++ b/erpnext/support/doctype/issue/test_issue.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import datetime import unittest diff --git a/erpnext/support/doctype/issue_priority/issue_priority.py b/erpnext/support/doctype/issue_priority/issue_priority.py index 1a7daf693d2..f21a453d240 100644 --- a/erpnext/support/doctype/issue_priority/issue_priority.py +++ b/erpnext/support/doctype/issue_priority/issue_priority.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/support/doctype/issue_priority/test_issue_priority.py b/erpnext/support/doctype/issue_priority/test_issue_priority.py index fc9ae687c93..d2b1415d33a 100644 --- a/erpnext/support/doctype/issue_priority/test_issue_priority.py +++ b/erpnext/support/doctype/issue_priority/test_issue_priority.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/support/doctype/issue_type/issue_type.py b/erpnext/support/doctype/issue_type/issue_type.py index 089ae28491a..c5adc8b9038 100644 --- a/erpnext/support/doctype/issue_type/issue_type.py +++ b/erpnext/support/doctype/issue_type/issue_type.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/support/doctype/issue_type/test_issue_type.py b/erpnext/support/doctype/issue_type/test_issue_type.py index 06a2de283b5..a3620347222 100644 --- a/erpnext/support/doctype/issue_type/test_issue_type.py +++ b/erpnext/support/doctype/issue_type/test_issue_type.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/support/doctype/pause_sla_on_status/pause_sla_on_status.py b/erpnext/support/doctype/pause_sla_on_status/pause_sla_on_status.py index 37c1f2bff7d..41d4f7f501f 100644 --- a/erpnext/support/doctype/pause_sla_on_status/pause_sla_on_status.py +++ b/erpnext/support/doctype/pause_sla_on_status/pause_sla_on_status.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/support/doctype/service_day/service_day.py b/erpnext/support/doctype/service_day/service_day.py index da96cad4172..4a3b1f00dbf 100644 --- a/erpnext/support/doctype/service_day/service_day.py +++ b/erpnext/support/doctype/service_day/service_day.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/support/doctype/service_level_agreement/service_level_agreement.py b/erpnext/support/doctype/service_level_agreement/service_level_agreement.py index 6bdd8f2205c..5f8f83d89ba 100644 --- a/erpnext/support/doctype/service_level_agreement/service_level_agreement.py +++ b/erpnext/support/doctype/service_level_agreement/service_level_agreement.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from datetime import datetime diff --git a/erpnext/support/doctype/service_level_agreement/test_service_level_agreement.py b/erpnext/support/doctype/service_level_agreement/test_service_level_agreement.py index 3a922776580..cfbe7446c0b 100644 --- a/erpnext/support/doctype/service_level_agreement/test_service_level_agreement.py +++ b/erpnext/support/doctype/service_level_agreement/test_service_level_agreement.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import datetime import unittest diff --git a/erpnext/support/doctype/service_level_priority/service_level_priority.py b/erpnext/support/doctype/service_level_priority/service_level_priority.py index 3b2d124a692..adb153e2563 100644 --- a/erpnext/support/doctype/service_level_priority/service_level_priority.py +++ b/erpnext/support/doctype/service_level_priority/service_level_priority.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/support/doctype/support_search_source/support_search_source.py b/erpnext/support/doctype/support_search_source/support_search_source.py index 50f4714f731..2270015a192 100644 --- a/erpnext/support/doctype/support_search_source/support_search_source.py +++ b/erpnext/support/doctype/support_search_source/support_search_source.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/support/doctype/support_settings/support_settings.py b/erpnext/support/doctype/support_settings/support_settings.py index 73aad9d82fd..ee8a3f50066 100644 --- a/erpnext/support/doctype/support_settings/support_settings.py +++ b/erpnext/support/doctype/support_settings/support_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/support/doctype/support_settings/test_support_settings.py b/erpnext/support/doctype/support_settings/test_support_settings.py index e9ec070b3aa..4eaf5322e26 100644 --- a/erpnext/support/doctype/support_settings/test_support_settings.py +++ b/erpnext/support/doctype/support_settings/test_support_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/support/doctype/warranty_claim/test_warranty_claim.py b/erpnext/support/doctype/warranty_claim/test_warranty_claim.py index dac8f034c30..f022d55a4b1 100644 --- a/erpnext/support/doctype/warranty_claim/test_warranty_claim.py +++ b/erpnext/support/doctype/warranty_claim/test_warranty_claim.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/support/doctype/warranty_claim/warranty_claim.py b/erpnext/support/doctype/warranty_claim/warranty_claim.py index 5fb11242a9d..87e95410264 100644 --- a/erpnext/support/doctype/warranty_claim/warranty_claim.py +++ b/erpnext/support/doctype/warranty_claim/warranty_claim.py @@ -2,7 +2,6 @@ # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _, session diff --git a/erpnext/support/page/__init__.py b/erpnext/support/page/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/support/page/__init__.py +++ b/erpnext/support/page/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/support/report/first_response_time_for_issues/first_response_time_for_issues.py b/erpnext/support/report/first_response_time_for_issues/first_response_time_for_issues.py index cb7a8a629e5..2ab0fb88a7f 100644 --- a/erpnext/support/report/first_response_time_for_issues/first_response_time_for_issues.py +++ b/erpnext/support/report/first_response_time_for_issues/first_response_time_for_issues.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/support/report/issue_analytics/issue_analytics.py b/erpnext/support/report/issue_analytics/issue_analytics.py index ac8bce104fa..543a34cb304 100644 --- a/erpnext/support/report/issue_analytics/issue_analytics.py +++ b/erpnext/support/report/issue_analytics/issue_analytics.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/support/report/issue_analytics/test_issue_analytics.py b/erpnext/support/report/issue_analytics/test_issue_analytics.py index 1de03ab28dc..b27dc46ad28 100644 --- a/erpnext/support/report/issue_analytics/test_issue_analytics.py +++ b/erpnext/support/report/issue_analytics/test_issue_analytics.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import unittest diff --git a/erpnext/support/report/issue_summary/issue_summary.py b/erpnext/support/report/issue_summary/issue_summary.py index 04819966095..b5d52278b89 100644 --- a/erpnext/support/report/issue_summary/issue_summary.py +++ b/erpnext/support/report/issue_summary/issue_summary.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/support/report/support_hour_distribution/support_hour_distribution.py b/erpnext/support/report/support_hour_distribution/support_hour_distribution.py index c0bec3c9552..e3a7e5f54b1 100644 --- a/erpnext/support/report/support_hour_distribution/support_hour_distribution.py +++ b/erpnext/support/report/support_hour_distribution/support_hour_distribution.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/support/web_form/issues/issues.py b/erpnext/support/web_form/issues/issues.py index f57de916dd1..19b550feea7 100644 --- a/erpnext/support/web_form/issues/issues.py +++ b/erpnext/support/web_form/issues/issues.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_context(context): diff --git a/erpnext/telephony/doctype/call_log/call_log.py b/erpnext/telephony/doctype/call_log/call_log.py index 0c1ea1657a7..0c24484bdfb 100644 --- a/erpnext/telephony/doctype/call_log/call_log.py +++ b/erpnext/telephony/doctype/call_log/call_log.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/telephony/doctype/call_log/test_call_log.py b/erpnext/telephony/doctype/call_log/test_call_log.py index f8d458d5415..111c7a744b7 100644 --- a/erpnext/telephony/doctype/call_log/test_call_log.py +++ b/erpnext/telephony/doctype/call_log/test_call_log.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/telephony/doctype/incoming_call_handling_schedule/incoming_call_handling_schedule.py b/erpnext/telephony/doctype/incoming_call_handling_schedule/incoming_call_handling_schedule.py index f48c808331d..b73f385cc3d 100644 --- a/erpnext/telephony/doctype/incoming_call_handling_schedule/incoming_call_handling_schedule.py +++ b/erpnext/telephony/doctype/incoming_call_handling_schedule/incoming_call_handling_schedule.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/telephony/doctype/incoming_call_settings/incoming_call_settings.py b/erpnext/telephony/doctype/incoming_call_settings/incoming_call_settings.py index faeff9024da..08e244d8897 100644 --- a/erpnext/telephony/doctype/incoming_call_settings/incoming_call_settings.py +++ b/erpnext/telephony/doctype/incoming_call_settings/incoming_call_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals from datetime import datetime from typing import Tuple diff --git a/erpnext/telephony/doctype/incoming_call_settings/test_incoming_call_settings.py b/erpnext/telephony/doctype/incoming_call_settings/test_incoming_call_settings.py index 243e3d9aeab..28f7f43dabf 100644 --- a/erpnext/telephony/doctype/incoming_call_settings/test_incoming_call_settings.py +++ b/erpnext/telephony/doctype/incoming_call_settings/test_incoming_call_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/telephony/doctype/voice_call_settings/test_voice_call_settings.py b/erpnext/telephony/doctype/voice_call_settings/test_voice_call_settings.py index 810b717ae61..97aa56feb62 100644 --- a/erpnext/telephony/doctype/voice_call_settings/test_voice_call_settings.py +++ b/erpnext/telephony/doctype/voice_call_settings/test_voice_call_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/telephony/doctype/voice_call_settings/voice_call_settings.py b/erpnext/telephony/doctype/voice_call_settings/voice_call_settings.py index fc0e338c15e..9f9486f5804 100644 --- a/erpnext/telephony/doctype/voice_call_settings/voice_call_settings.py +++ b/erpnext/telephony/doctype/voice_call_settings/voice_call_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals # import frappe from frappe.model.document import Document diff --git a/erpnext/templates/pages/cart.py b/erpnext/templates/pages/cart.py index 7c441f7623a..0bba1ffd169 100644 --- a/erpnext/templates/pages/cart.py +++ b/erpnext/templates/pages/cart.py @@ -1,6 +1,5 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals no_cache = 1 diff --git a/erpnext/templates/pages/courses.py b/erpnext/templates/pages/courses.py index 7eb01351eae..6051e60aa30 100644 --- a/erpnext/templates/pages/courses.py +++ b/erpnext/templates/pages/courses.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/templates/pages/help.py b/erpnext/templates/pages/help.py index 366b2835e2e..25e7c2623db 100644 --- a/erpnext/templates/pages/help.py +++ b/erpnext/templates/pages/help.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import json diff --git a/erpnext/templates/pages/home.py b/erpnext/templates/pages/home.py index 97a66fc4bbe..5d046a8e0f3 100644 --- a/erpnext/templates/pages/home.py +++ b/erpnext/templates/pages/home.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/templates/pages/integrations/gocardless_checkout.py b/erpnext/templates/pages/integrations/gocardless_checkout.py index 2661a966c75..bbdbf1ddf97 100644 --- a/erpnext/templates/pages/integrations/gocardless_checkout.py +++ b/erpnext/templates/pages/integrations/gocardless_checkout.py @@ -1,6 +1,5 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import json diff --git a/erpnext/templates/pages/integrations/gocardless_confirmation.py b/erpnext/templates/pages/integrations/gocardless_confirmation.py index 35c8b90bc9e..a6c3e714947 100644 --- a/erpnext/templates/pages/integrations/gocardless_confirmation.py +++ b/erpnext/templates/pages/integrations/gocardless_confirmation.py @@ -1,6 +1,5 @@ # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/templates/pages/material_request_info.py b/erpnext/templates/pages/material_request_info.py index c18e201487f..65d4427e118 100644 --- a/erpnext/templates/pages/material_request_info.py +++ b/erpnext/templates/pages/material_request_info.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/templates/pages/non_profit/join_chapter.py b/erpnext/templates/pages/non_profit/join_chapter.py index a1d1893c643..a5d03478866 100644 --- a/erpnext/templates/pages/non_profit/join_chapter.py +++ b/erpnext/templates/pages/non_profit/join_chapter.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/templates/pages/non_profit/leave_chapter.py b/erpnext/templates/pages/non_profit/leave_chapter.py index ebdb6645d49..6aa875876a2 100644 --- a/erpnext/templates/pages/non_profit/leave_chapter.py +++ b/erpnext/templates/pages/non_profit/leave_chapter.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/templates/pages/order.py b/erpnext/templates/pages/order.py index d4e81ab0967..2aa0f9c1b76 100644 --- a/erpnext/templates/pages/order.py +++ b/erpnext/templates/pages/order.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/templates/pages/partners.py b/erpnext/templates/pages/partners.py index b1c668a2f63..e4043ea8b96 100644 --- a/erpnext/templates/pages/partners.py +++ b/erpnext/templates/pages/partners.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/templates/pages/product_search.py b/erpnext/templates/pages/product_search.py index 1b9df2b7e7c..5aa1f1ed7a1 100644 --- a/erpnext/templates/pages/product_search.py +++ b/erpnext/templates/pages/product_search.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.utils import cint, cstr, nowdate diff --git a/erpnext/templates/pages/projects.py b/erpnext/templates/pages/projects.py index cabf37badc9..16aa4390f1f 100644 --- a/erpnext/templates/pages/projects.py +++ b/erpnext/templates/pages/projects.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/templates/pages/regional/india/update_gstin.py b/erpnext/templates/pages/regional/india/update_gstin.py index a8d03d58631..b65f0a6e739 100644 --- a/erpnext/templates/pages/regional/india/update_gstin.py +++ b/erpnext/templates/pages/regional/india/update_gstin.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from six import iteritems diff --git a/erpnext/templates/pages/rfq.py b/erpnext/templates/pages/rfq.py index b9f646b8a5d..0afd46cac90 100644 --- a/erpnext/templates/pages/rfq.py +++ b/erpnext/templates/pages/rfq.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/templates/pages/search_help.py b/erpnext/templates/pages/search_help.py index 4272b94ffb7..c8854d74901 100644 --- a/erpnext/templates/pages/search_help.py +++ b/erpnext/templates/pages/search_help.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe import requests diff --git a/erpnext/templates/pages/task_info.py b/erpnext/templates/pages/task_info.py index f219c3deb7b..1d809c4bd72 100644 --- a/erpnext/templates/pages/task_info.py +++ b/erpnext/templates/pages/task_info.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/templates/pages/timelog_info.py b/erpnext/templates/pages/timelog_info.py index e0fb60da23d..3bc74013a9e 100644 --- a/erpnext/templates/pages/timelog_info.py +++ b/erpnext/templates/pages/timelog_info.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/templates/utils.py b/erpnext/templates/utils.py index 743657de322..9f46e6a99ed 100644 --- a/erpnext/templates/utils.py +++ b/erpnext/templates/utils.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe diff --git a/erpnext/tests/test_init.py b/erpnext/tests/test_init.py index dfba0340ceb..020133a9cca 100644 --- a/erpnext/tests/test_init.py +++ b/erpnext/tests/test_init.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import unittest diff --git a/erpnext/tests/test_notifications.py b/erpnext/tests/test_notifications.py index 5fd9582dea0..669bf6f3d92 100644 --- a/erpnext/tests/test_notifications.py +++ b/erpnext/tests/test_notifications.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/tests/test_regional.py b/erpnext/tests/test_regional.py index fe848a35558..b232d69dbb3 100644 --- a/erpnext/tests/test_regional.py +++ b/erpnext/tests/test_regional.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import unittest diff --git a/erpnext/tests/test_search.py b/erpnext/tests/test_search.py index a6619b278e1..3594cfee335 100644 --- a/erpnext/tests/test_search.py +++ b/erpnext/tests/test_search.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import unittest diff --git a/erpnext/tests/test_subcontracting.py b/erpnext/tests/test_subcontracting.py index e45f098f65b..170daa96733 100644 --- a/erpnext/tests/test_subcontracting.py +++ b/erpnext/tests/test_subcontracting.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import copy import unittest diff --git a/erpnext/tests/test_woocommerce.py b/erpnext/tests/test_woocommerce.py index 3ce68d89bcd..59a9a313dbe 100644 --- a/erpnext/tests/test_woocommerce.py +++ b/erpnext/tests/test_woocommerce.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import os import time diff --git a/erpnext/utilities/__init__.py b/erpnext/utilities/__init__.py index ca8bc194d4c..3749cdeaa88 100644 --- a/erpnext/utilities/__init__.py +++ b/erpnext/utilities/__init__.py @@ -1,5 +1,4 @@ ## temp utility -from __future__ import print_function, unicode_literals import frappe from frappe.utils import cstr diff --git a/erpnext/utilities/activation.py b/erpnext/utilities/activation.py index c21bff0b252..8ccda411179 100644 --- a/erpnext/utilities/activation.py +++ b/erpnext/utilities/activation.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/utilities/bot.py b/erpnext/utilities/bot.py index 9e830a20bf8..87a350864f6 100644 --- a/erpnext/utilities/bot.py +++ b/erpnext/utilities/bot.py @@ -1,7 +1,6 @@ # Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/utilities/doctype/__init__.py b/erpnext/utilities/doctype/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/utilities/doctype/__init__.py +++ b/erpnext/utilities/doctype/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/utilities/doctype/rename_tool/rename_tool.py b/erpnext/utilities/doctype/rename_tool/rename_tool.py index 8377cecbac3..74de54ac310 100644 --- a/erpnext/utilities/doctype/rename_tool/rename_tool.py +++ b/erpnext/utilities/doctype/rename_tool/rename_tool.py @@ -3,7 +3,6 @@ # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe.model.document import Document diff --git a/erpnext/utilities/doctype/sms_log/__init__.py b/erpnext/utilities/doctype/sms_log/__init__.py index baffc488252..e69de29bb2d 100644 --- a/erpnext/utilities/doctype/sms_log/__init__.py +++ b/erpnext/utilities/doctype/sms_log/__init__.py @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/erpnext/utilities/doctype/sms_log/sms_log.py b/erpnext/utilities/doctype/sms_log/sms_log.py index ce3cc46665b..85140f366ff 100644 --- a/erpnext/utilities/doctype/sms_log/sms_log.py +++ b/erpnext/utilities/doctype/sms_log/sms_log.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals from frappe.model.document import Document diff --git a/erpnext/utilities/doctype/sms_log/test_sms_log.py b/erpnext/utilities/doctype/sms_log/test_sms_log.py index 3baeb255790..5f7abdc1a86 100644 --- a/erpnext/utilities/doctype/sms_log/test_sms_log.py +++ b/erpnext/utilities/doctype/sms_log/test_sms_log.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals import unittest diff --git a/erpnext/utilities/doctype/video/test_video.py b/erpnext/utilities/doctype/video/test_video.py index 530136c6f39..dc500530e7f 100644 --- a/erpnext/utilities/doctype/video/test_video.py +++ b/erpnext/utilities/doctype/video/test_video.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/utilities/doctype/video/video.py b/erpnext/utilities/doctype/video/video.py index d9907cf02e2..4e605134c4b 100644 --- a/erpnext/utilities/doctype/video/video.py +++ b/erpnext/utilities/doctype/video/video.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import re from datetime import datetime diff --git a/erpnext/utilities/doctype/video_settings/test_video_settings.py b/erpnext/utilities/doctype/video_settings/test_video_settings.py index e871435a930..25cac6c5432 100644 --- a/erpnext/utilities/doctype/video_settings/test_video_settings.py +++ b/erpnext/utilities/doctype/video_settings/test_video_settings.py @@ -1,7 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt -from __future__ import unicode_literals # import frappe import unittest diff --git a/erpnext/utilities/doctype/video_settings/video_settings.py b/erpnext/utilities/doctype/video_settings/video_settings.py index 72091343b4c..6f1e2bba167 100644 --- a/erpnext/utilities/doctype/video_settings/video_settings.py +++ b/erpnext/utilities/doctype/video_settings/video_settings.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from apiclient.discovery import build diff --git a/erpnext/utilities/hierarchy_chart.py b/erpnext/utilities/hierarchy_chart.py index 0e7f81fb8ee..c18ce107add 100644 --- a/erpnext/utilities/hierarchy_chart.py +++ b/erpnext/utilities/hierarchy_chart.py @@ -1,7 +1,6 @@ # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/utilities/product.py b/erpnext/utilities/product.py index e567f771e95..e9e4baaaa2e 100644 --- a/erpnext/utilities/product.py +++ b/erpnext/utilities/product.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe from frappe.utils import cint, flt, fmt_money, getdate, nowdate diff --git a/erpnext/utilities/report/youtube_interactions/youtube_interactions.py b/erpnext/utilities/report/youtube_interactions/youtube_interactions.py index 50f3b685649..a185a7012c6 100644 --- a/erpnext/utilities/report/youtube_interactions/youtube_interactions.py +++ b/erpnext/utilities/report/youtube_interactions/youtube_interactions.py @@ -1,7 +1,6 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py index 51536834367..a1c954b0604 100644 --- a/erpnext/utilities/transaction_base.py +++ b/erpnext/utilities/transaction_base.py @@ -1,7 +1,6 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt -from __future__ import unicode_literals import frappe import frappe.share diff --git a/erpnext/utilities/web_form/addresses/addresses.py b/erpnext/utilities/web_form/addresses/addresses.py index 4a8d3e15949..8024f875797 100644 --- a/erpnext/utilities/web_form/addresses/addresses.py +++ b/erpnext/utilities/web_form/addresses/addresses.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals def get_context(context): diff --git a/erpnext/www/lms/content.py b/erpnext/www/lms/content.py index 97f59180d96..b4d9793266b 100644 --- a/erpnext/www/lms/content.py +++ b/erpnext/www/lms/content.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/www/lms/course.py b/erpnext/www/lms/course.py index 1ec097b9070..6f1f0f208e9 100644 --- a/erpnext/www/lms/course.py +++ b/erpnext/www/lms/course.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/www/lms/index.py b/erpnext/www/lms/index.py index c35fff2e2b8..97d474befd1 100644 --- a/erpnext/www/lms/index.py +++ b/erpnext/www/lms/index.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/www/lms/profile.py b/erpnext/www/lms/profile.py index d5dcd2bf392..5e51ddc6c16 100644 --- a/erpnext/www/lms/profile.py +++ b/erpnext/www/lms/profile.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/www/lms/program.py b/erpnext/www/lms/program.py index 9980d883a9b..a7c713caed0 100644 --- a/erpnext/www/lms/program.py +++ b/erpnext/www/lms/program.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/www/lms/topic.py b/erpnext/www/lms/topic.py index ebedaf5edaf..684437cbf22 100644 --- a/erpnext/www/lms/topic.py +++ b/erpnext/www/lms/topic.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/www/payment_setup_certification.py b/erpnext/www/payment_setup_certification.py index e5090838847..c87f4687c8c 100644 --- a/erpnext/www/payment_setup_certification.py +++ b/erpnext/www/payment_setup_certification.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/erpnext/www/support/index.py b/erpnext/www/support/index.py index 4857b0d829d..1d198ed3ed1 100644 --- a/erpnext/www/support/index.py +++ b/erpnext/www/support/index.py @@ -1,4 +1,3 @@ -from __future__ import unicode_literals import frappe diff --git a/setup.py b/setup.py index a864e73831c..81407004226 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals from setuptools import setup, find_packages import re, ast From 897e90ac55e61bfab6291fd3ba87f3e2bec02c9d Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Thu, 4 Nov 2021 18:49:06 +0530 Subject: [PATCH 154/200] chore: remove past module dependencies --- erpnext/accounts/doctype/tax_rule/tax_rule.py | 5 ++++- erpnext/accounts/report/financial_statements.py | 5 ++--- erpnext/setup/doctype/company/company.py | 4 +--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/erpnext/accounts/doctype/tax_rule/tax_rule.py b/erpnext/accounts/doctype/tax_rule/tax_rule.py index e1d630d0d75..b0d6983e6e5 100644 --- a/erpnext/accounts/doctype/tax_rule/tax_rule.py +++ b/erpnext/accounts/doctype/tax_rule/tax_rule.py @@ -10,7 +10,6 @@ from frappe.contacts.doctype.address.address import get_default_address from frappe.model.document import Document from frappe.utils import cint, cstr from frappe.utils.nestedset import get_root_of -from past.builtins import cmp from six import iteritems from erpnext.setup.doctype.customer_group.customer_group import get_parent_customer_groups @@ -170,6 +169,10 @@ def get_tax_template(posting_date, args): for key in args: if rule.get(key): rule.no_of_keys_matched += 1 + def cmp(a, b): + # refernce: https://docs.python.org/3.0/whatsnew/3.0.html#ordering-comparisons + return int(a > b) - int(a < b) + rule = sorted(tax_rule, key = functools.cmp_to_key(lambda b, a: cmp(a.no_of_keys_matched, b.no_of_keys_matched) or diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 27294335b18..37ff103e72f 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -10,7 +10,6 @@ import re import frappe from frappe import _ from frappe.utils import add_days, add_months, cint, cstr, flt, formatdate, get_first_day, getdate -from past.builtins import cmp from six import itervalues from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( @@ -343,7 +342,7 @@ def sort_accounts(accounts, is_root=False, key="name"): def compare_accounts(a, b): if re.split(r'\W+', a[key])[0].isdigit(): # if chart of accounts is numbered, then sort by number - return cmp(a[key], b[key]) + return int(a[key] > b[key]) - int(a[key] < b[key]) elif is_root: if a.report_type != b.report_type and a.report_type == "Balance Sheet": return -1 @@ -355,7 +354,7 @@ def sort_accounts(accounts, is_root=False, key="name"): return -1 else: # sort by key (number) or name - return cmp(a[key], b[key]) + return int(a[key] > b[key]) - int(a[key] < b[key]) return 1 accounts.sort(key = functools.cmp_to_key(compare_accounts)) diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py index d40ed912f6e..5ebfa049426 100644 --- a/erpnext/setup/doctype/company/company.py +++ b/erpnext/setup/doctype/company/company.py @@ -2,7 +2,6 @@ # License: GNU General Public License v3. See license.txt -import functools import json import os @@ -13,7 +12,6 @@ from frappe.cache_manager import clear_defaults_cache from frappe.contacts.address_and_contact import load_address_and_contact from frappe.utils import cint, formatdate, get_timestamp, today from frappe.utils.nestedset import NestedSet -from past.builtins import cmp from erpnext.accounts.doctype.account.account import get_account_currency from erpnext.setup.setup_wizard.operations.taxes_setup import setup_taxes_and_charges @@ -583,7 +581,7 @@ def get_default_company_address(name, sort_key='is_primary_address', existing_ad return existing_address if out: - return sorted(out, key = functools.cmp_to_key(lambda x,y: cmp(y[1], x[1])))[0][0] + return min(out, key=lambda x: x[1])[0] # find min by sort_key else: return None From 56a25a0c4fdaafffcecf76994032ecb036bad6b2 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Thu, 4 Nov 2021 18:49:49 +0530 Subject: [PATCH 155/200] chore: drop future from requirements.txt --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index f28906ae352..faefb77a9c2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -future==0.18.2 # frappe # https://github.com/frappe/frappe is installed during bench-init gocardless-pro~=1.22.0 googlemaps # used in ERPNext, but dependency is defined in Frappe From 8fe5feb6a4372bf5f2dfaf65fca41bbcc25c8ce7 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Thu, 4 Nov 2021 19:48:32 +0530 Subject: [PATCH 156/200] chore: remove all six compat code --- erpnext/__init__.py | 1 - erpnext/accounts/deferred_revenue.py | 1 - .../chart_of_accounts/chart_of_accounts.py | 7 +++---- .../chart_of_accounts/import_from_openerp.py | 3 +-- .../test_accounts_settings.py | 1 - .../accounts/doctype/bank/bank_dashboard.py | 1 - .../bank_account/bank_account_dashboard.py | 1 - .../bank_statement_import.py | 5 ++--- .../bank_transaction_upload.py | 3 +-- .../default_cash_flow_mapper.py | 1 - .../cost_center/cost_center_dashboard.py | 1 - erpnext/accounts/doctype/dunning/dunning.py | 3 +-- .../doctype/dunning/dunning_dashboard.py | 1 - .../exchange_rate_revaluation_dashboard.py | 2 -- .../finance_book/finance_book_dashboard.py | 1 - .../fiscal_year/fiscal_year_dashboard.py | 1 - erpnext/accounts/doctype/gl_entry/gl_entry.py | 3 +-- .../invoice_discounting_dashboard.py | 1 - .../item_tax_template_dashboard.py | 1 - .../doctype/journal_entry/journal_entry.py | 9 ++++---- .../loyalty_program_dashboard.py | 2 -- .../monthly_distribution_dashboard.py | 1 - .../doctype/payment_entry/payment_entry.py | 9 ++++---- .../payment_gateway_account_dashboard.py | 2 -- .../payment_order/payment_order_dashboard.py | 2 -- .../payment_term/payment_term_dashboard.py | 1 - .../payment_terms_template_dashboard.py | 1 - .../doctype/pos_invoice/pos_invoice.py | 6 ++---- .../pos_invoice_merge_log.py | 3 +-- .../doctype/pos_profile/pos_profile.py | 3 +-- .../doctype/pricing_rule/pricing_rule.py | 9 ++++---- .../purchase_invoice/purchase_invoice.py | 3 +-- .../purchase_invoice_dashboard.py | 1 - ...se_taxes_and_charges_template_dashboard.py | 1 - .../doctype/sales_invoice/sales_invoice.py | 5 ++--- .../sales_invoice/sales_invoice_dashboard.py | 1 - .../sales_invoice/test_sales_invoice.py | 5 ++--- ...es_taxes_and_charges_template_dashboard.py | 1 - .../share_type/share_type_dashboard.py | 1 - .../shareholder/shareholder_dashboard.py | 2 -- .../shipping_rule/shipping_rule_dashboard.py | 1 - .../doctype/subscription/subscription.py | 1 - .../subscription_plan_dashboard.py | 1 - .../tax_category/tax_category_dashboard.py | 1 - erpnext/accounts/doctype/tax_rule/tax_rule.py | 3 +-- .../doctype/tax_rule/test_tax_rule.py | 3 +-- .../tax_withholding_category.py | 2 +- .../tax_withholding_category_dashboard.py | 2 -- .../notification_for_new_fiscal_year.py | 2 -- erpnext/accounts/party.py | 3 +-- .../account_balance/test_account_balance.py | 1 - .../test_accounts_receivable.py | 1 - .../accounts_receivable_summary.py | 3 +-- .../budget_variance_report.py | 3 +-- .../accounts/report/cash_flow/cash_flow.py | 3 +-- .../customer_ledger_summary.py | 11 +++++----- .../dimension_wise_accounts_balance_report.py | 3 +-- .../accounts/report/financial_statements.py | 4 +--- .../report/general_ledger/general_ledger.py | 3 +-- .../report/tax_detail/test_tax_detail.py | 1 - .../tds_computation_summary.py | 1 - erpnext/accounts/report/utils.py | 1 - erpnext/accounts/test/test_utils.py | 1 - erpnext/accounts/utils.py | 3 +-- .../doctype/crop/crop_dashboard.py | 1 - erpnext/assets/doctype/asset/asset.py | 7 ++----- .../assets/doctype/asset/asset_dashboard.py | 2 -- .../purchase_order_dashboard.py | 1 - .../request_for_quotation.py | 3 +-- .../request_for_quotation_dashboard.py | 2 -- .../doctype/supplier/supplier_dashboard.py | 1 - .../supplier_quotation_dashboard.py | 1 - .../supplier_scorecard_dashboard.py | 1 - erpnext/config/education.py | 1 - erpnext/config/projects.py | 1 - erpnext/controllers/accounts_controller.py | 5 ++--- erpnext/controllers/item_variant.py | 11 +++++----- erpnext/controllers/taxes_and_totals.py | 2 +- .../controllers/tests/test_item_variant.py | 4 +--- erpnext/controllers/tests/test_mapper.py | 1 - .../controllers/tests/test_qty_based_taxes.py | 1 - .../contract_template/contract_template.py | 3 +-- erpnext/crm/doctype/lead/lead_dashboard.py | 2 -- .../opportunity/opportunity_dashboard.py | 2 -- erpnext/crm/doctype/utils.py | 1 - .../opportunity_summary_by_sales_stage.py | 5 ++--- .../sales_pipeline_analytics.py | 5 ++--- erpnext/demo/demo.py | 1 - erpnext/demo/domains.py | 1 - erpnext/demo/setup/manufacture.py | 4 +--- erpnext/demo/setup/retail.py | 4 +--- erpnext/demo/setup/setup_data.py | 1 - erpnext/demo/user/accounts.py | 1 - erpnext/demo/user/education.py | 1 - erpnext/demo/user/fixed_asset.py | 1 - erpnext/demo/user/hr.py | 1 - erpnext/domains/agriculture.py | 1 - erpnext/domains/distribution.py | 1 - erpnext/domains/education.py | 1 - erpnext/domains/hospitality.py | 1 - erpnext/domains/manufacturing.py | 1 - erpnext/domains/non_profit.py | 1 - erpnext/domains/retail.py | 1 - erpnext/domains/services.py | 1 - erpnext/education/__init__.py | 1 - .../academic_term/academic_term_dashboard.py | 1 - .../academic_year/academic_year_dashboard.py | 1 - .../course_schedule/course_schedule.py | 2 +- .../grading_scale/grading_scale_dashboard.py | 1 - .../program_enrollment_dashboard.py | 1 - .../doctype/student/student_dashboard.py | 1 - .../student_applicant/student_applicant.py | 1 - .../student_attendance_dashboard.py | 1 - .../student_category_dashboard.py | 1 - .../student_leave_application_dashboard.py | 2 -- .../student_applicant/student_applicant.py | 2 -- .../connectors/woocommerce_connection.py | 2 -- .../issue_to_task/__init__.py | 1 - .../milestone_to_project/__init__.py | 2 -- .../amazon_mws_settings/amazon_methods.py | 2 +- erpnext/erpnext_integrations/utils.py | 1 - erpnext/exceptions.py | 1 - erpnext/hooks.py | 1 - .../appraisal_template_dashboard.py | 2 -- .../attendance/attendance_dashboard.py | 2 -- .../attendance_request_dashboard.py | 2 -- .../daily_work_summary/daily_work_summary.py | 3 +-- .../daily_work_summary_group.py | 1 - .../hr/doctype/employee/employee_dashboard.py | 1 - .../employee_advance_dashboard.py | 2 -- .../employee_grade_dashboard.py | 2 -- .../employee_onboarding_template_dashboard.py | 2 -- .../employee_referral/employee_referral.py | 3 +-- .../employee_referral_dashboard.py | 2 -- .../employee_separation_template_dashboard.py | 2 -- .../expense_claim/expense_claim_dashboard.py | 1 - .../holiday_list/holiday_list_dashboard.py | 2 -- erpnext/hr/doctype/interview/interview.py | 5 ++--- .../hr/doctype/job_applicant/job_applicant.py | 3 +-- .../job_applicant/job_applicant_dashboard.py | 2 -- .../job_opening/job_opening_dashboard.py | 2 -- .../leave_allocation_dashboard.py | 2 -- .../leave_allocation/test_leave_allocation.py | 1 - .../leave_application_dashboard.py | 1 - .../leave_block_list_dashboard.py | 2 -- .../leave_period/leave_period_dashboard.py | 1 - .../leave_policy/leave_policy_dashboard.py | 1 - .../leave_policy_assignment.py | 5 ++--- .../leave_policy_assignment_dashboard.py | 1 - .../leave_type/leave_type_dashboard.py | 2 -- .../shift_request/shift_request_dashboard.py | 2 -- .../shift_type/shift_type_dashboard.py | 2 -- .../staffing_plan/staffing_plan_dashboard.py | 2 -- .../training_event_dashboard.py | 2 -- .../training_program_dashboard.py | 1 - .../hr/doctype/vehicle/vehicle_dashboard.py | 1 - .../training_feedback/training_feedback.py | 2 -- .../training_scheduled/training_scheduled.py | 2 -- .../organizational_chart.py | 1 - erpnext/hr/page/team_updates/team_updates.py | 1 - .../job_application/job_application.py | 2 -- .../top_10_pledged_loan_securities.py | 5 ++--- erpnext/loan_management/doctype/loan/loan.py | 3 +-- .../doctype/loan/loan_dashboard.py | 2 -- .../loan_application/loan_application.py | 3 +-- .../loan_application_dashboard.py | 2 -- .../doctype/loan_repayment/loan_repayment.py | 3 +-- .../loan_security/loan_security_dashboard.py | 2 -- .../loan_security_type_dashboard.py | 2 -- .../loan_security_unpledge.py | 5 ++--- .../doctype/loan_type/loan_type_dashboard.py | 2 -- ...process_loan_interest_accrual_dashboard.py | 2 -- ...ocess_loan_security_shortfall_dashboard.py | 2 -- .../applicant_wise_loan_security_exposure.py | 3 +-- .../loan_security_exposure.py | 5 ++--- .../blanket_order/blanket_order_dashboard.py | 2 -- .../doctype/bom/bom_dashboard.py | 1 - .../bom_update_tool/bom_update_tool.py | 3 +-- .../doctype/job_card/job_card_dashboard.py | 1 - .../doctype/operation/operation_dashboard.py | 1 - .../production_plan/production_plan.py | 5 ++--- .../production_plan_dashboard.py | 1 - .../doctype/routing/routing_dashboard.py | 2 -- .../work_order/work_order_dashboard.py | 1 - .../workstation/workstation_dashboard.py | 1 - .../material_request_receipt_notification.py | 2 -- .../non_profit/doctype/donation/donation.py | 3 +-- .../doctype/donation/donation_dashboard.py | 1 - .../doctype/member/member_dashboard.py | 1 - .../doctype/membership/membership.py | 3 +-- .../certification_application.py | 2 -- .../certification_application_usd.py | 2 -- .../grant_application/grant_application.py | 2 -- .../v10_0/rename_offer_letter_to_job_offer.py | 1 - .../rename_price_to_rate_in_pricing_rule.py | 1 - .../v10_0/set_currency_in_pricing_rule.py | 1 - .../v10_0/update_translatable_fields.py | 3 --- .../transfer_subscription_to_auto_repeat.py | 1 - ..._default_dispatch_notification_template.py | 1 - .../add_default_email_template_for_leave.py | 1 - .../add_expense_claim_default_account.py | 1 - erpnext/patches/v11_0/add_market_segments.py | 1 - erpnext/patches/v11_0/add_sales_stages.py | 1 - ...eck_buying_selling_in_currency_exchange.py | 1 - .../v11_0/create_default_success_action.py | 1 - ...ate_department_records_for_each_company.py | 1 - .../v11_0/drop_column_max_days_allowed.py | 1 - .../v11_0/ewaybill_fields_gst_india.py | 1 - erpnext/patches/v11_0/hr_ux_cleanups.py | 1 - .../v11_0/inter_state_field_for_gst.py | 1 - .../move_leave_approvers_from_employee.py | 1 - .../patches/v11_0/rebuild_tree_for_company.py | 1 - ...onal_salary_component_additional_salary.py | 1 - .../v11_0/rename_field_max_days_allowed.py | 1 - .../rename_members_with_naming_series.py | 1 - .../rename_supplier_type_to_supplier_group.py | 1 - .../v11_0/set_default_email_template_in_hr.py | 1 - .../v11_0/set_department_for_doctypes.py | 1 - .../patches/v11_0/set_missing_gst_hsn_code.py | 1 - .../v11_0/set_salary_component_properties.py | 1 - ...pdate_field_and_value_in_workflow_state.py | 1 - .../set_user_permissions_for_department.py | 1 - ...ip_user_permission_check_for_department.py | 1 - erpnext/patches/v11_0/uom_conversion_data.py | 1 - .../v11_0/update_department_lft_rgt.py | 1 - .../v11_0/update_sales_partner_type.py | 1 - .../patches/v11_0/update_total_qty_field.py | 1 - .../v11_1/set_missing_opportunity_from.py | 1 - .../v11_1/set_salary_details_submittable.py | 1 - ...s_for_material_request_type_manufacture.py | 1 - erpnext/patches/v11_1/setup_guardian_role.py | 1 - .../v11_1/woocommerce_set_creation_user.py | 1 - ...ocument_type_field_for_italy_einvoicing.py | 1 - .../add_export_type_field_in_party_master.py | 1 - .../add_gst_category_in_delivery_note.py | 1 - .../v12_0/add_taxjar_integration_field.py | 1 - ...counting_dimensions_in_missing_doctypes.py | 1 - .../create_irs_1099_field_united_states.py | 1 - .../create_itc_reversal_custom_fields.py | 1 - .../v12_0/create_taxable_value_field.py | 1 - .../move_bank_account_swift_number_to_bank.py | 1 - .../move_item_tax_to_item_tax_template.py | 5 ++--- .../v12_0/recalculate_requested_qty_in_bin.py | 1 - .../remove_bank_remittance_custom_fields.py | 1 - .../v12_0/rename_account_type_doctype.py | 1 - .../v12_0/rename_lost_reason_detail.py | 1 - ...eferred_accounting_in_accounts_settings.py | 1 - .../set_cwip_and_delete_asset_settings.py | 1 - .../v12_0/set_default_payroll_based_on.py | 1 - ...se_account_in_landed_cost_voucher_taxes.py | 4 +--- .../set_production_capacity_in_workstation.py | 1 - ...t_purchase_receipt_delivery_note_detail.py | 1 - erpnext/patches/v12_0/set_quotation_status.py | 1 - ...ty_in_material_request_as_per_stock_uom.py | 1 - erpnext/patches/v12_0/set_serial_no_status.py | 1 - ...t_valid_till_date_in_supplier_quotation.py | 1 - ...er_supplier_based_on_type_of_item_price.py | 1 - erpnext/patches/v12_0/update_bom_in_so_mr.py | 1 - .../patches/v12_0/update_due_date_in_gle.py | 1 - ...e_end_date_and_status_in_email_campaign.py | 1 - .../v12_0/update_ewaybill_field_position.py | 1 - erpnext/patches/v12_0/update_gst_category.py | 1 - .../update_healthcare_refactored_changes.py | 1 - .../v12_0/update_is_cancelled_field.py | 1 - .../v12_0/update_item_tax_template_company.py | 1 - ...r_fields_in_acc_dimension_custom_fields.py | 1 - .../update_price_list_currency_in_bom.py | 1 - .../v12_0/update_price_or_product_discount.py | 1 - .../v12_0/update_uom_conversion_factor.py | 1 - ...efault_interview_notification_templates.py | 1 - .../add_naming_series_to_old_projects.py | 1 - .../patches/v13_0/add_po_to_global_search.py | 1 - .../v13_0/add_standard_navbar_items.py | 1 - ...r_rejected_quantity_in_purchase_invoice.py | 1 - .../v13_0/change_default_pos_print_format.py | 1 - .../convert_qi_parameter_to_link_field.py | 1 - .../custom_fields_for_taxjar_integration.py | 1 - .../v13_0/drop_razorpay_payload_column.py | 1 - .../v13_0/gst_fields_for_pos_invoice.py | 1 - .../healthcare_lab_module_rename_doctypes.py | 1 - .../v13_0/make_non_standard_user_type.py | 3 +-- .../modify_invalid_gain_loss_gl_entries.py | 1 - ...itional_salary_encashment_and_incentive.py | 1 - .../rename_discharge_date_in_ip_record.py | 1 - ...bership_settings_to_non_profit_settings.py | 1 - ...eplace_pos_page_with_point_of_sale_page.py | 1 - ...et_company_field_in_healthcare_doctypes.py | 1 - ...ment_channel_in_payment_gateway_account.py | 1 - .../v13_0/set_pos_closing_as_failed.py | 1 - .../v13_0/set_training_event_attendance.py | 1 - erpnext/patches/v13_0/set_youtube_video_id.py | 1 - ..._custom_roles_for_some_regional_reports.py | 1 - .../update_actual_start_and_end_date_in_wo.py | 1 - erpnext/patches/v13_0/update_old_loans.py | 1 - erpnext/patches/v13_0/update_subscription.py | 3 +-- .../patches/v13_0/update_timesheet_changes.py | 1 - .../update_opportunity_currency_fields.py | 1 - ...e_item_description_based_on_item_master.py | 1 - erpnext/patches/v8_1/setup_gst_india.py | 1 - .../patches/v8_7/sync_india_custom_fields.py | 1 - .../doctype/gratuity/gratuity_dashboard.py | 1 - .../gratuity_rule/gratuity_rule_dashboard.py | 1 - .../payroll_entry/payroll_entry_dashboard.py | 2 -- .../payroll_period_dashboard.py | 2 -- .../doctype/salary_slip/salary_slip.py | 3 +-- .../salary_structure_dashboard.py | 2 -- .../retention_bonus/retention_bonus.py | 2 -- .../test_product_configurator.py | 1 - erpnext/portal/utils.py | 1 - .../doctype/project/project_dashboard.py | 1 - .../project_template_dashboard.py | 2 -- .../projects/doctype/task/task_dashboard.py | 1 - .../doctype/timesheet/timesheet_dashboard.py | 1 - .../test_delayed_tasks_summary.py | 1 - ...ee_hours_utilization_based_on_timesheet.py | 5 ++--- .../test_employee_util.py | 1 - .../test_project_profitability.py | 1 - erpnext/projects/web_form/tasks/tasks.py | 1 - .../test_regional_address_template.py | 1 - .../doctype/gstr_3b_report/gstr_3b_report.py | 5 ++--- .../germany/utils/datev/datev_constants.py | 1 - .../regional/germany/utils/datev/datev_csv.py | 4 +--- erpnext/regional/india/__init__.py | 4 +--- erpnext/regional/india/test_utils.py | 1 - erpnext/regional/india/utils.py | 6 ++---- erpnext/regional/italy/__init__.py | 2 -- erpnext/regional/italy/utils.py | 4 +--- erpnext/regional/report/datev/datev.py | 4 +--- erpnext/regional/report/datev/test_datev.py | 2 -- erpnext/regional/report/gstr_1/gstr_1.py | 13 ++++++------ .../hsn_wise_summary_of_outward_supplies.py | 3 +-- .../report/uae_vat_201/test_uae_vat_201.py | 2 -- erpnext/regional/turkey/setup.py | 1 - .../regional/united_arab_emirates/utils.py | 4 +--- .../restaurant/restaurant_dashboard.py | 1 - .../doctype/customer/customer_dashboard.py | 1 - .../selling/doctype/customer/test_customer.py | 3 +-- .../product_bundle/test_product_bundle.py | 1 - .../doctype/quotation/quotation_dashboard.py | 1 - .../doctype/sales_order/sales_order.py | 7 +++---- .../sales_order/sales_order_dashboard.py | 1 - .../address_and_contacts.py | 4 +--- .../report/sales_analytics/sales_analytics.py | 3 +-- erpnext/setup/default_energy_point_rules.py | 1 - erpnext/setup/default_success_action.py | 1 - .../doctype/company/company_dashboard.py | 1 - erpnext/setup/doctype/email_digest/quotes.py | 1 - .../sales_person/sales_person_dashboard.py | 1 - .../terms_and_conditions.py | 3 +-- erpnext/setup/install.py | 7 +++---- .../setup_wizard/data/dashboard_charts.py | 1 - .../setup/setup_wizard/data/industry_type.py | 1 - erpnext/setup/setup_wizard/utils.py | 1 - erpnext/startup/__init__.py | 1 - erpnext/startup/filters.py | 3 --- erpnext/startup/leaderboard.py | 2 -- erpnext/stock/__init__.py | 1 - erpnext/stock/dashboard/item_dashboard.py | 1 - .../dashboard/warehouse_capacity_dashboard.py | 1 - erpnext/stock/doctype/batch/batch.py | 3 +-- .../stock/doctype/batch/batch_dashboard.py | 1 - .../delivery_note/delivery_note_dashboard.py | 1 - erpnext/stock/doctype/item/item_dashboard.py | 1 - .../material_request/material_request.py | 3 +-- .../material_request_dashboard.py | 1 - erpnext/stock/doctype/pick_list/pick_list.py | 3 +-- .../doctype/pick_list/pick_list_dashboard.py | 2 -- .../purchase_receipt/purchase_receipt.py | 3 +-- .../purchase_receipt_dashboard.py | 1 - .../purchase_receipt/test_purchase_receipt.py | 3 +-- .../doctype/putaway_rule/putaway_rule.py | 3 +-- erpnext/stock/doctype/serial_no/serial_no.py | 4 +--- .../stock/doctype/stock_entry/stock_entry.py | 21 +++++++++---------- .../doctype/stock_entry/stock_entry_utils.py | 3 +-- .../doctype/stock_entry/test_stock_entry.py | 3 +-- .../stock_ledger_entry/stock_ledger_entry.py | 1 - erpnext/stock/get_item_details.py | 13 ++++++------ erpnext/stock/report/bom_search/bom_search.py | 5 ++--- ...incorrect_balance_qty_after_transaction.py | 3 +-- .../incorrect_serial_no_valuation.py | 3 +-- .../incorrect_stock_value_report.py | 3 +-- .../product_bundle_balance.py | 5 ++--- .../stock/report/stock_ageing/stock_ageing.py | 3 +-- .../report/stock_balance/stock_balance.py | 5 ++--- .../supplier_wise_sales_analytics.py | 5 ++--- ...rehouse_wise_item_balance_age_and_value.py | 3 +-- erpnext/stock/stock_ledger.py | 17 +++++++-------- erpnext/stock/utils.py | 3 +-- erpnext/support/__init__.py | 1 - .../support/doctype/issue/issue_dashboard.py | 1 - .../report/issue_analytics/issue_analytics.py | 3 +-- .../issue_analytics/test_issue_analytics.py | 1 - .../report/issue_summary/issue_summary.py | 3 +-- .../support_hour_distribution.py | 3 +-- erpnext/support/web_form/issues/issues.py | 2 -- .../templates/includes/salary_slip_log.html | 2 +- erpnext/templates/pages/help.py | 1 - .../pages/non_profit/join_chapter.py | 1 - .../pages/non_profit/leave_chapter.py | 1 - .../pages/regional/india/update_gstin.py | 4 +--- erpnext/templates/pages/search_help.py | 4 +--- erpnext/templates/pages/task_info.py | 1 - erpnext/templates/pages/timelog_info.py | 1 - erpnext/tests/test_init.py | 2 -- erpnext/tests/test_regional.py | 1 - erpnext/tests/test_search.py | 1 - erpnext/tests/test_subcontracting.py | 1 - erpnext/tests/test_woocommerce.py | 1 - erpnext/utilities/activation.py | 3 +-- erpnext/utilities/doctype/video/video.py | 3 +-- erpnext/utilities/transaction_base.py | 3 +-- .../utilities/web_form/addresses/addresses.py | 2 -- erpnext/www/lms/content.py | 1 - erpnext/www/lms/course.py | 1 - erpnext/www/lms/index.py | 1 - erpnext/www/lms/profile.py | 1 - erpnext/www/lms/program.py | 1 - erpnext/www/lms/topic.py | 1 - erpnext/www/payment_setup_certification.py | 1 - erpnext/www/support/index.py | 1 - 420 files changed, 179 insertions(+), 678 deletions(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index a4318290802..9d99ebb7bb6 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -1,4 +1,3 @@ - import inspect import frappe diff --git a/erpnext/accounts/deferred_revenue.py b/erpnext/accounts/deferred_revenue.py index 3afa0ce7dfe..5df8269f754 100644 --- a/erpnext/accounts/deferred_revenue.py +++ b/erpnext/accounts/deferred_revenue.py @@ -1,4 +1,3 @@ - import frappe from frappe import _ from frappe.email import sendmail_to_system_managers diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py index 3a5514388ca..a8de06cc6c3 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py @@ -7,7 +7,6 @@ import os import frappe from frappe.utils import cstr from frappe.utils.nestedset import rebuild_tree -from six import iteritems from unidecode import unidecode @@ -17,7 +16,7 @@ def create_charts(company, chart_template=None, existing_company=None, custom_ch accounts = [] def _import_accounts(children, parent, root_type, root_account=False): - for account_name, child in iteritems(children): + for account_name, child in children.items(): if root_account: root_type = child.get("root_type") @@ -200,7 +199,7 @@ def validate_bank_account(coa, bank_account): if chart: def _get_account_names(account_master): - for account_name, child in iteritems(account_master): + for account_name, child in account_master.items(): if account_name not in ["account_number", "account_type", "root_type", "is_group", "tax_rate"]: accounts.append(account_name) @@ -223,7 +222,7 @@ def build_tree_from_json(chart_template, chart_data=None, from_coa_importer=Fals accounts = [] def _import_accounts(children, parent): ''' recursively called to form a parent-child based list of dict from chart template ''' - for account_name, child in iteritems(children): + for account_name, child in children.items(): account = {} if account_name in ["account_name", "account_number", "account_type",\ "root_type", "is_group", "tax_rate"]: continue diff --git a/erpnext/accounts/doctype/account/chart_of_accounts/import_from_openerp.py b/erpnext/accounts/doctype/account/chart_of_accounts/import_from_openerp.py index 7d94c89ad7b..79001d77053 100644 --- a/erpnext/accounts/doctype/account/chart_of_accounts/import_from_openerp.py +++ b/erpnext/accounts/doctype/account/chart_of_accounts/import_from_openerp.py @@ -12,7 +12,6 @@ from xml.etree import ElementTree as ET import frappe from frappe.utils.csvutils import read_csv_content -from six import iteritems path = "/Users/nabinhait/projects/odoo/addons" @@ -139,7 +138,7 @@ def get_account_types(root_list, csv_content, prefix=None): def make_maps_for_xml(xml_roots, account_types, country_dir): """make maps for `charts` and `accounts`""" - for model, root_list in iteritems(xml_roots): + for model, root_list in xml_roots.items(): for root in root_list: for node in root[0].findall("record"): if node.get("model")=="account.account.template": diff --git a/erpnext/accounts/doctype/accounts_settings/test_accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/test_accounts_settings.py index eb90fc7a861..bf1e967bdbc 100644 --- a/erpnext/accounts/doctype/accounts_settings/test_accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/test_accounts_settings.py @@ -1,4 +1,3 @@ - import unittest import frappe diff --git a/erpnext/accounts/doctype/bank/bank_dashboard.py b/erpnext/accounts/doctype/bank/bank_dashboard.py index e7ef6aa25f5..36482aac960 100644 --- a/erpnext/accounts/doctype/bank/bank_dashboard.py +++ b/erpnext/accounts/doctype/bank/bank_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py b/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py index bc08eab0351..db4d7e51d59 100644 --- a/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py +++ b/erpnext/accounts/doctype/bank_account/bank_account_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py b/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py index c57e862892c..e786d13c95d 100644 --- a/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py +++ b/erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py @@ -15,7 +15,6 @@ from frappe.utils.background_jobs import enqueue from frappe.utils.xlsxutils import ILLEGAL_CHARACTERS_RE, handle_html from openpyxl.styles import Font from openpyxl.utils import get_column_letter -from six import string_types class BankStatementImport(DataImport): @@ -179,12 +178,12 @@ def write_xlsx(data, sheet_name, wb=None, column_widths=None, file_path=None): for row in data: clean_row = [] for item in row: - if isinstance(item, string_types) and (sheet_name not in ['Data Import Template', 'Data Export']): + if isinstance(item, str) and (sheet_name not in ['Data Import Template', 'Data Export']): value = handle_html(item) else: value = item - if isinstance(item, string_types) and next(ILLEGAL_CHARACTERS_RE.finditer(value), None): + if isinstance(item, str) and next(ILLEGAL_CHARACTERS_RE.finditer(value), None): # Remove illegal characters from the string value = re.sub(ILLEGAL_CHARACTERS_RE, '', value) diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py b/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py index 6125c27cdfd..cca8a88c301 100644 --- a/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction_upload.py @@ -7,7 +7,6 @@ import json import frappe from frappe.utils import getdate from frappe.utils.dateutils import parse_date -from six import iteritems @frappe.whitelist() @@ -43,7 +42,7 @@ def create_bank_entries(columns, data, bank_account): if all(item is None for item in d) is True: continue fields = {} - for key, value in iteritems(header_map): + for key, value in header_map.items(): fields.update({key: d[int(value)-1]}) try: diff --git a/erpnext/accounts/doctype/cash_flow_mapper/default_cash_flow_mapper.py b/erpnext/accounts/doctype/cash_flow_mapper/default_cash_flow_mapper.py index 4465ec6024b..6e7b687c04d 100644 --- a/erpnext/accounts/doctype/cash_flow_mapper/default_cash_flow_mapper.py +++ b/erpnext/accounts/doctype/cash_flow_mapper/default_cash_flow_mapper.py @@ -1,4 +1,3 @@ - DEFAULT_MAPPERS = [ { 'doctype': 'Cash Flow Mapper', diff --git a/erpnext/accounts/doctype/cost_center/cost_center_dashboard.py b/erpnext/accounts/doctype/cost_center/cost_center_dashboard.py index 0bae8fe1456..f524803f64c 100644 --- a/erpnext/accounts/doctype/cost_center/cost_center_dashboard.py +++ b/erpnext/accounts/doctype/cost_center/cost_center_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/dunning/dunning.py b/erpnext/accounts/doctype/dunning/dunning.py index 02377cd5659..5da0077a2be 100644 --- a/erpnext/accounts/doctype/dunning/dunning.py +++ b/erpnext/accounts/doctype/dunning/dunning.py @@ -6,7 +6,6 @@ import json import frappe from frappe.utils import cint, flt, getdate -from six import string_types from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( get_accounting_dimensions, @@ -108,7 +107,7 @@ def calculate_interest_and_amount(outstanding_amount, rate_of_interest, dunning_ @frappe.whitelist() def get_dunning_letter_text(dunning_type, doc, language=None): - if isinstance(doc, string_types): + if isinstance(doc, str): doc = json.loads(doc) if language: filters = {'parent': dunning_type, 'language': language} diff --git a/erpnext/accounts/doctype/dunning/dunning_dashboard.py b/erpnext/accounts/doctype/dunning/dunning_dashboard.py index ebe4efb0985..a891bd29171 100644 --- a/erpnext/accounts/doctype/dunning/dunning_dashboard.py +++ b/erpnext/accounts/doctype/dunning/dunning_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation_dashboard.py b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation_dashboard.py index 0efe291d217..fe862507fb8 100644 --- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation_dashboard.py +++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'reference_name', diff --git a/erpnext/accounts/doctype/finance_book/finance_book_dashboard.py b/erpnext/accounts/doctype/finance_book/finance_book_dashboard.py index 4a56cd39d00..57b039d022b 100644 --- a/erpnext/accounts/doctype/finance_book/finance_book_dashboard.py +++ b/erpnext/accounts/doctype/finance_book/finance_book_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year_dashboard.py b/erpnext/accounts/doctype/fiscal_year/fiscal_year_dashboard.py index 3ede25f19d4..892a2c62cff 100644 --- a/erpnext/accounts/doctype/fiscal_year/fiscal_year_dashboard.py +++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py index f184b95a92d..9d1452b1b38 100644 --- a/erpnext/accounts/doctype/gl_entry/gl_entry.py +++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py @@ -8,7 +8,6 @@ from frappe.model.document import Document from frappe.model.meta import get_field_precision from frappe.model.naming import set_name_from_naming_options from frappe.utils import flt, fmt_money -from six import iteritems import erpnext from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( @@ -115,7 +114,7 @@ class GLEntry(Document): def validate_allowed_dimensions(self): dimension_filter_map = get_dimension_filter_map() - for key, value in iteritems(dimension_filter_map): + for key, value in dimension_filter_map.items(): dimension = key[0] account = key[1] diff --git a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting_dashboard.py b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting_dashboard.py index 771846e508a..b7484293023 100644 --- a/erpnext/accounts/doctype/invoice_discounting/invoice_discounting_dashboard.py +++ b/erpnext/accounts/doctype/invoice_discounting/invoice_discounting_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/item_tax_template/item_tax_template_dashboard.py b/erpnext/accounts/doctype/item_tax_template/item_tax_template_dashboard.py index 71177c25318..af01c57560f 100644 --- a/erpnext/accounts/doctype/item_tax_template/item_tax_template_dashboard.py +++ b/erpnext/accounts/doctype/item_tax_template/item_tax_template_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.py b/erpnext/accounts/doctype/journal_entry/journal_entry.py index 9c7e93fa56f..ca172650782 100644 --- a/erpnext/accounts/doctype/journal_entry/journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/journal_entry.py @@ -7,7 +7,6 @@ import json import frappe from frappe import _, msgprint, scrub from frappe.utils import cint, cstr, flt, fmt_money, formatdate, get_link_to_form, nowdate -from six import iteritems, string_types import erpnext from erpnext.accounts.deferred_revenue import get_deferred_booking_accounts @@ -116,7 +115,7 @@ class JournalEntry(AccountsController): if d.reference_type in ("Sales Order", "Purchase Order", "Employee Advance"): advance_paid.setdefault(d.reference_type, []).append(d.reference_name) - for voucher_type, order_list in iteritems(advance_paid): + for voucher_type, order_list in advance_paid.items(): for voucher_no in list(set(order_list)): frappe.get_doc(voucher_type, voucher_no).set_total_advance_paid() @@ -431,7 +430,7 @@ class JournalEntry(AccountsController): def validate_orders(self): """Validate totals, closed and docstatus for orders""" - for reference_name, total in iteritems(self.reference_totals): + for reference_name, total in self.reference_totals.items(): reference_type = self.reference_types[reference_name] account = self.reference_accounts[reference_name] @@ -462,7 +461,7 @@ class JournalEntry(AccountsController): def validate_invoices(self): """Validate totals and docstatus for invoices""" - for reference_name, total in iteritems(self.reference_totals): + for reference_name, total in self.reference_totals.items(): reference_type = self.reference_types[reference_name] if (reference_type in ("Sales Invoice", "Purchase Invoice") and @@ -1007,7 +1006,7 @@ def get_outstanding(args): if not frappe.has_permission("Account"): frappe.msgprint(_("No Permission"), raise_exception=1) - if isinstance(args, string_types): + if isinstance(args, str): args = json.loads(args) company_currency = erpnext.get_company_currency(args.get("company")) diff --git a/erpnext/accounts/doctype/loyalty_program/loyalty_program_dashboard.py b/erpnext/accounts/doctype/loyalty_program/loyalty_program_dashboard.py index 7652e9691b4..25328e501ee 100644 --- a/erpnext/accounts/doctype/loyalty_program/loyalty_program_dashboard.py +++ b/erpnext/accounts/doctype/loyalty_program/loyalty_program_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'loyalty_program', diff --git a/erpnext/accounts/doctype/monthly_distribution/monthly_distribution_dashboard.py b/erpnext/accounts/doctype/monthly_distribution/monthly_distribution_dashboard.py index 3e6575f2540..96008c47339 100644 --- a/erpnext/accounts/doctype/monthly_distribution/monthly_distribution_dashboard.py +++ b/erpnext/accounts/doctype/monthly_distribution/monthly_distribution_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.py b/erpnext/accounts/doctype/payment_entry/payment_entry.py index d6f594d5bca..26fd16a4fd5 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.py @@ -7,7 +7,6 @@ import json import frappe from frappe import ValidationError, _, scrub, throw from frappe.utils import cint, comma_or, flt, getdate, nowdate -from six import iteritems, string_types import erpnext from erpnext.accounts.doctype.bank_account.bank_account import ( @@ -203,7 +202,7 @@ class PaymentEntry(AccountsController): ref_details = get_reference_details(d.reference_doctype, d.reference_name, self.party_account_currency) - for field, value in iteritems(ref_details): + for field, value in ref_details.items(): if d.exchange_gain_loss: # for cases where gain/loss is booked into invoice # exchange_gain_loss is calculated from invoice & populated @@ -387,7 +386,7 @@ class PaymentEntry(AccountsController): invoice_paid_amount_map[invoice_key]['outstanding'] = term.outstanding invoice_paid_amount_map[invoice_key]['discounted_amt'] = ref.total_amount * (term.discount / 100) - for idx, (key, allocated_amount) in enumerate(iteritems(invoice_payment_amount_map), 1): + for idx, (key, allocated_amount) in enumerate(invoice_payment_amount_map.items(), 1): if not invoice_paid_amount_map.get(key): frappe.throw(_('Payment term {0} not used in {1}').format(key[0], key[1])) @@ -912,7 +911,7 @@ class PaymentEntry(AccountsController): self.paid_amount_after_tax = self.paid_amount def determine_exclusive_rate(self): - if not any((cint(tax.included_in_paid_amount) for tax in self.get("taxes"))): + if not any(cint(tax.included_in_paid_amount) for tax in self.get("taxes")): return cumulated_tax_fraction = 0 @@ -1032,7 +1031,7 @@ def validate_inclusive_tax(tax, doc): @frappe.whitelist() def get_outstanding_reference_documents(args): - if isinstance(args, string_types): + if isinstance(args, str): args = json.loads(args) if args.get('party_type') == 'Member': diff --git a/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account_dashboard.py b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account_dashboard.py index bb0fc975cac..39968922417 100644 --- a/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account_dashboard.py +++ b/erpnext/accounts/doctype/payment_gateway_account/payment_gateway_account_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'payment_gateway_account', diff --git a/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py b/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py index 02da9793895..37bbaec33d9 100644 --- a/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py +++ b/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'payment_order', diff --git a/erpnext/accounts/doctype/payment_term/payment_term_dashboard.py b/erpnext/accounts/doctype/payment_term/payment_term_dashboard.py index 7f5b96c8a8a..ac80b794bab 100644 --- a/erpnext/accounts/doctype/payment_term/payment_term_dashboard.py +++ b/erpnext/accounts/doctype/payment_term/payment_term_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/payment_terms_template/payment_terms_template_dashboard.py b/erpnext/accounts/doctype/payment_terms_template/payment_terms_template_dashboard.py index aa5de2ca3f8..2cf7a6cf7a2 100644 --- a/erpnext/accounts/doctype/payment_terms_template/payment_terms_template_dashboard.py +++ b/erpnext/accounts/doctype/payment_terms_template/payment_terms_template_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index 814372f6b35..0d6404c3245 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -5,7 +5,6 @@ import frappe from frappe import _ from frappe.utils import cint, flt, get_link_to_form, getdate, nowdate -from six import iteritems from erpnext.accounts.doctype.loyalty_program.loyalty_program import validate_loyalty_points from erpnext.accounts.doctype.payment_request.payment_request import make_payment_request @@ -364,7 +363,7 @@ class POSInvoice(SalesInvoice): for item in self.get("items"): if item.get('item_code'): profile_details = get_pos_profile_item_details(profile.get("company"), frappe._dict(item.as_dict()), profile) - for fname, val in iteritems(profile_details): + for fname, val in profile_details.items(): if (not for_validate) or (for_validate and not item.get(fname)): item.set(fname, val) @@ -524,9 +523,8 @@ def make_sales_return(source_name, target_doc=None): def make_merge_log(invoices): import json - from six import string_types - if isinstance(invoices, string_types): + if isinstance(invoices, str): invoices = json.loads(invoices) if len(invoices) == 0: diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py index 02a0b266271..843497019da 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py @@ -5,7 +5,6 @@ import json import frappe -import six from frappe import _ from frappe.core.page.background_jobs.background_jobs import get_info from frappe.model.document import Document @@ -282,7 +281,7 @@ def unconsolidate_pos_invoices(closing_entry): def create_merge_logs(invoice_by_customer, closing_entry=None): try: - for customer, invoices in six.iteritems(invoice_by_customer): + for customer, invoices in invoice_by_customer.items(): merge_log = frappe.new_doc('POS Invoice Merge Log') merge_log.posting_date = getdate(closing_entry.get('posting_date')) if closing_entry else nowdate() merge_log.customer = customer diff --git a/erpnext/accounts/doctype/pos_profile/pos_profile.py b/erpnext/accounts/doctype/pos_profile/pos_profile.py index d80c1b27cce..1d49c3df147 100644 --- a/erpnext/accounts/doctype/pos_profile/pos_profile.py +++ b/erpnext/accounts/doctype/pos_profile/pos_profile.py @@ -6,7 +6,6 @@ import frappe from frappe import _, msgprint from frappe.model.document import Document from frappe.utils import get_link_to_form, now -from six import iteritems class POSProfile(Document): @@ -37,7 +36,7 @@ class POSProfile(Document): self.expense_account], "Cost Center": [self.cost_center], "Warehouse": [self.warehouse]} - for link_dt, dn_list in iteritems(accounts): + for link_dt, dn_list in accounts.items(): for link_dn in dn_list: if link_dn and not frappe.db.exists({"doctype": link_dt, "company": self.company, "name": link_dn}): diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index 23606cec53f..ac96b045a22 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -11,7 +11,6 @@ import frappe from frappe import _, throw from frappe.model.document import Document from frappe.utils import cint, flt, getdate -from six import string_types apply_on_dict = {"Item Code": "items", "Item Group": "item_groups", "Brand": "brands"} @@ -178,7 +177,7 @@ def apply_pricing_rule(args, doc=None): } """ - if isinstance(args, string_types): + if isinstance(args, str): args = json.loads(args) args = frappe._dict(args) @@ -234,7 +233,7 @@ def get_pricing_rule_for_item(args, price_list_rate=0, doc=None, for_validate=Fa get_product_discount_rule, ) - if isinstance(doc, string_types): + if isinstance(doc, str): doc = json.loads(doc) if doc: @@ -270,7 +269,7 @@ def get_pricing_rule_for_item(args, price_list_rate=0, doc=None, for_validate=Fa for pricing_rule in pricing_rules: if not pricing_rule: continue - if isinstance(pricing_rule, string_types): + if isinstance(pricing_rule, str): pricing_rule = frappe.get_cached_doc("Pricing Rule", pricing_rule) pricing_rule.apply_rule_on_other_items = get_pricing_rule_items(pricing_rule) @@ -427,7 +426,7 @@ def remove_pricing_rule_for_item(pricing_rules, item_details, item_code=None): @frappe.whitelist() def remove_pricing_rules(item_list): - if isinstance(item_list, string_types): + if isinstance(item_list, str): item_list = json.loads(item_list) out = [] diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 984d65be6fb..62e3dc83468 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -6,7 +6,6 @@ import frappe from frappe import _, throw from frappe.model.mapper import get_mapped_doc from frappe.utils import cint, cstr, flt, formatdate, get_link_to_form, getdate, nowdate -from six import iteritems import erpnext from erpnext.accounts.deferred_revenue import validate_service_stop_date @@ -600,7 +599,7 @@ class PurchaseInvoice(BuyingController): # Amount added through landed-cost-voucher if landed_cost_entries: - for account, amount in iteritems(landed_cost_entries[(item.item_code, item.name)]): + for account, amount in landed_cost_entries[(item.item_code, item.name)].items(): gl_entries.append(self.get_gl_dict({ "account": account, "against": item.expense_account, diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py index f1878b480ed..76c9fcdd7cb 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template_dashboard.py b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template_dashboard.py index 95a7a1c889b..3176556ec53 100644 --- a/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template_dashboard.py +++ b/erpnext/accounts/doctype/purchase_taxes_and_charges_template/purchase_taxes_and_charges_template_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index e77c4e16831..cd270f505e0 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -18,7 +18,6 @@ from frappe.utils import ( getdate, nowdate, ) -from six import iteritems import erpnext from erpnext.accounts.deferred_revenue import validate_service_stop_date @@ -533,7 +532,7 @@ class SalesInvoice(SellingController): for item in self.get("items"): if item.get('item_code'): profile_details = get_pos_profile_item_details(pos, frappe._dict(item.as_dict()), pos, update_data=True) - for fname, val in iteritems(profile_details): + for fname, val in profile_details.items(): if (not for_validate) or (for_validate and not item.get(fname)): item.set(fname, val) @@ -639,7 +638,7 @@ class SalesInvoice(SellingController): return prev_doc_field_map = {'Sales Order': ['so_required', 'is_pos'],'Delivery Note': ['dn_required', 'update_stock']} - for key, value in iteritems(prev_doc_field_map): + for key, value in prev_doc_field_map.items(): if frappe.db.get_single_value('Selling Settings', value[0]) == 'Yes': if frappe.get_value('Customer', self.customer, value[0]): diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py index 104d4f9b8aa..5cdc8dae25f 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index e98ff3f5285..969756addf2 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -8,7 +8,6 @@ import frappe from frappe.model.dynamic_links import get_dynamic_link_map from frappe.model.naming import make_autoname from frappe.utils import add_days, flt, getdate, nowdate -from six import iteritems import erpnext from erpnext.accounts.doctype.account.test_account import create_account, get_inventory_account @@ -345,7 +344,7 @@ class TestSalesInvoice(unittest.TestCase): # check if item values are calculated for i, d in enumerate(si.get("items")): - for k, v in iteritems(expected_values[i]): + for k, v in expected_values[i].items(): self.assertEqual(d.get(k), v) # check net total @@ -648,7 +647,7 @@ class TestSalesInvoice(unittest.TestCase): # check if item values are calculated for i, d in enumerate(si.get("items")): - for key, val in iteritems(expected_values[i]): + for key, val in expected_values[i].items(): self.assertEqual(d.get(key), val) # check net total diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template_dashboard.py b/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template_dashboard.py index 5b9fbafed8d..bc1fd8ec32f 100644 --- a/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template_dashboard.py +++ b/erpnext/accounts/doctype/sales_taxes_and_charges_template/sales_taxes_and_charges_template_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/share_type/share_type_dashboard.py b/erpnext/accounts/doctype/share_type/share_type_dashboard.py index fdb417ed6d0..d5551d12471 100644 --- a/erpnext/accounts/doctype/share_type/share_type_dashboard.py +++ b/erpnext/accounts/doctype/share_type/share_type_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/shareholder/shareholder_dashboard.py b/erpnext/accounts/doctype/shareholder/shareholder_dashboard.py index 44d5ec684fb..c01ac23f1ee 100644 --- a/erpnext/accounts/doctype/shareholder/shareholder_dashboard.py +++ b/erpnext/accounts/doctype/shareholder/shareholder_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'shareholder', diff --git a/erpnext/accounts/doctype/shipping_rule/shipping_rule_dashboard.py b/erpnext/accounts/doctype/shipping_rule/shipping_rule_dashboard.py index ef2a053227b..fc706211592 100644 --- a/erpnext/accounts/doctype/shipping_rule/shipping_rule_dashboard.py +++ b/erpnext/accounts/doctype/shipping_rule/shipping_rule_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/subscription/subscription.py b/erpnext/accounts/doctype/subscription/subscription.py index 68d980257e4..63b714e68c6 100644 --- a/erpnext/accounts/doctype/subscription/subscription.py +++ b/erpnext/accounts/doctype/subscription/subscription.py @@ -1,4 +1,3 @@ - # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt diff --git a/erpnext/accounts/doctype/subscription_plan/subscription_plan_dashboard.py b/erpnext/accounts/doctype/subscription_plan/subscription_plan_dashboard.py index 15df62daa23..d076e39964b 100644 --- a/erpnext/accounts/doctype/subscription_plan/subscription_plan_dashboard.py +++ b/erpnext/accounts/doctype/subscription_plan/subscription_plan_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/tax_category/tax_category_dashboard.py b/erpnext/accounts/doctype/tax_category/tax_category_dashboard.py index c9d52da78ad..4bdb70a480a 100644 --- a/erpnext/accounts/doctype/tax_category/tax_category_dashboard.py +++ b/erpnext/accounts/doctype/tax_category/tax_category_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/accounts/doctype/tax_rule/tax_rule.py b/erpnext/accounts/doctype/tax_rule/tax_rule.py index b0d6983e6e5..a16377c847c 100644 --- a/erpnext/accounts/doctype/tax_rule/tax_rule.py +++ b/erpnext/accounts/doctype/tax_rule/tax_rule.py @@ -10,7 +10,6 @@ from frappe.contacts.doctype.address.address import get_default_address from frappe.model.document import Document from frappe.utils import cint, cstr from frappe.utils.nestedset import get_root_of -from six import iteritems from erpnext.setup.doctype.customer_group.customer_group import get_parent_customer_groups @@ -148,7 +147,7 @@ def get_tax_template(posting_date, args): if 'tax_category' in args.keys(): del args['tax_category'] - for key, value in iteritems(args): + for key, value in args.items(): if key=="use_for_shopping_cart": conditions.append("use_for_shopping_cart = {0}".format(1 if value else 0)) elif key == 'customer_group': diff --git a/erpnext/accounts/doctype/tax_rule/test_tax_rule.py b/erpnext/accounts/doctype/tax_rule/test_tax_rule.py index 44344bb7635..d5ac9b20c55 100644 --- a/erpnext/accounts/doctype/tax_rule/test_tax_rule.py +++ b/erpnext/accounts/doctype/tax_rule/test_tax_rule.py @@ -11,7 +11,6 @@ from erpnext.crm.doctype.opportunity.test_opportunity import make_opportunity test_records = frappe.get_test_records('Tax Rule') -from six import iteritems class TestTaxRule(unittest.TestCase): @@ -175,7 +174,7 @@ def make_tax_rule(**args): tax_rule = frappe.new_doc("Tax Rule") - for key, val in iteritems(args): + for key, val in args.items(): if key != "save": tax_rule.set(key, val) diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py index 31dcb406d89..dc1818a052a 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py @@ -378,7 +378,7 @@ def get_tcs_amount(parties, inv, tax_details, vouchers, adv_vouchers): current_invoice_total = get_invoice_total_without_tcs(inv, tax_details) total_invoiced_amt = current_invoice_total + invoiced_amt + advance_amt - credit_note_amt - if ((cumulative_threshold and total_invoiced_amt >= cumulative_threshold)): + if (cumulative_threshold and total_invoiced_amt >= cumulative_threshold): chargeable_amt = total_invoiced_amt - cumulative_threshold tcs_amount = chargeable_amt * tax_details.rate / 100 if chargeable_amt > 0 else 0 diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category_dashboard.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category_dashboard.py index 46d0c2e487e..256d4ac2178 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category_dashboard.py +++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'tax_withholding_category', diff --git a/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.py b/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.py index 19b550feea7..02e3e933330 100644 --- a/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.py +++ b/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.py @@ -1,5 +1,3 @@ - - def get_context(context): # do your magic here pass diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 26ff2c6e04b..2108bc158df 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -26,7 +26,6 @@ from frappe.utils import ( getdate, nowdate, ) -from six import iteritems import erpnext from erpnext import get_company_currency @@ -508,7 +507,7 @@ def get_timeline_data(doctype, name): timeline_items = dict(data) - for date, count in iteritems(timeline_items): + for date, count in timeline_items.items(): timestamp = get_timestamp(date) out.update({ timestamp: count }) diff --git a/erpnext/accounts/report/account_balance/test_account_balance.py b/erpnext/accounts/report/account_balance/test_account_balance.py index 50b1a679b6c..73370e4ed6f 100644 --- a/erpnext/accounts/report/account_balance/test_account_balance.py +++ b/erpnext/accounts/report/account_balance/test_account_balance.py @@ -1,4 +1,3 @@ - import unittest import frappe diff --git a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py index b5408bd4c8f..ab95c93e368 100644 --- a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py @@ -1,4 +1,3 @@ - import unittest import frappe diff --git a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py index a95bcf83ef7..3c94629203e 100644 --- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py +++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py @@ -5,7 +5,6 @@ import frappe from frappe import _, scrub from frappe.utils import cint -from six import iteritems from erpnext.accounts.party import get_partywise_advanced_payment_amount from erpnext.accounts.report.accounts_receivable.accounts_receivable import ReceivablePayableReport @@ -37,7 +36,7 @@ class AccountsReceivableSummary(ReceivablePayableReport): party_advance_amount = get_partywise_advanced_payment_amount(self.party_type, self.filters.report_date, self.filters.show_future_payments, self.filters.company) or {} - for party, party_dict in iteritems(self.party_total): + for party, party_dict in self.party_total.items(): if party_dict.outstanding == 0: continue diff --git a/erpnext/accounts/report/budget_variance_report/budget_variance_report.py b/erpnext/accounts/report/budget_variance_report/budget_variance_report.py index ead67766785..3bb590a564d 100644 --- a/erpnext/accounts/report/budget_variance_report/budget_variance_report.py +++ b/erpnext/accounts/report/budget_variance_report/budget_variance_report.py @@ -7,7 +7,6 @@ import datetime import frappe from frappe import _ from frappe.utils import flt, formatdate -from six import iteritems from erpnext.controllers.trends import get_period_date_ranges, get_period_month_ranges @@ -48,7 +47,7 @@ def execute(filters=None): return columns, data, None, chart def get_final_data(dimension, dimension_items, filters, period_month_ranges, data, DCC_allocation): - for account, monthwise_data in iteritems(dimension_items): + for account, monthwise_data in dimension_items.items(): row = [dimension, account] totals = [0, 0, 0] for year in get_fiscal_years(filters): diff --git a/erpnext/accounts/report/cash_flow/cash_flow.py b/erpnext/accounts/report/cash_flow/cash_flow.py index 75365b81f22..15041f2516e 100644 --- a/erpnext/accounts/report/cash_flow/cash_flow.py +++ b/erpnext/accounts/report/cash_flow/cash_flow.py @@ -5,7 +5,6 @@ import frappe from frappe import _ from frappe.utils import cint, cstr -from six import iteritems from erpnext.accounts.report.financial_statements import ( get_columns, @@ -201,7 +200,7 @@ def add_total_row_account(out, data, label, period_list, currency, summary_data, def get_report_summary(summary_data, currency): report_summary = [] - for label, value in iteritems(summary_data): + for label, value in summary_data.items(): report_summary.append( { "value": value, diff --git a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py index 29546198464..56db841e94d 100644 --- a/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py +++ b/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py @@ -5,7 +5,6 @@ import frappe from frappe import _, scrub from frappe.utils import getdate, nowdate -from six import iteritems, itervalues class PartyLedgerSummaryReport(object): @@ -143,9 +142,9 @@ class PartyLedgerSummaryReport(object): self.party_data[gle.party].paid_amount -= amount out = [] - for party, row in iteritems(self.party_data): + for party, row in self.party_data.items(): if row.opening_balance or row.invoiced_amount or row.paid_amount or row.return_amount or row.closing_amount: - total_party_adjustment = sum(amount for amount in itervalues(self.party_adjustment_details.get(party, {}))) + total_party_adjustment = sum(amount for amount in self.party_adjustment_details.get(party, {}).values()) row.paid_amount -= total_party_adjustment adjustments = self.party_adjustment_details.get(party, {}) @@ -267,7 +266,7 @@ class PartyLedgerSummaryReport(object): adjustment_voucher_entries.setdefault((gle.voucher_type, gle.voucher_no), []) adjustment_voucher_entries[(gle.voucher_type, gle.voucher_no)].append(gle) - for voucher_gl_entries in itervalues(adjustment_voucher_entries): + for voucher_gl_entries in adjustment_voucher_entries.values(): parties = {} accounts = {} has_irrelevant_entry = False @@ -287,7 +286,7 @@ class PartyLedgerSummaryReport(object): if parties and accounts: if len(parties) == 1: party = list(parties.keys())[0] - for account, amount in iteritems(accounts): + for account, amount in accounts.items(): self.party_adjustment_accounts.add(account) self.party_adjustment_details.setdefault(party, {}) self.party_adjustment_details[party].setdefault(account, 0) @@ -295,7 +294,7 @@ class PartyLedgerSummaryReport(object): elif len(accounts) == 1 and not has_irrelevant_entry: account = list(accounts.keys())[0] self.party_adjustment_accounts.add(account) - for party, amount in iteritems(parties): + for party, amount in parties.items(): self.party_adjustment_details.setdefault(party, {}) self.party_adjustment_details[party].setdefault(account, 0) self.party_adjustment_details[party][account] += amount diff --git a/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.py b/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.py index c69bb3f70c5..d547470bf3c 100644 --- a/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.py +++ b/erpnext/accounts/report/dimension_wise_accounts_balance_report/dimension_wise_accounts_balance_report.py @@ -5,7 +5,6 @@ import frappe from frappe import _ from frappe.utils import cstr, flt -from six import itervalues import erpnext from erpnext.accounts.report.financial_statements import ( @@ -107,7 +106,7 @@ def set_gl_entries_by_account(dimension_items_list, filters, account, gl_entries def format_gl_entries(gl_entries_by_account, accounts_by_name, dimension_items_list): - for entries in itervalues(gl_entries_by_account): + for entries in gl_entries_by_account.values(): for entry in entries: d = accounts_by_name.get(entry.account) if not d: diff --git a/erpnext/accounts/report/financial_statements.py b/erpnext/accounts/report/financial_statements.py index 37ff103e72f..4bb44b398bc 100644 --- a/erpnext/accounts/report/financial_statements.py +++ b/erpnext/accounts/report/financial_statements.py @@ -1,4 +1,3 @@ - # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt @@ -10,7 +9,6 @@ import re import frappe from frappe import _ from frappe.utils import add_days, add_months, cint, cstr, flt, formatdate, get_first_day, getdate -from six import itervalues from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( get_accounting_dimensions, @@ -188,7 +186,7 @@ def get_appropriate_currency(company, filters=None): def calculate_values( accounts_by_name, gl_entries_by_account, period_list, accumulated_values, ignore_accumulated_values_for_fy): - for entries in itervalues(gl_entries_by_account): + for entries in gl_entries_by_account.values(): for entry in entries: d = accounts_by_name.get(entry.account) if not d: diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index f538764873b..050403d21ea 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -7,7 +7,6 @@ from collections import OrderedDict import frappe from frappe import _, _dict from frappe.utils import cstr, flt, getdate -from six import iteritems from erpnext import get_company_currency, get_default_company from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( @@ -314,7 +313,7 @@ def get_data_with_opening_closing(filters, account_details, accounting_dimension data.append(totals.opening) if filters.get("group_by") != 'Group by Voucher (Consolidated)': - for acc, acc_dict in iteritems(gle_map): + for acc, acc_dict in gle_map.items(): # acc if acc_dict.entries: # opening diff --git a/erpnext/accounts/report/tax_detail/test_tax_detail.py b/erpnext/accounts/report/tax_detail/test_tax_detail.py index 7292f2bde28..bf668ab779d 100644 --- a/erpnext/accounts/report/tax_detail/test_tax_detail.py +++ b/erpnext/accounts/report/tax_detail/test_tax_detail.py @@ -1,4 +1,3 @@ - import datetime import json import os diff --git a/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.py b/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.py index d576c273a27..07f2e435e41 100644 --- a/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.py +++ b/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.py @@ -1,4 +1,3 @@ - import frappe from frappe import _ diff --git a/erpnext/accounts/report/utils.py b/erpnext/accounts/report/utils.py index 89cc0a8c8cc..c38e4b8c7f3 100644 --- a/erpnext/accounts/report/utils.py +++ b/erpnext/accounts/report/utils.py @@ -1,4 +1,3 @@ - import frappe from frappe.utils import flt, formatdate, get_datetime_str diff --git a/erpnext/accounts/test/test_utils.py b/erpnext/accounts/test/test_utils.py index 4aca40cf6c0..effc913da05 100644 --- a/erpnext/accounts/test/test_utils.py +++ b/erpnext/accounts/test/test_utils.py @@ -1,4 +1,3 @@ - import unittest from frappe.test_runner import make_test_objects diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 4340840df0c..39e84e3ceff 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -9,7 +9,6 @@ import frappe.defaults from frappe import _, throw from frappe.model.meta import get_field_precision from frappe.utils import cint, cstr, flt, formatdate, get_number_format_info, getdate, now, nowdate -from six import string_types import erpnext @@ -795,7 +794,7 @@ def get_children(doctype, parent, company, is_root=False): @frappe.whitelist() def get_account_balances(accounts, company): - if isinstance(accounts, string_types): + if isinstance(accounts, str): accounts = loads(accounts) if not accounts: diff --git a/erpnext/agriculture/doctype/crop/crop_dashboard.py b/erpnext/agriculture/doctype/crop/crop_dashboard.py index 772ed611373..37cdbb2df52 100644 --- a/erpnext/agriculture/doctype/crop/crop_dashboard.py +++ b/erpnext/agriculture/doctype/crop/crop_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/assets/doctype/asset/asset.py b/erpnext/assets/doctype/asset/asset.py index cfe7edca710..c0c437f8d2f 100644 --- a/erpnext/assets/doctype/asset/asset.py +++ b/erpnext/assets/doctype/asset/asset.py @@ -20,7 +20,6 @@ from frappe.utils import ( nowdate, today, ) -from six import string_types import erpnext from erpnext.accounts.general_ledger import make_reverse_gl_entries @@ -625,7 +624,7 @@ class Asset(AccountsController): @frappe.whitelist() def get_depreciation_rate(self, args, on_validate=False): - if isinstance(args, string_types): + if isinstance(args, str): args = json.loads(args) float_precision = cint(frappe.db.get_default("float_precision")) or 2 @@ -820,9 +819,7 @@ def make_journal_entry(asset_name): def make_asset_movement(assets, purpose=None): import json - from six import string_types - - if isinstance(assets, string_types): + if isinstance(assets, str): assets = json.loads(assets) if len(assets) == 0: diff --git a/erpnext/assets/doctype/asset/asset_dashboard.py b/erpnext/assets/doctype/asset/asset_dashboard.py index c9efe3d0848..00d08473d66 100644 --- a/erpnext/assets/doctype/asset/asset_dashboard.py +++ b/erpnext/assets/doctype/asset/asset_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'non_standard_fieldnames': { diff --git a/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py b/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py index 8588c002d5e..0163595b51c 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py index b670bd58d48..2db750e75c4 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py @@ -12,7 +12,6 @@ from frappe.model.mapper import get_mapped_doc from frappe.utils import get_url from frappe.utils.print_format import download_pdf from frappe.utils.user import get_user_fullname -from six import string_types from erpnext.accounts.party import get_party_account_currency, get_party_details from erpnext.buying.utils import validate_for_items @@ -288,7 +287,7 @@ def make_supplier_quotation_from_rfq(source_name, target_doc=None, for_supplier= # This method is used to make supplier quotation from supplier's portal. @frappe.whitelist() def create_supplier_quotation(doc): - if isinstance(doc, string_types): + if isinstance(doc, str): doc = json.loads(doc) try: diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation_dashboard.py b/erpnext/buying/doctype/request_for_quotation/request_for_quotation_dashboard.py index 21ef33294e3..dc1cda126aa 100644 --- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation_dashboard.py +++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'docstatus': 1, diff --git a/erpnext/buying/doctype/supplier/supplier_dashboard.py b/erpnext/buying/doctype/supplier/supplier_dashboard.py index cfa0375e2ed..78efd8eea09 100644 --- a/erpnext/buying/doctype/supplier/supplier_dashboard.py +++ b/erpnext/buying/doctype/supplier/supplier_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py b/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py index 1680efc53c7..236b91ad58b 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py index e021c9c6be1..5d693263f8c 100644 --- a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py +++ b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/config/education.py b/erpnext/config/education.py index 3ead3ef9572..d718a942527 100644 --- a/erpnext/config/education.py +++ b/erpnext/config/education.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/config/projects.py b/erpnext/config/projects.py index 168dead9bf4..f4675e749a8 100644 --- a/erpnext/config/projects.py +++ b/erpnext/config/projects.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 1b85871cf9a..e0551a4ca87 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -20,7 +20,6 @@ from frappe.utils import ( nowdate, today, ) -from six import text_type import erpnext from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( @@ -1080,7 +1079,7 @@ class AccountsController(TransactionBase): stock_items = [r[0] for r in frappe.db.sql(""" select name from `tabItem` where name in (%s) and is_stock_item=1 - """ % (", ".join((["%s"] * len(item_codes))),), item_codes)] + """ % (", ".join(["%s"] * len(item_codes)),), item_codes)] return stock_items @@ -1789,7 +1788,7 @@ def get_payment_terms(terms_template, posting_date=None, grand_total=None, base_ @frappe.whitelist() def get_payment_term_details(term, posting_date=None, grand_total=None, base_grand_total=None, bill_date=None): term_details = frappe._dict() - if isinstance(term, text_type): + if isinstance(term, str): term = frappe.get_doc("Payment Term", term) else: term_details.payment_term = term.payment_term diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py index 2d6510854ed..2bad6f8e9f4 100644 --- a/erpnext/controllers/item_variant.py +++ b/erpnext/controllers/item_variant.py @@ -8,7 +8,6 @@ import json import frappe from frappe import _ from frappe.utils import cstr, flt -from six import string_types class ItemVariantExistsError(frappe.ValidationError): pass @@ -30,7 +29,7 @@ def get_variant(template, args=None, variant=None, manufacturer=None, return make_variant_based_on_manufacturer(item_template, manufacturer, manufacturer_part_no) else: - if isinstance(args, string_types): + if isinstance(args, str): args = json.loads(args) if not args: @@ -54,7 +53,7 @@ def make_variant_based_on_manufacturer(template, manufacturer, manufacturer_part return variant def validate_item_variant_attributes(item, args=None): - if isinstance(item, string_types): + if isinstance(item, str): item = frappe.get_doc('Item', item) if not args: @@ -156,7 +155,7 @@ def find_variant(template, args, variant_item_code=None): @frappe.whitelist() def create_variant(item, args): - if isinstance(args, string_types): + if isinstance(args, str): args = json.loads(args) template = frappe.get_doc("Item", item) @@ -179,7 +178,7 @@ def create_variant(item, args): @frappe.whitelist() def enqueue_multiple_variant_creation(item, args): # There can be innumerable attribute combinations, enqueue - if isinstance(args, string_types): + if isinstance(args, str): variants = json.loads(args) total_variants = 1 for key in variants: @@ -196,7 +195,7 @@ def enqueue_multiple_variant_creation(item, args): def create_multiple_variants(item, args): count = 0 - if isinstance(args, string_types): + if isinstance(args, str): args = json.loads(args) args_set = generate_keyed_value_combinations(args) diff --git a/erpnext/controllers/taxes_and_totals.py b/erpnext/controllers/taxes_and_totals.py index aac72ab10e5..667edab06a4 100644 --- a/erpnext/controllers/taxes_and_totals.py +++ b/erpnext/controllers/taxes_and_totals.py @@ -176,7 +176,7 @@ class calculate_taxes_and_totals(object): self.doc.round_floats_in(tax) def determine_exclusive_rate(self): - if not any((cint(tax.included_in_print_rate) for tax in self.doc.get("taxes"))): + if not any(cint(tax.included_in_print_rate) for tax in self.doc.get("taxes")): return for item in self.doc.get("items"): diff --git a/erpnext/controllers/tests/test_item_variant.py b/erpnext/controllers/tests/test_item_variant.py index 391b5ec8819..5c6e06a7d73 100644 --- a/erpnext/controllers/tests/test_item_variant.py +++ b/erpnext/controllers/tests/test_item_variant.py @@ -1,9 +1,7 @@ - import json import unittest import frappe -from six import string_types from erpnext.controllers.item_variant import copy_attributes_to_variant, make_variant_item_code from erpnext.stock.doctype.item.test_item import set_item_variant_settings @@ -20,7 +18,7 @@ class TestItemVariant(unittest.TestCase): self.assertEqual(variant.get("quality_inspection_template"), "_Test QC Template") def create_variant_with_tables(item, args): - if isinstance(args, string_types): + if isinstance(args, str): args = json.loads(args) qc_name = make_quality_inspection_template() diff --git a/erpnext/controllers/tests/test_mapper.py b/erpnext/controllers/tests/test_mapper.py index 0d8789abef6..e75587607ec 100644 --- a/erpnext/controllers/tests/test_mapper.py +++ b/erpnext/controllers/tests/test_mapper.py @@ -1,4 +1,3 @@ - import json import unittest diff --git a/erpnext/controllers/tests/test_qty_based_taxes.py b/erpnext/controllers/tests/test_qty_based_taxes.py index 226778db014..49b844bf7e8 100644 --- a/erpnext/controllers/tests/test_qty_based_taxes.py +++ b/erpnext/controllers/tests/test_qty_based_taxes.py @@ -1,4 +1,3 @@ - import unittest from uuid import uuid4 as _uuid4 diff --git a/erpnext/crm/doctype/contract_template/contract_template.py b/erpnext/crm/doctype/contract_template/contract_template.py index 8adbb4e25e4..7439e4c9171 100644 --- a/erpnext/crm/doctype/contract_template/contract_template.py +++ b/erpnext/crm/doctype/contract_template/contract_template.py @@ -7,7 +7,6 @@ import json import frappe from frappe.model.document import Document from frappe.utils.jinja import validate_template -from six import string_types class ContractTemplate(Document): @@ -17,7 +16,7 @@ class ContractTemplate(Document): @frappe.whitelist() def get_contract_template(template_name, doc): - if isinstance(doc, string_types): + if isinstance(doc, str): doc = json.loads(doc) contract_template = frappe.get_doc("Contract Template", template_name) diff --git a/erpnext/crm/doctype/lead/lead_dashboard.py b/erpnext/crm/doctype/lead/lead_dashboard.py index 37e28e0e1ac..017390dc83e 100644 --- a/erpnext/crm/doctype/lead/lead_dashboard.py +++ b/erpnext/crm/doctype/lead/lead_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'lead', diff --git a/erpnext/crm/doctype/opportunity/opportunity_dashboard.py b/erpnext/crm/doctype/opportunity/opportunity_dashboard.py index 5d42482c02c..708fb12f1a3 100644 --- a/erpnext/crm/doctype/opportunity/opportunity_dashboard.py +++ b/erpnext/crm/doctype/opportunity/opportunity_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'opportunity', diff --git a/erpnext/crm/doctype/utils.py b/erpnext/crm/doctype/utils.py index 0da0e0e71af..9b56170da31 100644 --- a/erpnext/crm/doctype/utils.py +++ b/erpnext/crm/doctype/utils.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/crm/report/opportunity_summary_by_sales_stage/opportunity_summary_by_sales_stage.py b/erpnext/crm/report/opportunity_summary_by_sales_stage/opportunity_summary_by_sales_stage.py index 4cff13f2321..f53b5bde9ee 100644 --- a/erpnext/crm/report/opportunity_summary_by_sales_stage/opportunity_summary_by_sales_stage.py +++ b/erpnext/crm/report/opportunity_summary_by_sales_stage/opportunity_summary_by_sales_stage.py @@ -6,7 +6,6 @@ import frappe import pandas from frappe import _ from frappe.utils import flt -from six import iteritems from erpnext.setup.utils import get_exchange_rate @@ -126,7 +125,7 @@ class OpportunitySummaryBySalesStage(object): self.data = [] self.get_formatted_data() - for based_on,data in iteritems(self.formatted_data): + for based_on,data in self.formatted_data.items(): row_based_on={ 'Opportunity Owner': 'opportunity_owner', 'Source': 'source', @@ -251,4 +250,4 @@ class OpportunitySummaryBySalesStage(object): if data.get('currency') != default_currency: opportunity_currency = data.get('currency') value = self.currency_conversion(opportunity_currency,default_currency) - data['amount'] = data['amount'] * value \ No newline at end of file + data['amount'] = data['amount'] * value diff --git a/erpnext/crm/report/sales_pipeline_analytics/sales_pipeline_analytics.py b/erpnext/crm/report/sales_pipeline_analytics/sales_pipeline_analytics.py index 7466982d924..1c7846b120d 100644 --- a/erpnext/crm/report/sales_pipeline_analytics/sales_pipeline_analytics.py +++ b/erpnext/crm/report/sales_pipeline_analytics/sales_pipeline_analytics.py @@ -9,7 +9,6 @@ import pandas from dateutil.relativedelta import relativedelta from frappe import _ from frappe.utils import cint, flt -from six import iteritems from erpnext.setup.utils import get_exchange_rate @@ -295,7 +294,7 @@ class SalesPipelineAnalytics(object): def append_data(self, pipeline_by, period_by): self.data = [] - for pipeline,period_data in iteritems(self.periodic_data): + for pipeline,period_data in self.periodic_data.items(): row = {pipeline_by : pipeline} for info in self.query_result: if self.filters.get('range') == 'Monthly': @@ -330,4 +329,4 @@ class SalesPipelineAnalytics(object): if data.get('currency') != default_currency: opportunity_currency = data.get('currency') value = self.get_currency_rate(opportunity_currency,default_currency) - data['amount'] = data['amount'] * value \ No newline at end of file + data['amount'] = data['amount'] * value diff --git a/erpnext/demo/demo.py b/erpnext/demo/demo.py index e1bf8d0fdd9..4a18a99f41f 100644 --- a/erpnext/demo/demo.py +++ b/erpnext/demo/demo.py @@ -1,4 +1,3 @@ - import sys import frappe diff --git a/erpnext/demo/domains.py b/erpnext/demo/domains.py index 89bd9ab34a9..5fa181dfa4c 100644 --- a/erpnext/demo/domains.py +++ b/erpnext/demo/domains.py @@ -1,4 +1,3 @@ - data = { 'Manufacturing': { 'company_name': 'Wind Power LLC' diff --git a/erpnext/demo/setup/manufacture.py b/erpnext/demo/setup/manufacture.py index ec6d2810b74..fe1a1fb2034 100644 --- a/erpnext/demo/setup/manufacture.py +++ b/erpnext/demo/setup/manufacture.py @@ -1,10 +1,8 @@ - import json import random import frappe from frappe.utils import add_days, nowdate -from six import iteritems from erpnext.demo.domains import data from erpnext.demo.setup.setup_data import import_json @@ -130,7 +128,7 @@ def setup_item_price(): } for price_list in ("standard_buying", "standard_selling"): - for item, rate in iteritems(locals().get(price_list)): + for item, rate in locals().get(price_list).items(): frappe.get_doc({ "doctype": "Item Price", "price_list": price_list.replace("_", " ").title(), diff --git a/erpnext/demo/setup/retail.py b/erpnext/demo/setup/retail.py index 3d2c8b6e822..0469264da1e 100644 --- a/erpnext/demo/setup/retail.py +++ b/erpnext/demo/setup/retail.py @@ -1,8 +1,6 @@ - import json import frappe -from six import iteritems from erpnext.demo.domains import data @@ -52,7 +50,7 @@ def setup_item_price(): } for price_list in ("standard_buying", "standard_selling"): - for item, rate in iteritems(locals().get(price_list)): + for item, rate in locals().get(price_list).items(): frappe.get_doc({ "doctype": "Item Price", "price_list": price_list.replace("_", " ").title(), diff --git a/erpnext/demo/setup/setup_data.py b/erpnext/demo/setup/setup_data.py index 1ce995a3a9b..7137c6ef564 100644 --- a/erpnext/demo/setup/setup_data.py +++ b/erpnext/demo/setup/setup_data.py @@ -1,4 +1,3 @@ - import json import random diff --git a/erpnext/demo/user/accounts.py b/erpnext/demo/user/accounts.py index f0ac173a4a9..273a3f92f3b 100644 --- a/erpnext/demo/user/accounts.py +++ b/erpnext/demo/user/accounts.py @@ -1,4 +1,3 @@ - # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt diff --git a/erpnext/demo/user/education.py b/erpnext/demo/user/education.py index 270333c1d2c..47519c16642 100644 --- a/erpnext/demo/user/education.py +++ b/erpnext/demo/user/education.py @@ -1,4 +1,3 @@ - # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt diff --git a/erpnext/demo/user/fixed_asset.py b/erpnext/demo/user/fixed_asset.py index 0e66ec04051..72cd420550a 100644 --- a/erpnext/demo/user/fixed_asset.py +++ b/erpnext/demo/user/fixed_asset.py @@ -1,4 +1,3 @@ - # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt diff --git a/erpnext/demo/user/hr.py b/erpnext/demo/user/hr.py index 3d1a013956a..f84a853a791 100644 --- a/erpnext/demo/user/hr.py +++ b/erpnext/demo/user/hr.py @@ -1,4 +1,3 @@ - import datetime import random diff --git a/erpnext/domains/agriculture.py b/erpnext/domains/agriculture.py index de27a7a2c24..e5414a9c090 100644 --- a/erpnext/domains/agriculture.py +++ b/erpnext/domains/agriculture.py @@ -1,4 +1,3 @@ - data = { 'desktop_icons': [ 'Agriculture Task', diff --git a/erpnext/domains/distribution.py b/erpnext/domains/distribution.py index 68ac0c3ec5e..020ab3b83b1 100644 --- a/erpnext/domains/distribution.py +++ b/erpnext/domains/distribution.py @@ -1,4 +1,3 @@ - data = { 'desktop_icons': [ 'Item', diff --git a/erpnext/domains/education.py b/erpnext/domains/education.py index d0e597e7b7f..11ea9b4022e 100644 --- a/erpnext/domains/education.py +++ b/erpnext/domains/education.py @@ -1,4 +1,3 @@ - data = { 'desktop_icons': [ 'Student', diff --git a/erpnext/domains/hospitality.py b/erpnext/domains/hospitality.py index 5d2a22597e3..09b98c288bf 100644 --- a/erpnext/domains/hospitality.py +++ b/erpnext/domains/hospitality.py @@ -1,4 +1,3 @@ - data = { 'desktop_icons': [ 'Restaurant', diff --git a/erpnext/domains/manufacturing.py b/erpnext/domains/manufacturing.py index 0cd51cf7926..96ce1945a48 100644 --- a/erpnext/domains/manufacturing.py +++ b/erpnext/domains/manufacturing.py @@ -1,4 +1,3 @@ - data = { 'desktop_icons': [ 'Item', diff --git a/erpnext/domains/non_profit.py b/erpnext/domains/non_profit.py index 22f05c9e7df..d9fc5e5df01 100644 --- a/erpnext/domains/non_profit.py +++ b/erpnext/domains/non_profit.py @@ -1,4 +1,3 @@ - data = { 'desktop_icons': [ 'Non Profit', diff --git a/erpnext/domains/retail.py b/erpnext/domains/retail.py index 17578d7ddcd..07b2e2781ec 100644 --- a/erpnext/domains/retail.py +++ b/erpnext/domains/retail.py @@ -1,4 +1,3 @@ - data = { 'desktop_icons': [ 'POS', diff --git a/erpnext/domains/services.py b/erpnext/domains/services.py index 39a554f29df..6035afbcf04 100644 --- a/erpnext/domains/services.py +++ b/erpnext/domains/services.py @@ -1,4 +1,3 @@ - data = { 'desktop_icons': [ 'Project', diff --git a/erpnext/education/__init__.py b/erpnext/education/__init__.py index cf8efde7df3..56c2b29fde6 100644 --- a/erpnext/education/__init__.py +++ b/erpnext/education/__init__.py @@ -1,4 +1,3 @@ - import frappe from frappe import _ diff --git a/erpnext/education/doctype/academic_term/academic_term_dashboard.py b/erpnext/education/doctype/academic_term/academic_term_dashboard.py index 97f581a1e02..c686b09b9e7 100644 --- a/erpnext/education/doctype/academic_term/academic_term_dashboard.py +++ b/erpnext/education/doctype/academic_term/academic_term_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/education/doctype/academic_year/academic_year_dashboard.py b/erpnext/education/doctype/academic_year/academic_year_dashboard.py index 3615fd1c374..ede2411dc34 100644 --- a/erpnext/education/doctype/academic_year/academic_year_dashboard.py +++ b/erpnext/education/doctype/academic_year/academic_year_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/education/doctype/course_schedule/course_schedule.py b/erpnext/education/doctype/course_schedule/course_schedule.py index 335b6d28d0c..ffd323d3d2a 100644 --- a/erpnext/education/doctype/course_schedule/course_schedule.py +++ b/erpnext/education/doctype/course_schedule/course_schedule.py @@ -1,4 +1,4 @@ - # -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt diff --git a/erpnext/education/doctype/grading_scale/grading_scale_dashboard.py b/erpnext/education/doctype/grading_scale/grading_scale_dashboard.py index 44313f2bbca..b8ae8b08a98 100644 --- a/erpnext/education/doctype/grading_scale/grading_scale_dashboard.py +++ b/erpnext/education/doctype/grading_scale/grading_scale_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/education/doctype/program_enrollment/program_enrollment_dashboard.py b/erpnext/education/doctype/program_enrollment/program_enrollment_dashboard.py index 81bb30b1da5..14ed95d48cd 100644 --- a/erpnext/education/doctype/program_enrollment/program_enrollment_dashboard.py +++ b/erpnext/education/doctype/program_enrollment/program_enrollment_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/education/doctype/student/student_dashboard.py b/erpnext/education/doctype/student/student_dashboard.py index efd5dc9104a..3ae772dd907 100644 --- a/erpnext/education/doctype/student/student_dashboard.py +++ b/erpnext/education/doctype/student/student_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/education/doctype/student_applicant/student_applicant.py b/erpnext/education/doctype/student_applicant/student_applicant.py index 62407bef028..5dae9f6ee7d 100644 --- a/erpnext/education/doctype/student_applicant/student_applicant.py +++ b/erpnext/education/doctype/student_applicant/student_applicant.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*-777777yyy # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt diff --git a/erpnext/education/doctype/student_attendance/student_attendance_dashboard.py b/erpnext/education/doctype/student_attendance/student_attendance_dashboard.py index 97547992043..67584529699 100644 --- a/erpnext/education/doctype/student_attendance/student_attendance_dashboard.py +++ b/erpnext/education/doctype/student_attendance/student_attendance_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/education/doctype/student_category/student_category_dashboard.py b/erpnext/education/doctype/student_category/student_category_dashboard.py index be1e0054915..ebb639e46ef 100644 --- a/erpnext/education/doctype/student_category/student_category_dashboard.py +++ b/erpnext/education/doctype/student_category/student_category_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/education/doctype/student_leave_application/student_leave_application_dashboard.py b/erpnext/education/doctype/student_leave_application/student_leave_application_dashboard.py index fca5ad6ed56..d01790d645a 100644 --- a/erpnext/education/doctype/student_leave_application/student_leave_application_dashboard.py +++ b/erpnext/education/doctype/student_leave_application/student_leave_application_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'leave_application', diff --git a/erpnext/education/web_form/student_applicant/student_applicant.py b/erpnext/education/web_form/student_applicant/student_applicant.py index 19b550feea7..02e3e933330 100644 --- a/erpnext/education/web_form/student_applicant/student_applicant.py +++ b/erpnext/education/web_form/student_applicant/student_applicant.py @@ -1,5 +1,3 @@ - - def get_context(context): # do your magic here pass diff --git a/erpnext/erpnext_integrations/connectors/woocommerce_connection.py b/erpnext/erpnext_integrations/connectors/woocommerce_connection.py index fdeb32da7a8..f5f9ce3b16a 100644 --- a/erpnext/erpnext_integrations/connectors/woocommerce_connection.py +++ b/erpnext/erpnext_integrations/connectors/woocommerce_connection.py @@ -1,5 +1,3 @@ - - import base64 import hashlib import hmac diff --git a/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/__init__.py b/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/__init__.py index d7ebf59ea8e..1d0dfa5c696 100644 --- a/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/__init__.py +++ b/erpnext/erpnext_integrations/data_migration_mapping/issue_to_task/__init__.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/__init__.py b/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/__init__.py index 7dd0c8658d1..212f81b5f9f 100644 --- a/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/__init__.py +++ b/erpnext/erpnext_integrations/data_migration_mapping/milestone_to_project/__init__.py @@ -1,5 +1,3 @@ - - def pre_process(milestone): return { 'title': milestone.title, diff --git a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_methods.py b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_methods.py index 7feca83e0f0..66826ba8d75 100644 --- a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_methods.py +++ b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_methods.py @@ -30,7 +30,7 @@ def get_products_details(): #Get ASIN Codes string_io = StringIO(frappe.safe_decode(listings_response.original)) - csv_rows = list(csv.reader(string_io, delimiter=str('\t'))) + csv_rows = list(csv.reader(string_io, delimiter='\t')) asin_list = list(set([row[1] for row in csv_rows[1:]])) #break into chunks of 10 asin_chunked_list = list(chunks(asin_list, 10)) diff --git a/erpnext/erpnext_integrations/utils.py b/erpnext/erpnext_integrations/utils.py index 57c43675ffa..b52c3fc2a87 100644 --- a/erpnext/erpnext_integrations/utils.py +++ b/erpnext/erpnext_integrations/utils.py @@ -1,4 +1,3 @@ - import base64 import hashlib import hmac diff --git a/erpnext/exceptions.py b/erpnext/exceptions.py index cfd2a7ce049..8d6f13a77e6 100644 --- a/erpnext/exceptions.py +++ b/erpnext/exceptions.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/hooks.py b/erpnext/hooks.py index bc8ef820e92..2a277ee0350 100644 --- a/erpnext/hooks.py +++ b/erpnext/hooks.py @@ -1,4 +1,3 @@ - from frappe import _ app_name = "erpnext" diff --git a/erpnext/hr/doctype/appraisal_template/appraisal_template_dashboard.py b/erpnext/hr/doctype/appraisal_template/appraisal_template_dashboard.py index f52e2b027ca..116a3f9118a 100644 --- a/erpnext/hr/doctype/appraisal_template/appraisal_template_dashboard.py +++ b/erpnext/hr/doctype/appraisal_template/appraisal_template_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'kra_template', diff --git a/erpnext/hr/doctype/attendance/attendance_dashboard.py b/erpnext/hr/doctype/attendance/attendance_dashboard.py index f466534d2c7..4bb36a0d7fd 100644 --- a/erpnext/hr/doctype/attendance/attendance_dashboard.py +++ b/erpnext/hr/doctype/attendance/attendance_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'attendance', diff --git a/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py b/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py index b23e0fd93a2..91970575a13 100644 --- a/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py +++ b/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'attendance_request', diff --git a/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py b/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py index 38e1f54ba96..fe11c47e60c 100644 --- a/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py +++ b/erpnext/hr/doctype/daily_work_summary/daily_work_summary.py @@ -7,7 +7,6 @@ from email_reply_parser import EmailReplyParser from frappe import _ from frappe.model.document import Document from frappe.utils import global_date_format -from six import string_types class DailyWorkSummary(Document): @@ -107,7 +106,7 @@ def get_user_emails_from_group(group): :param group: Daily Work Summary Group `name`''' group_doc = group - if isinstance(group_doc, string_types): + if isinstance(group_doc, str): group_doc = frappe.get_doc('Daily Work Summary Group', group) emails = get_users_email(group_doc) diff --git a/erpnext/hr/doctype/daily_work_summary_group/daily_work_summary_group.py b/erpnext/hr/doctype/daily_work_summary_group/daily_work_summary_group.py index 306f43a418f..ed98168aef7 100644 --- a/erpnext/hr/doctype/daily_work_summary_group/daily_work_summary_group.py +++ b/erpnext/hr/doctype/daily_work_summary_group/daily_work_summary_group.py @@ -1,4 +1,3 @@ -# # -*- coding: utf-8 -*- # # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # # For license information, please see license.txt diff --git a/erpnext/hr/doctype/employee/employee_dashboard.py b/erpnext/hr/doctype/employee/employee_dashboard.py index 0aaff52ee28..a4c0af0a4bf 100644 --- a/erpnext/hr/doctype/employee/employee_dashboard.py +++ b/erpnext/hr/doctype/employee/employee_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/hr/doctype/employee_advance/employee_advance_dashboard.py b/erpnext/hr/doctype/employee_advance/employee_advance_dashboard.py index 089bd2c1b5c..9450258a8a2 100644 --- a/erpnext/hr/doctype/employee_advance/employee_advance_dashboard.py +++ b/erpnext/hr/doctype/employee_advance/employee_advance_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'employee_advance', diff --git a/erpnext/hr/doctype/employee_grade/employee_grade_dashboard.py b/erpnext/hr/doctype/employee_grade/employee_grade_dashboard.py index 1dd6ad3b15a..6825dae2506 100644 --- a/erpnext/hr/doctype/employee_grade/employee_grade_dashboard.py +++ b/erpnext/hr/doctype/employee_grade/employee_grade_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'transactions': [ diff --git a/erpnext/hr/doctype/employee_onboarding_template/employee_onboarding_template_dashboard.py b/erpnext/hr/doctype/employee_onboarding_template/employee_onboarding_template_dashboard.py index 48f2c1d2709..3b846a0e406 100644 --- a/erpnext/hr/doctype/employee_onboarding_template/employee_onboarding_template_dashboard.py +++ b/erpnext/hr/doctype/employee_onboarding_template/employee_onboarding_template_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'employee_onboarding_template', diff --git a/erpnext/hr/doctype/employee_referral/employee_referral.py b/erpnext/hr/doctype/employee_referral/employee_referral.py index 4e1780b9978..eaa42c7b4ca 100644 --- a/erpnext/hr/doctype/employee_referral/employee_referral.py +++ b/erpnext/hr/doctype/employee_referral/employee_referral.py @@ -60,9 +60,8 @@ def create_job_applicant(source_name, target_doc=None): def create_additional_salary(doc): import json - from six import string_types - if isinstance(doc, string_types): + if isinstance(doc, str): doc = frappe._dict(json.loads(doc)) if not frappe.db.exists("Additional Salary", {"ref_docname": doc.name}): diff --git a/erpnext/hr/doctype/employee_referral/employee_referral_dashboard.py b/erpnext/hr/doctype/employee_referral/employee_referral_dashboard.py index 1733ac9726e..07c2402e1a4 100644 --- a/erpnext/hr/doctype/employee_referral/employee_referral_dashboard.py +++ b/erpnext/hr/doctype/employee_referral/employee_referral_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'employee_referral', diff --git a/erpnext/hr/doctype/employee_separation_template/employee_separation_template_dashboard.py b/erpnext/hr/doctype/employee_separation_template/employee_separation_template_dashboard.py index f165d0a0eb4..6e2a83eaa70 100644 --- a/erpnext/hr/doctype/employee_separation_template/employee_separation_template_dashboard.py +++ b/erpnext/hr/doctype/employee_separation_template/employee_separation_template_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'employee_separation_template', diff --git a/erpnext/hr/doctype/expense_claim/expense_claim_dashboard.py b/erpnext/hr/doctype/expense_claim/expense_claim_dashboard.py index 44052cc8e6b..7539c7165d0 100644 --- a/erpnext/hr/doctype/expense_claim/expense_claim_dashboard.py +++ b/erpnext/hr/doctype/expense_claim/expense_claim_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py b/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py index e074e266b87..4a540ce610d 100644 --- a/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py +++ b/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'holiday_list', diff --git a/erpnext/hr/doctype/interview/interview.py b/erpnext/hr/doctype/interview/interview.py index f5312476a28..4bb003ded18 100644 --- a/erpnext/hr/doctype/interview/interview.py +++ b/erpnext/hr/doctype/interview/interview.py @@ -190,9 +190,8 @@ def get_expected_skill_set(interview_round): def create_interview_feedback(data, interview_name, interviewer, job_applicant): import json - from six import string_types - if isinstance(data, string_types): + if isinstance(data, str): data = frappe._dict(json.loads(data)) if frappe.session.user != interviewer: @@ -288,4 +287,4 @@ def get_events(start, end, filters=None): events.append(interview_data) - return events \ No newline at end of file + return events diff --git a/erpnext/hr/doctype/job_applicant/job_applicant.py b/erpnext/hr/doctype/job_applicant/job_applicant.py index f0b470b35e8..abaa50c84ce 100644 --- a/erpnext/hr/doctype/job_applicant/job_applicant.py +++ b/erpnext/hr/doctype/job_applicant/job_applicant.py @@ -48,9 +48,8 @@ class JobApplicant(Document): def create_interview(doc, interview_round): import json - from six import string_types - if isinstance(doc, string_types): + if isinstance(doc, str): doc = json.loads(doc) doc = frappe.get_doc(doc) diff --git a/erpnext/hr/doctype/job_applicant/job_applicant_dashboard.py b/erpnext/hr/doctype/job_applicant/job_applicant_dashboard.py index 9406fc54855..56331ac132f 100644 --- a/erpnext/hr/doctype/job_applicant/job_applicant_dashboard.py +++ b/erpnext/hr/doctype/job_applicant/job_applicant_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'job_applicant', diff --git a/erpnext/hr/doctype/job_opening/job_opening_dashboard.py b/erpnext/hr/doctype/job_opening/job_opening_dashboard.py index 817969004f9..67600dc20e2 100644 --- a/erpnext/hr/doctype/job_opening/job_opening_dashboard.py +++ b/erpnext/hr/doctype/job_opening/job_opening_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'job_title', diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation_dashboard.py b/erpnext/hr/doctype/leave_allocation/leave_allocation_dashboard.py index 08861b8bce3..631beef4359 100644 --- a/erpnext/hr/doctype/leave_allocation/leave_allocation_dashboard.py +++ b/erpnext/hr/doctype/leave_allocation/leave_allocation_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'leave_allocation', diff --git a/erpnext/hr/doctype/leave_allocation/test_leave_allocation.py b/erpnext/hr/doctype/leave_allocation/test_leave_allocation.py index f6165b3a6f1..46401a2dd8c 100644 --- a/erpnext/hr/doctype/leave_allocation/test_leave_allocation.py +++ b/erpnext/hr/doctype/leave_allocation/test_leave_allocation.py @@ -1,4 +1,3 @@ - import unittest import frappe diff --git a/erpnext/hr/doctype/leave_application/leave_application_dashboard.py b/erpnext/hr/doctype/leave_application/leave_application_dashboard.py index d56133b5660..8b0b98ddc06 100644 --- a/erpnext/hr/doctype/leave_application/leave_application_dashboard.py +++ b/erpnext/hr/doctype/leave_application/leave_application_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/hr/doctype/leave_block_list/leave_block_list_dashboard.py b/erpnext/hr/doctype/leave_block_list/leave_block_list_dashboard.py index f91a8fe5201..7cca62e0f56 100644 --- a/erpnext/hr/doctype/leave_block_list/leave_block_list_dashboard.py +++ b/erpnext/hr/doctype/leave_block_list/leave_block_list_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'leave_block_list', diff --git a/erpnext/hr/doctype/leave_period/leave_period_dashboard.py b/erpnext/hr/doctype/leave_period/leave_period_dashboard.py index fbe56e2b700..1adae0fda3f 100644 --- a/erpnext/hr/doctype/leave_period/leave_period_dashboard.py +++ b/erpnext/hr/doctype/leave_period/leave_period_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py b/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py index 8311fd2f93e..73782d6c818 100644 --- a/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py +++ b/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment.py b/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment.py index 2ffec79c697..dca7e4895ec 100644 --- a/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment.py +++ b/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment.py @@ -9,7 +9,6 @@ import frappe from frappe import _, bold from frappe.model.document import Document from frappe.utils import date_diff, flt, formatdate, get_datetime, getdate -from six import string_types class LeavePolicyAssignment(Document): @@ -138,10 +137,10 @@ class LeavePolicyAssignment(Document): @frappe.whitelist() def create_assignment_for_multiple_employees(employees, data): - if isinstance(employees, string_types): + if isinstance(employees, str): employees= json.loads(employees) - if isinstance(data, string_types): + if isinstance(data, str): data = frappe._dict(json.loads(data)) docs_name = [] diff --git a/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment_dashboard.py b/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment_dashboard.py index ec6592cb72a..4363439b7ca 100644 --- a/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment_dashboard.py +++ b/erpnext/hr/doctype/leave_policy_assignment/leave_policy_assignment_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/hr/doctype/leave_type/leave_type_dashboard.py b/erpnext/hr/doctype/leave_type/leave_type_dashboard.py index 8dc9402d1eb..074d3e4e52a 100644 --- a/erpnext/hr/doctype/leave_type/leave_type_dashboard.py +++ b/erpnext/hr/doctype/leave_type/leave_type_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'leave_type', diff --git a/erpnext/hr/doctype/shift_request/shift_request_dashboard.py b/erpnext/hr/doctype/shift_request/shift_request_dashboard.py index cd4519e8797..531c98db5f8 100644 --- a/erpnext/hr/doctype/shift_request/shift_request_dashboard.py +++ b/erpnext/hr/doctype/shift_request/shift_request_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'shift_request', diff --git a/erpnext/hr/doctype/shift_type/shift_type_dashboard.py b/erpnext/hr/doctype/shift_type/shift_type_dashboard.py index b523f0e01ce..919da2db275 100644 --- a/erpnext/hr/doctype/shift_type/shift_type_dashboard.py +++ b/erpnext/hr/doctype/shift_type/shift_type_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'shift', diff --git a/erpnext/hr/doctype/staffing_plan/staffing_plan_dashboard.py b/erpnext/hr/doctype/staffing_plan/staffing_plan_dashboard.py index c04e5853a52..abde0d5a519 100644 --- a/erpnext/hr/doctype/staffing_plan/staffing_plan_dashboard.py +++ b/erpnext/hr/doctype/staffing_plan/staffing_plan_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'staffing_plan', diff --git a/erpnext/hr/doctype/training_event/training_event_dashboard.py b/erpnext/hr/doctype/training_event/training_event_dashboard.py index 8c4162d5010..141fffc2826 100644 --- a/erpnext/hr/doctype/training_event/training_event_dashboard.py +++ b/erpnext/hr/doctype/training_event/training_event_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'training_event', diff --git a/erpnext/hr/doctype/training_program/training_program_dashboard.py b/erpnext/hr/doctype/training_program/training_program_dashboard.py index 51137d162c7..374c1e8913c 100644 --- a/erpnext/hr/doctype/training_program/training_program_dashboard.py +++ b/erpnext/hr/doctype/training_program/training_program_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/hr/doctype/vehicle/vehicle_dashboard.py b/erpnext/hr/doctype/vehicle/vehicle_dashboard.py index bb38ab9d6b5..f6e5f06d8cb 100644 --- a/erpnext/hr/doctype/vehicle/vehicle_dashboard.py +++ b/erpnext/hr/doctype/vehicle/vehicle_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/hr/notification/training_feedback/training_feedback.py b/erpnext/hr/notification/training_feedback/training_feedback.py index 19b550feea7..02e3e933330 100644 --- a/erpnext/hr/notification/training_feedback/training_feedback.py +++ b/erpnext/hr/notification/training_feedback/training_feedback.py @@ -1,5 +1,3 @@ - - def get_context(context): # do your magic here pass diff --git a/erpnext/hr/notification/training_scheduled/training_scheduled.py b/erpnext/hr/notification/training_scheduled/training_scheduled.py index 19b550feea7..02e3e933330 100644 --- a/erpnext/hr/notification/training_scheduled/training_scheduled.py +++ b/erpnext/hr/notification/training_scheduled/training_scheduled.py @@ -1,5 +1,3 @@ - - def get_context(context): # do your magic here pass diff --git a/erpnext/hr/page/organizational_chart/organizational_chart.py b/erpnext/hr/page/organizational_chart/organizational_chart.py index 01d95a7051a..1e2d7581795 100644 --- a/erpnext/hr/page/organizational_chart/organizational_chart.py +++ b/erpnext/hr/page/organizational_chart/organizational_chart.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/hr/page/team_updates/team_updates.py b/erpnext/hr/page/team_updates/team_updates.py index 126ed898c97..0a4624c531e 100644 --- a/erpnext/hr/page/team_updates/team_updates.py +++ b/erpnext/hr/page/team_updates/team_updates.py @@ -1,4 +1,3 @@ - import frappe from email_reply_parser import EmailReplyParser diff --git a/erpnext/hr/web_form/job_application/job_application.py b/erpnext/hr/web_form/job_application/job_application.py index 19b550feea7..02e3e933330 100644 --- a/erpnext/hr/web_form/job_application/job_application.py +++ b/erpnext/hr/web_form/job_application/job_application.py @@ -1,5 +1,3 @@ - - def get_context(context): # do your magic here pass diff --git a/erpnext/loan_management/dashboard_chart_source/top_10_pledged_loan_securities/top_10_pledged_loan_securities.py b/erpnext/loan_management/dashboard_chart_source/top_10_pledged_loan_securities/top_10_pledged_loan_securities.py index 9512c8fa195..6144d9d39a4 100644 --- a/erpnext/loan_management/dashboard_chart_source/top_10_pledged_loan_securities/top_10_pledged_loan_securities.py +++ b/erpnext/loan_management/dashboard_chart_source/top_10_pledged_loan_securities/top_10_pledged_loan_securities.py @@ -4,7 +4,6 @@ import frappe from frappe.utils.dashboard import cache_source -from six import iteritems from erpnext.loan_management.report.applicant_wise_loan_security_exposure.applicant_wise_loan_security_exposure import ( get_loan_security_details, @@ -53,14 +52,14 @@ def get_data(chart_name = None, chart = None, no_cache = None, filters = None, f GROUP BY p.loan_security """.format(conditions=conditions), filters, as_list=1)) - for security, qty in iteritems(pledges): + for security, qty in pledges.items(): current_pledges.setdefault(security, qty) current_pledges[security] -= unpledges.get(security, 0.0) sorted_pledges = dict(sorted(current_pledges.items(), key=lambda item: item[1], reverse=True)) count = 0 - for security, qty in iteritems(sorted_pledges): + for security, qty in sorted_pledges.items(): values.append(qty * loan_security_details.get(security, {}).get('latest_price', 0)) labels.append(security) count +=1 diff --git a/erpnext/loan_management/doctype/loan/loan.py b/erpnext/loan_management/doctype/loan/loan.py index 423807a9e2b..84e0f03bae9 100644 --- a/erpnext/loan_management/doctype/loan/loan.py +++ b/erpnext/loan_management/doctype/loan/loan.py @@ -8,7 +8,6 @@ import math import frappe from frappe import _ from frappe.utils import add_months, flt, getdate, now_datetime, nowdate -from six import string_types import erpnext from erpnext.controllers.accounts_controller import AccountsController @@ -321,7 +320,7 @@ def make_loan_write_off(loan, company=None, posting_date=None, amount=0, as_dict @frappe.whitelist() def unpledge_security(loan=None, loan_security_pledge=None, security_map=None, as_dict=0, save=0, submit=0, approve=0): # if no security_map is passed it will be considered as full unpledge - if security_map and isinstance(security_map, string_types): + if security_map and isinstance(security_map, str): security_map = json.loads(security_map) if loan: diff --git a/erpnext/loan_management/doctype/loan/loan_dashboard.py b/erpnext/loan_management/doctype/loan/loan_dashboard.py index 0374eda4991..c8a9e64f5ef 100644 --- a/erpnext/loan_management/doctype/loan/loan_dashboard.py +++ b/erpnext/loan_management/doctype/loan/loan_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'loan', diff --git a/erpnext/loan_management/doctype/loan_application/loan_application.py b/erpnext/loan_management/doctype/loan_application/loan_application.py index d2eb53b10b7..24d8d68de0b 100644 --- a/erpnext/loan_management/doctype/loan_application/loan_application.py +++ b/erpnext/loan_management/doctype/loan_application/loan_application.py @@ -10,7 +10,6 @@ from frappe import _ from frappe.model.document import Document from frappe.model.mapper import get_mapped_doc from frappe.utils import cint, flt, rounded -from six import string_types from erpnext.loan_management.doctype.loan.loan import ( get_monthly_repayment_amount, @@ -190,7 +189,7 @@ def create_pledge(loan_application, loan=None): #This is a sandbox method to get the proposed pledges @frappe.whitelist() def get_proposed_pledge(securities): - if isinstance(securities, string_types): + if isinstance(securities, str): securities = json.loads(securities) proposed_pledges = { diff --git a/erpnext/loan_management/doctype/loan_application/loan_application_dashboard.py b/erpnext/loan_management/doctype/loan_application/loan_application_dashboard.py index 01ef9f9d78a..e8e2a2a0de6 100644 --- a/erpnext/loan_management/doctype/loan_application/loan_application_dashboard.py +++ b/erpnext/loan_management/doctype/loan_application/loan_application_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'loan_application', diff --git a/erpnext/loan_management/doctype/loan_repayment/loan_repayment.py b/erpnext/loan_management/doctype/loan_repayment/loan_repayment.py index 42f9a2cc1d4..5922e4f902a 100644 --- a/erpnext/loan_management/doctype/loan_repayment/loan_repayment.py +++ b/erpnext/loan_management/doctype/loan_repayment/loan_repayment.py @@ -5,7 +5,6 @@ import frappe from frappe import _ from frappe.utils import add_days, cint, date_diff, flt, get_datetime, getdate -from six import iteritems import erpnext from erpnext.accounts.general_ledger import make_gl_entries @@ -187,7 +186,7 @@ class LoanRepayment(AccountsController): # interest_paid = self.amount_paid - self.principal_amount_paid - self.penalty_amount if interest_paid > 0: - for lia, amounts in iteritems(repayment_details.get('pending_accrual_entries', [])): + for lia, amounts in repayment_details.get('pending_accrual_entries', []).items(): if amounts['interest_amount'] + amounts['payable_principal_amount'] <= interest_paid: interest_amount = amounts['interest_amount'] paid_principal = amounts['payable_principal_amount'] diff --git a/erpnext/loan_management/doctype/loan_security/loan_security_dashboard.py b/erpnext/loan_management/doctype/loan_security/loan_security_dashboard.py index 8d5c525ac31..964a1ae93a7 100644 --- a/erpnext/loan_management/doctype/loan_security/loan_security_dashboard.py +++ b/erpnext/loan_management/doctype/loan_security/loan_security_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'loan_security', diff --git a/erpnext/loan_management/doctype/loan_security_type/loan_security_type_dashboard.py b/erpnext/loan_management/doctype/loan_security_type/loan_security_type_dashboard.py index daa9958808f..2a9ceed2d8c 100644 --- a/erpnext/loan_management/doctype/loan_security_type/loan_security_type_dashboard.py +++ b/erpnext/loan_management/doctype/loan_security_type/loan_security_type_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'loan_security_type', diff --git a/erpnext/loan_management/doctype/loan_security_unpledge/loan_security_unpledge.py b/erpnext/loan_management/doctype/loan_security_unpledge/loan_security_unpledge.py index 8fce09ce0ab..bff9d5cf62d 100644 --- a/erpnext/loan_management/doctype/loan_security_unpledge/loan_security_unpledge.py +++ b/erpnext/loan_management/doctype/loan_security_unpledge/loan_security_unpledge.py @@ -6,7 +6,6 @@ import frappe from frappe import _ from frappe.model.document import Document from frappe.utils import flt, get_datetime, getdate -from six import iteritems class LoanSecurityUnpledge(Document): @@ -109,7 +108,7 @@ class LoanSecurityUnpledge(Document): pledged_qty = 0 current_pledges = get_pledged_security_qty(self.loan) - for security, qty in iteritems(current_pledges): + for security, qty in current_pledges.items(): pledged_qty += qty if not pledged_qty: @@ -142,7 +141,7 @@ def get_pledged_security_qty(loan): GROUP BY p.loan_security """, (loan))) - for security, qty in iteritems(pledges): + for security, qty in pledges.items(): current_pledges.setdefault(security, qty) current_pledges[security] -= unpledges.get(security, 0.0) diff --git a/erpnext/loan_management/doctype/loan_type/loan_type_dashboard.py b/erpnext/loan_management/doctype/loan_type/loan_type_dashboard.py index 19026da2f66..245e1021202 100644 --- a/erpnext/loan_management/doctype/loan_type/loan_type_dashboard.py +++ b/erpnext/loan_management/doctype/loan_type/loan_type_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'loan_type', diff --git a/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual_dashboard.py b/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual_dashboard.py index 4195960890c..932087cb5a1 100644 --- a/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual_dashboard.py +++ b/erpnext/loan_management/doctype/process_loan_interest_accrual/process_loan_interest_accrual_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'process_loan_interest_accrual', diff --git a/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall_dashboard.py b/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall_dashboard.py index fa9d18b6fab..1f5d8438ff3 100644 --- a/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall_dashboard.py +++ b/erpnext/loan_management/doctype/process_loan_security_shortfall/process_loan_security_shortfall_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'process_loan_security_shortfall', diff --git a/erpnext/loan_management/report/applicant_wise_loan_security_exposure/applicant_wise_loan_security_exposure.py b/erpnext/loan_management/report/applicant_wise_loan_security_exposure/applicant_wise_loan_security_exposure.py index 8ebca39061c..512b47f7991 100644 --- a/erpnext/loan_management/report/applicant_wise_loan_security_exposure/applicant_wise_loan_security_exposure.py +++ b/erpnext/loan_management/report/applicant_wise_loan_security_exposure/applicant_wise_loan_security_exposure.py @@ -5,7 +5,6 @@ import frappe from frappe import _ from frappe.utils import flt -from six import iteritems import erpnext @@ -44,7 +43,7 @@ def get_data(filters): currency = erpnext.get_company_currency(filters.get('company')) - for key, qty in iteritems(pledge_values): + for key, qty in pledge_values.items(): if qty: row = {} current_value = flt(qty * loan_security_details.get(key[1], {}).get('latest_price', 0)) diff --git a/erpnext/loan_management/report/loan_security_exposure/loan_security_exposure.py b/erpnext/loan_management/report/loan_security_exposure/loan_security_exposure.py index e3d99952902..7dbb9662339 100644 --- a/erpnext/loan_management/report/loan_security_exposure/loan_security_exposure.py +++ b/erpnext/loan_management/report/loan_security_exposure/loan_security_exposure.py @@ -4,7 +4,6 @@ from frappe import _ from frappe.utils import flt -from six import iteritems import erpnext from erpnext.loan_management.report.applicant_wise_loan_security_exposure.applicant_wise_loan_security_exposure import ( @@ -43,7 +42,7 @@ def get_data(filters): current_pledges, total_portfolio_value = get_company_wise_loan_security_details(filters, loan_security_details) currency = erpnext.get_company_currency(filters.get('company')) - for security, value in iteritems(current_pledges): + for security, value in current_pledges.items(): if value.get('qty'): row = {} current_value = flt(value.get('qty', 0) * loan_security_details.get(security, {}).get('latest_price', 0)) @@ -70,7 +69,7 @@ def get_company_wise_loan_security_details(filters, loan_security_details): total_portfolio_value = 0 security_wise_map = {} - for key, qty in iteritems(pledge_values): + for key, qty in pledge_values.items(): security_wise_map.setdefault(key[1], { 'qty': 0.0, 'applicant_count': 0.0 diff --git a/erpnext/manufacturing/doctype/blanket_order/blanket_order_dashboard.py b/erpnext/manufacturing/doctype/blanket_order/blanket_order_dashboard.py index 2556f2f163d..c6745c877ca 100644 --- a/erpnext/manufacturing/doctype/blanket_order/blanket_order_dashboard.py +++ b/erpnext/manufacturing/doctype/blanket_order/blanket_order_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'blanket_order', diff --git a/erpnext/manufacturing/doctype/bom/bom_dashboard.py b/erpnext/manufacturing/doctype/bom/bom_dashboard.py index 9b8f6bff095..0699f74aad9 100644 --- a/erpnext/manufacturing/doctype/bom/bom_dashboard.py +++ b/erpnext/manufacturing/doctype/bom/bom_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py b/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py index f9c3b062179..0e3955f5a73 100644 --- a/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py +++ b/erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py @@ -9,7 +9,6 @@ import frappe from frappe import _ from frappe.model.document import Document from frappe.utils import cstr, flt -from six import string_types from erpnext.manufacturing.doctype.bom.bom import get_boms_in_bottom_up_order @@ -79,7 +78,7 @@ def get_new_bom_unit_cost(bom): @frappe.whitelist() def enqueue_replace_bom(args): - if isinstance(args, string_types): + if isinstance(args, str): args = json.loads(args) frappe.enqueue("erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool.replace_bom", args=args, timeout=40000) diff --git a/erpnext/manufacturing/doctype/job_card/job_card_dashboard.py b/erpnext/manufacturing/doctype/job_card/job_card_dashboard.py index f8f6af34efc..acaa895c1a0 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card_dashboard.py +++ b/erpnext/manufacturing/doctype/job_card/job_card_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/manufacturing/doctype/operation/operation_dashboard.py b/erpnext/manufacturing/doctype/operation/operation_dashboard.py index 076f6663bea..4fbcf4954ec 100644 --- a/erpnext/manufacturing/doctype/operation/operation_dashboard.py +++ b/erpnext/manufacturing/doctype/operation/operation_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index a63ed999e44..7cec7f515a3 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -20,7 +20,6 @@ from frappe.utils import ( nowdate, ) from frappe.utils.csvutils import build_csv_response -from six import iteritems from erpnext.manufacturing.doctype.bom.bom import get_children, validate_bom_no from erpnext.manufacturing.doctype.work_order.work_order import get_item_details @@ -906,7 +905,7 @@ def get_items_for_material_requests(doc, warehouses=None, get_parent_warehouse_d sales_order = doc.get("sales_order") - for item_code, details in iteritems(item_details): + for item_code, details in item_details.items(): so_item_details.setdefault(sales_order, frappe._dict()) if item_code in so_item_details.get(sales_order, {}): so_item_details[sales_order][item_code]['qty'] = so_item_details[sales_order][item_code].get("qty", 0) + flt(details.qty) @@ -914,7 +913,7 @@ def get_items_for_material_requests(doc, warehouses=None, get_parent_warehouse_d so_item_details[sales_order][item_code] = details mr_items = [] - for sales_order, item_code in iteritems(so_item_details): + for sales_order, item_code in so_item_details.items(): item_dict = so_item_details[sales_order] for details in item_dict.values(): bin_dict = get_bin_details(details, doc.company, warehouse) diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan_dashboard.py b/erpnext/manufacturing/doctype/production_plan/production_plan_dashboard.py index ef009765f92..e13f042e435 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan_dashboard.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/manufacturing/doctype/routing/routing_dashboard.py b/erpnext/manufacturing/doctype/routing/routing_dashboard.py index 4bd4192de5d..d051e38a34c 100644 --- a/erpnext/manufacturing/doctype/routing/routing_dashboard.py +++ b/erpnext/manufacturing/doctype/routing/routing_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'routing', diff --git a/erpnext/manufacturing/doctype/work_order/work_order_dashboard.py b/erpnext/manufacturing/doctype/work_order/work_order_dashboard.py index 91279d8e616..37dd11aab4f 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order_dashboard.py +++ b/erpnext/manufacturing/doctype/work_order/work_order_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/manufacturing/doctype/workstation/workstation_dashboard.py b/erpnext/manufacturing/doctype/workstation/workstation_dashboard.py index c779fbf9c3b..bc481ca1926 100644 --- a/erpnext/manufacturing/doctype/workstation/workstation_dashboard.py +++ b/erpnext/manufacturing/doctype/workstation/workstation_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.py b/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.py index 19b550feea7..02e3e933330 100644 --- a/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.py +++ b/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.py @@ -1,5 +1,3 @@ - - def get_context(context): # do your magic here pass diff --git a/erpnext/non_profit/doctype/donation/donation.py b/erpnext/non_profit/doctype/donation/donation.py index d21357a7f41..54bc94b755c 100644 --- a/erpnext/non_profit/doctype/donation/donation.py +++ b/erpnext/non_profit/doctype/donation/donation.py @@ -5,7 +5,6 @@ import json import frappe -import six from frappe import _ from frappe.email import sendmail_to_system_managers from frappe.model.document import Document @@ -83,7 +82,7 @@ def capture_razorpay_donations(*args, **kwargs): notify_failure(log) return { 'status': 'Failed', 'reason': e } - if isinstance(data, six.string_types): + if isinstance(data, str): data = json.loads(data) data = frappe._dict(data) diff --git a/erpnext/non_profit/doctype/donation/donation_dashboard.py b/erpnext/non_profit/doctype/donation/donation_dashboard.py index 1d43ba23dcf..492ad621718 100644 --- a/erpnext/non_profit/doctype/donation/donation_dashboard.py +++ b/erpnext/non_profit/doctype/donation/donation_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/non_profit/doctype/member/member_dashboard.py b/erpnext/non_profit/doctype/member/member_dashboard.py index 80bb9e3250d..0e31e3ceb83 100644 --- a/erpnext/non_profit/doctype/member/member_dashboard.py +++ b/erpnext/non_profit/doctype/member/member_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/non_profit/doctype/membership/membership.py b/erpnext/non_profit/doctype/membership/membership.py index b3593d55f00..beb38e21108 100644 --- a/erpnext/non_profit/doctype/membership/membership.py +++ b/erpnext/non_profit/doctype/membership/membership.py @@ -6,7 +6,6 @@ import json from datetime import datetime import frappe -import six from frappe import _ from frappe.email import sendmail_to_system_managers from frappe.model.document import Document @@ -343,7 +342,7 @@ def process_request_data(data): notify_failure(log) return {"status": "Failed", "reason": e} - if isinstance(data, six.string_types): + if isinstance(data, str): data = json.loads(data) data = frappe._dict(data) diff --git a/erpnext/non_profit/web_form/certification_application/certification_application.py b/erpnext/non_profit/web_form/certification_application/certification_application.py index 19b550feea7..02e3e933330 100644 --- a/erpnext/non_profit/web_form/certification_application/certification_application.py +++ b/erpnext/non_profit/web_form/certification_application/certification_application.py @@ -1,5 +1,3 @@ - - def get_context(context): # do your magic here pass diff --git a/erpnext/non_profit/web_form/certification_application_usd/certification_application_usd.py b/erpnext/non_profit/web_form/certification_application_usd/certification_application_usd.py index 19b550feea7..02e3e933330 100644 --- a/erpnext/non_profit/web_form/certification_application_usd/certification_application_usd.py +++ b/erpnext/non_profit/web_form/certification_application_usd/certification_application_usd.py @@ -1,5 +1,3 @@ - - def get_context(context): # do your magic here pass diff --git a/erpnext/non_profit/web_form/grant_application/grant_application.py b/erpnext/non_profit/web_form/grant_application/grant_application.py index 1f828940922..3dfb381f657 100644 --- a/erpnext/non_profit/web_form/grant_application/grant_application.py +++ b/erpnext/non_profit/web_form/grant_application/grant_application.py @@ -1,5 +1,3 @@ - - def get_context(context): context.no_cache = True context.parents = [dict(label='View All ', diff --git a/erpnext/patches/v10_0/rename_offer_letter_to_job_offer.py b/erpnext/patches/v10_0/rename_offer_letter_to_job_offer.py index 00d0dd75e4c..a2deab62258 100644 --- a/erpnext/patches/v10_0/rename_offer_letter_to_job_offer.py +++ b/erpnext/patches/v10_0/rename_offer_letter_to_job_offer.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v10_0/rename_price_to_rate_in_pricing_rule.py b/erpnext/patches/v10_0/rename_price_to_rate_in_pricing_rule.py index 152c5b3ec48..525d1ff2042 100644 --- a/erpnext/patches/v10_0/rename_price_to_rate_in_pricing_rule.py +++ b/erpnext/patches/v10_0/rename_price_to_rate_in_pricing_rule.py @@ -1,4 +1,3 @@ - import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v10_0/set_currency_in_pricing_rule.py b/erpnext/patches/v10_0/set_currency_in_pricing_rule.py index 374df2a4dc7..3f3d42400ab 100644 --- a/erpnext/patches/v10_0/set_currency_in_pricing_rule.py +++ b/erpnext/patches/v10_0/set_currency_in_pricing_rule.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v10_0/update_translatable_fields.py b/erpnext/patches/v10_0/update_translatable_fields.py index f111ac7b9de..471f53704de 100644 --- a/erpnext/patches/v10_0/update_translatable_fields.py +++ b/erpnext/patches/v10_0/update_translatable_fields.py @@ -1,6 +1,3 @@ -#-*- coding: utf-8 -*- - - import frappe diff --git a/erpnext/patches/v10_1/transfer_subscription_to_auto_repeat.py b/erpnext/patches/v10_1/transfer_subscription_to_auto_repeat.py index dcb4a57ba2a..6530b815cc1 100644 --- a/erpnext/patches/v10_1/transfer_subscription_to_auto_repeat.py +++ b/erpnext/patches/v10_1/transfer_subscription_to_auto_repeat.py @@ -1,4 +1,3 @@ - import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v11_0/add_default_dispatch_notification_template.py b/erpnext/patches/v11_0/add_default_dispatch_notification_template.py index 784b0eeafa5..08006ad01b1 100644 --- a/erpnext/patches/v11_0/add_default_dispatch_notification_template.py +++ b/erpnext/patches/v11_0/add_default_dispatch_notification_template.py @@ -1,4 +1,3 @@ - import os import frappe diff --git a/erpnext/patches/v11_0/add_default_email_template_for_leave.py b/erpnext/patches/v11_0/add_default_email_template_for_leave.py index e52d12429b5..fdf30469bf0 100644 --- a/erpnext/patches/v11_0/add_default_email_template_for_leave.py +++ b/erpnext/patches/v11_0/add_default_email_template_for_leave.py @@ -1,4 +1,3 @@ - import os import frappe diff --git a/erpnext/patches/v11_0/add_expense_claim_default_account.py b/erpnext/patches/v11_0/add_expense_claim_default_account.py index 8629798ba82..f5658c5b931 100644 --- a/erpnext/patches/v11_0/add_expense_claim_default_account.py +++ b/erpnext/patches/v11_0/add_expense_claim_default_account.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v11_0/add_market_segments.py b/erpnext/patches/v11_0/add_market_segments.py index 820199569ab..6dcbf99e16a 100644 --- a/erpnext/patches/v11_0/add_market_segments.py +++ b/erpnext/patches/v11_0/add_market_segments.py @@ -1,4 +1,3 @@ - import frappe from erpnext.setup.setup_wizard.operations.install_fixtures import add_market_segments diff --git a/erpnext/patches/v11_0/add_sales_stages.py b/erpnext/patches/v11_0/add_sales_stages.py index 1699572551b..064b72195f6 100644 --- a/erpnext/patches/v11_0/add_sales_stages.py +++ b/erpnext/patches/v11_0/add_sales_stages.py @@ -1,4 +1,3 @@ - import frappe from erpnext.setup.setup_wizard.operations.install_fixtures import add_sale_stages diff --git a/erpnext/patches/v11_0/check_buying_selling_in_currency_exchange.py b/erpnext/patches/v11_0/check_buying_selling_in_currency_exchange.py index 039238f9e1b..573021270df 100644 --- a/erpnext/patches/v11_0/check_buying_selling_in_currency_exchange.py +++ b/erpnext/patches/v11_0/check_buying_selling_in_currency_exchange.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v11_0/create_default_success_action.py b/erpnext/patches/v11_0/create_default_success_action.py index b45065cb0d2..e7b412cc5f2 100644 --- a/erpnext/patches/v11_0/create_default_success_action.py +++ b/erpnext/patches/v11_0/create_default_success_action.py @@ -1,4 +1,3 @@ - import frappe from erpnext.setup.install import create_default_success_action diff --git a/erpnext/patches/v11_0/create_department_records_for_each_company.py b/erpnext/patches/v11_0/create_department_records_for_each_company.py index a4cba0cfcca..034418c1371 100644 --- a/erpnext/patches/v11_0/create_department_records_for_each_company.py +++ b/erpnext/patches/v11_0/create_department_records_for_each_company.py @@ -1,4 +1,3 @@ - import frappe from frappe import _ from frappe.utils.nestedset import rebuild_tree diff --git a/erpnext/patches/v11_0/drop_column_max_days_allowed.py b/erpnext/patches/v11_0/drop_column_max_days_allowed.py index 5c549258584..f0803cb5c7f 100644 --- a/erpnext/patches/v11_0/drop_column_max_days_allowed.py +++ b/erpnext/patches/v11_0/drop_column_max_days_allowed.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v11_0/ewaybill_fields_gst_india.py b/erpnext/patches/v11_0/ewaybill_fields_gst_india.py index a7e662c78c5..5974e27059e 100644 --- a/erpnext/patches/v11_0/ewaybill_fields_gst_india.py +++ b/erpnext/patches/v11_0/ewaybill_fields_gst_india.py @@ -1,4 +1,3 @@ - import frappe from erpnext.regional.india.setup import make_custom_fields diff --git a/erpnext/patches/v11_0/hr_ux_cleanups.py b/erpnext/patches/v11_0/hr_ux_cleanups.py index 00678c781e7..43c85042942 100644 --- a/erpnext/patches/v11_0/hr_ux_cleanups.py +++ b/erpnext/patches/v11_0/hr_ux_cleanups.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v11_0/inter_state_field_for_gst.py b/erpnext/patches/v11_0/inter_state_field_for_gst.py index d897941eab2..a1f159483bd 100644 --- a/erpnext/patches/v11_0/inter_state_field_for_gst.py +++ b/erpnext/patches/v11_0/inter_state_field_for_gst.py @@ -1,4 +1,3 @@ - import frappe from erpnext.regional.india.setup import make_custom_fields diff --git a/erpnext/patches/v11_0/move_leave_approvers_from_employee.py b/erpnext/patches/v11_0/move_leave_approvers_from_employee.py index fc3dbfbab92..80e5ef7f37a 100644 --- a/erpnext/patches/v11_0/move_leave_approvers_from_employee.py +++ b/erpnext/patches/v11_0/move_leave_approvers_from_employee.py @@ -1,4 +1,3 @@ - import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v11_0/rebuild_tree_for_company.py b/erpnext/patches/v11_0/rebuild_tree_for_company.py index 7866cfab4f7..cad9c6cd788 100644 --- a/erpnext/patches/v11_0/rebuild_tree_for_company.py +++ b/erpnext/patches/v11_0/rebuild_tree_for_company.py @@ -1,4 +1,3 @@ - import frappe from frappe.utils.nestedset import rebuild_tree diff --git a/erpnext/patches/v11_0/rename_additional_salary_component_additional_salary.py b/erpnext/patches/v11_0/rename_additional_salary_component_additional_salary.py index 85292e8d135..8fa876dd743 100644 --- a/erpnext/patches/v11_0/rename_additional_salary_component_additional_salary.py +++ b/erpnext/patches/v11_0/rename_additional_salary_component_additional_salary.py @@ -1,4 +1,3 @@ - import frappe # this patch should have been included with this PR https://github.com/frappe/erpnext/pull/14302 diff --git a/erpnext/patches/v11_0/rename_field_max_days_allowed.py b/erpnext/patches/v11_0/rename_field_max_days_allowed.py index fb08be8628b..4b55aa06bbf 100644 --- a/erpnext/patches/v11_0/rename_field_max_days_allowed.py +++ b/erpnext/patches/v11_0/rename_field_max_days_allowed.py @@ -1,4 +1,3 @@ - import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v11_0/rename_members_with_naming_series.py b/erpnext/patches/v11_0/rename_members_with_naming_series.py index 49dbc8a6dc8..95fb55d9b45 100644 --- a/erpnext/patches/v11_0/rename_members_with_naming_series.py +++ b/erpnext/patches/v11_0/rename_members_with_naming_series.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py b/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py index fd7e684c61a..3f87550224d 100644 --- a/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py +++ b/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py @@ -1,4 +1,3 @@ - import frappe from frappe import _ from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v11_0/set_default_email_template_in_hr.py b/erpnext/patches/v11_0/set_default_email_template_in_hr.py index a77dee93692..ee083ca4b80 100644 --- a/erpnext/patches/v11_0/set_default_email_template_in_hr.py +++ b/erpnext/patches/v11_0/set_default_email_template_in_hr.py @@ -1,4 +1,3 @@ - import frappe from frappe import _ diff --git a/erpnext/patches/v11_0/set_department_for_doctypes.py b/erpnext/patches/v11_0/set_department_for_doctypes.py index a3ece7fc768..b1098abb57a 100644 --- a/erpnext/patches/v11_0/set_department_for_doctypes.py +++ b/erpnext/patches/v11_0/set_department_for_doctypes.py @@ -1,4 +1,3 @@ - import frappe # Set department value based on employee value diff --git a/erpnext/patches/v11_0/set_missing_gst_hsn_code.py b/erpnext/patches/v11_0/set_missing_gst_hsn_code.py index 262ca2d61f9..ec75d454aa8 100644 --- a/erpnext/patches/v11_0/set_missing_gst_hsn_code.py +++ b/erpnext/patches/v11_0/set_missing_gst_hsn_code.py @@ -1,4 +1,3 @@ - import frappe from erpnext.controllers.taxes_and_totals import get_itemised_tax_breakup_html diff --git a/erpnext/patches/v11_0/set_salary_component_properties.py b/erpnext/patches/v11_0/set_salary_component_properties.py index 5ff9e4ab6fd..99c3b0b7c46 100644 --- a/erpnext/patches/v11_0/set_salary_component_properties.py +++ b/erpnext/patches/v11_0/set_salary_component_properties.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v11_0/set_update_field_and_value_in_workflow_state.py b/erpnext/patches/v11_0/set_update_field_and_value_in_workflow_state.py index f23018d0b4d..a44daaa1979 100644 --- a/erpnext/patches/v11_0/set_update_field_and_value_in_workflow_state.py +++ b/erpnext/patches/v11_0/set_update_field_and_value_in_workflow_state.py @@ -1,4 +1,3 @@ - import frappe from frappe.model.workflow import get_workflow_name diff --git a/erpnext/patches/v11_0/set_user_permissions_for_department.py b/erpnext/patches/v11_0/set_user_permissions_for_department.py index cb38beb51c1..bb7ef877476 100644 --- a/erpnext/patches/v11_0/set_user_permissions_for_department.py +++ b/erpnext/patches/v11_0/set_user_permissions_for_department.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v11_0/skip_user_permission_check_for_department.py b/erpnext/patches/v11_0/skip_user_permission_check_for_department.py index 8e2aa47785d..d3875773108 100644 --- a/erpnext/patches/v11_0/skip_user_permission_check_for_department.py +++ b/erpnext/patches/v11_0/skip_user_permission_check_for_department.py @@ -1,4 +1,3 @@ - import frappe from frappe.desk.form.linked_with import get_linked_doctypes diff --git a/erpnext/patches/v11_0/uom_conversion_data.py b/erpnext/patches/v11_0/uom_conversion_data.py index 854f5223470..81e547b16a8 100644 --- a/erpnext/patches/v11_0/uom_conversion_data.py +++ b/erpnext/patches/v11_0/uom_conversion_data.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v11_0/update_department_lft_rgt.py b/erpnext/patches/v11_0/update_department_lft_rgt.py index 4cb2dccbb27..aff8e1556b9 100644 --- a/erpnext/patches/v11_0/update_department_lft_rgt.py +++ b/erpnext/patches/v11_0/update_department_lft_rgt.py @@ -1,4 +1,3 @@ - import frappe from frappe import _ from frappe.utils.nestedset import rebuild_tree diff --git a/erpnext/patches/v11_0/update_sales_partner_type.py b/erpnext/patches/v11_0/update_sales_partner_type.py index c7937e532be..ef58499f0f1 100644 --- a/erpnext/patches/v11_0/update_sales_partner_type.py +++ b/erpnext/patches/v11_0/update_sales_partner_type.py @@ -1,4 +1,3 @@ - import frappe from frappe import _ diff --git a/erpnext/patches/v11_0/update_total_qty_field.py b/erpnext/patches/v11_0/update_total_qty_field.py index 09bb02f9593..4e807b4f136 100644 --- a/erpnext/patches/v11_0/update_total_qty_field.py +++ b/erpnext/patches/v11_0/update_total_qty_field.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v11_1/set_missing_opportunity_from.py b/erpnext/patches/v11_1/set_missing_opportunity_from.py index 7a041919a15..beec63af4b4 100644 --- a/erpnext/patches/v11_1/set_missing_opportunity_from.py +++ b/erpnext/patches/v11_1/set_missing_opportunity_from.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v11_1/set_salary_details_submittable.py b/erpnext/patches/v11_1/set_salary_details_submittable.py index 8ad8ff8c2ba..ac082b1ae22 100644 --- a/erpnext/patches/v11_1/set_salary_details_submittable.py +++ b/erpnext/patches/v11_1/set_salary_details_submittable.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v11_1/set_status_for_material_request_type_manufacture.py b/erpnext/patches/v11_1/set_status_for_material_request_type_manufacture.py index 2da1ecbda26..0d4f3d2ce11 100644 --- a/erpnext/patches/v11_1/set_status_for_material_request_type_manufacture.py +++ b/erpnext/patches/v11_1/set_status_for_material_request_type_manufacture.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v11_1/setup_guardian_role.py b/erpnext/patches/v11_1/setup_guardian_role.py index 385bc209fa2..dd9c1d28871 100644 --- a/erpnext/patches/v11_1/setup_guardian_role.py +++ b/erpnext/patches/v11_1/setup_guardian_role.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v11_1/woocommerce_set_creation_user.py b/erpnext/patches/v11_1/woocommerce_set_creation_user.py index 1de25bb739c..19958eef14a 100644 --- a/erpnext/patches/v11_1/woocommerce_set_creation_user.py +++ b/erpnext/patches/v11_1/woocommerce_set_creation_user.py @@ -1,4 +1,3 @@ - import frappe from frappe.utils import cint diff --git a/erpnext/patches/v12_0/add_document_type_field_for_italy_einvoicing.py b/erpnext/patches/v12_0/add_document_type_field_for_italy_einvoicing.py index 41264819ef3..f860cb46935 100644 --- a/erpnext/patches/v12_0/add_document_type_field_for_italy_einvoicing.py +++ b/erpnext/patches/v12_0/add_document_type_field_for_italy_einvoicing.py @@ -1,4 +1,3 @@ - import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields diff --git a/erpnext/patches/v12_0/add_export_type_field_in_party_master.py b/erpnext/patches/v12_0/add_export_type_field_in_party_master.py index df9bbea344a..dc9e8849189 100644 --- a/erpnext/patches/v12_0/add_export_type_field_in_party_master.py +++ b/erpnext/patches/v12_0/add_export_type_field_in_party_master.py @@ -1,4 +1,3 @@ - import frappe from erpnext.regional.india.setup import make_custom_fields diff --git a/erpnext/patches/v12_0/add_gst_category_in_delivery_note.py b/erpnext/patches/v12_0/add_gst_category_in_delivery_note.py index 77b63487ca7..6316bb3da94 100644 --- a/erpnext/patches/v12_0/add_gst_category_in_delivery_note.py +++ b/erpnext/patches/v12_0/add_gst_category_in_delivery_note.py @@ -1,4 +1,3 @@ - import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields diff --git a/erpnext/patches/v12_0/add_taxjar_integration_field.py b/erpnext/patches/v12_0/add_taxjar_integration_field.py index fbaf6f83a7b..b0ddf001a65 100644 --- a/erpnext/patches/v12_0/add_taxjar_integration_field.py +++ b/erpnext/patches/v12_0/add_taxjar_integration_field.py @@ -1,4 +1,3 @@ - import frappe from erpnext.regional.united_states.setup import make_custom_fields diff --git a/erpnext/patches/v12_0/create_accounting_dimensions_in_missing_doctypes.py b/erpnext/patches/v12_0/create_accounting_dimensions_in_missing_doctypes.py index e0ed9d8c147..aec9cb8b26b 100644 --- a/erpnext/patches/v12_0/create_accounting_dimensions_in_missing_doctypes.py +++ b/erpnext/patches/v12_0/create_accounting_dimensions_in_missing_doctypes.py @@ -1,4 +1,3 @@ - import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_field diff --git a/erpnext/patches/v12_0/create_irs_1099_field_united_states.py b/erpnext/patches/v12_0/create_irs_1099_field_united_states.py index 0f5e07b5e53..efcc7cf0f7d 100644 --- a/erpnext/patches/v12_0/create_irs_1099_field_united_states.py +++ b/erpnext/patches/v12_0/create_irs_1099_field_united_states.py @@ -1,4 +1,3 @@ - import frappe from erpnext.regional.united_states.setup import make_custom_fields diff --git a/erpnext/patches/v12_0/create_itc_reversal_custom_fields.py b/erpnext/patches/v12_0/create_itc_reversal_custom_fields.py index 7a1da52128c..d157aad8f2d 100644 --- a/erpnext/patches/v12_0/create_itc_reversal_custom_fields.py +++ b/erpnext/patches/v12_0/create_itc_reversal_custom_fields.py @@ -1,4 +1,3 @@ - import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields from frappe.custom.doctype.property_setter.property_setter import make_property_setter diff --git a/erpnext/patches/v12_0/create_taxable_value_field.py b/erpnext/patches/v12_0/create_taxable_value_field.py index df0269d3a8c..55717ccab2e 100644 --- a/erpnext/patches/v12_0/create_taxable_value_field.py +++ b/erpnext/patches/v12_0/create_taxable_value_field.py @@ -1,4 +1,3 @@ - import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields diff --git a/erpnext/patches/v12_0/move_bank_account_swift_number_to_bank.py b/erpnext/patches/v12_0/move_bank_account_swift_number_to_bank.py index c0b262395d8..b3ee3404642 100644 --- a/erpnext/patches/v12_0/move_bank_account_swift_number_to_bank.py +++ b/erpnext/patches/v12_0/move_bank_account_swift_number_to_bank.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/move_item_tax_to_item_tax_template.py b/erpnext/patches/v12_0/move_item_tax_to_item_tax_template.py index 677a564af0d..905aebee151 100644 --- a/erpnext/patches/v12_0/move_item_tax_to_item_tax_template.py +++ b/erpnext/patches/v12_0/move_item_tax_to_item_tax_template.py @@ -2,7 +2,6 @@ import json import frappe from frappe.model.naming import make_autoname -from six import iteritems def execute(): @@ -84,7 +83,7 @@ def execute(): def get_item_tax_template(item_tax_templates, item_tax_map, item_code, parenttype=None, parent=None, tax_types=None): # search for previously created item tax template by comparing tax maps - for template, item_tax_template_map in iteritems(item_tax_templates): + for template, item_tax_template_map in item_tax_templates.items(): if item_tax_map == item_tax_template_map: return template @@ -92,7 +91,7 @@ def get_item_tax_template(item_tax_templates, item_tax_map, item_code, parenttyp item_tax_template = frappe.new_doc("Item Tax Template") item_tax_template.title = make_autoname("Item Tax Template-.####") - for tax_type, tax_rate in iteritems(item_tax_map): + for tax_type, tax_rate in item_tax_map.items(): account_details = frappe.db.get_value("Account", tax_type, ['name', 'account_type', 'company'], as_dict=1) if account_details: item_tax_template.company = account_details.company diff --git a/erpnext/patches/v12_0/recalculate_requested_qty_in_bin.py b/erpnext/patches/v12_0/recalculate_requested_qty_in_bin.py index c89e4bb9eae..9b083cafb3a 100644 --- a/erpnext/patches/v12_0/recalculate_requested_qty_in_bin.py +++ b/erpnext/patches/v12_0/recalculate_requested_qty_in_bin.py @@ -1,4 +1,3 @@ - import frappe from erpnext.stock.stock_balance import get_indented_qty, update_bin_qty diff --git a/erpnext/patches/v12_0/remove_bank_remittance_custom_fields.py b/erpnext/patches/v12_0/remove_bank_remittance_custom_fields.py index 0f4a366c657..12768a6f959 100644 --- a/erpnext/patches/v12_0/remove_bank_remittance_custom_fields.py +++ b/erpnext/patches/v12_0/remove_bank_remittance_custom_fields.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/rename_account_type_doctype.py b/erpnext/patches/v12_0/rename_account_type_doctype.py index c2c834bf98c..e33a1d010d1 100644 --- a/erpnext/patches/v12_0/rename_account_type_doctype.py +++ b/erpnext/patches/v12_0/rename_account_type_doctype.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/rename_lost_reason_detail.py b/erpnext/patches/v12_0/rename_lost_reason_detail.py index 55bf6f223fb..96ae9798c65 100644 --- a/erpnext/patches/v12_0/rename_lost_reason_detail.py +++ b/erpnext/patches/v12_0/rename_lost_reason_detail.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/set_automatically_process_deferred_accounting_in_accounts_settings.py b/erpnext/patches/v12_0/set_automatically_process_deferred_accounting_in_accounts_settings.py index b4f8a0631a6..8f29fc888e0 100644 --- a/erpnext/patches/v12_0/set_automatically_process_deferred_accounting_in_accounts_settings.py +++ b/erpnext/patches/v12_0/set_automatically_process_deferred_accounting_in_accounts_settings.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/set_cwip_and_delete_asset_settings.py b/erpnext/patches/v12_0/set_cwip_and_delete_asset_settings.py index fe580ce0236..d1e0e4550eb 100644 --- a/erpnext/patches/v12_0/set_cwip_and_delete_asset_settings.py +++ b/erpnext/patches/v12_0/set_cwip_and_delete_asset_settings.py @@ -1,4 +1,3 @@ - import frappe from frappe.utils import cint diff --git a/erpnext/patches/v12_0/set_default_payroll_based_on.py b/erpnext/patches/v12_0/set_default_payroll_based_on.py index b70bb18b60b..de641c65a1c 100644 --- a/erpnext/patches/v12_0/set_default_payroll_based_on.py +++ b/erpnext/patches/v12_0/set_default_payroll_based_on.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/set_expense_account_in_landed_cost_voucher_taxes.py b/erpnext/patches/v12_0/set_expense_account_in_landed_cost_voucher_taxes.py index 47d4eb599b8..50d9fee0992 100644 --- a/erpnext/patches/v12_0/set_expense_account_in_landed_cost_voucher_taxes.py +++ b/erpnext/patches/v12_0/set_expense_account_in_landed_cost_voucher_taxes.py @@ -1,6 +1,4 @@ - import frappe -from six import iteritems def execute(): @@ -10,7 +8,7 @@ def execute(): SELECT name, expenses_included_in_valuation from `tabCompany` """)) - for company, account in iteritems(company_account_map): + for company, account in company_account_map.items(): frappe.db.sql(""" UPDATE `tabLanded Cost Taxes and Charges` t, `tabLanded Cost Voucher` l diff --git a/erpnext/patches/v12_0/set_production_capacity_in_workstation.py b/erpnext/patches/v12_0/set_production_capacity_in_workstation.py index 14956a23b43..bd2f7e2decd 100644 --- a/erpnext/patches/v12_0/set_production_capacity_in_workstation.py +++ b/erpnext/patches/v12_0/set_production_capacity_in_workstation.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/set_purchase_receipt_delivery_note_detail.py b/erpnext/patches/v12_0/set_purchase_receipt_delivery_note_detail.py index 05b86f3204a..a15166ed5f6 100644 --- a/erpnext/patches/v12_0/set_purchase_receipt_delivery_note_detail.py +++ b/erpnext/patches/v12_0/set_purchase_receipt_delivery_note_detail.py @@ -1,4 +1,3 @@ - from collections import defaultdict import frappe diff --git a/erpnext/patches/v12_0/set_quotation_status.py b/erpnext/patches/v12_0/set_quotation_status.py index adfc5e96798..91e77e4e0d4 100644 --- a/erpnext/patches/v12_0/set_quotation_status.py +++ b/erpnext/patches/v12_0/set_quotation_status.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/set_received_qty_in_material_request_as_per_stock_uom.py b/erpnext/patches/v12_0/set_received_qty_in_material_request_as_per_stock_uom.py index 83db7961d9d..d41134d4db3 100644 --- a/erpnext/patches/v12_0/set_received_qty_in_material_request_as_per_stock_uom.py +++ b/erpnext/patches/v12_0/set_received_qty_in_material_request_as_per_stock_uom.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/set_serial_no_status.py b/erpnext/patches/v12_0/set_serial_no_status.py index 57206ced3e2..8c136e66632 100644 --- a/erpnext/patches/v12_0/set_serial_no_status.py +++ b/erpnext/patches/v12_0/set_serial_no_status.py @@ -1,4 +1,3 @@ - import frappe from frappe.utils import getdate, nowdate diff --git a/erpnext/patches/v12_0/set_valid_till_date_in_supplier_quotation.py b/erpnext/patches/v12_0/set_valid_till_date_in_supplier_quotation.py index d79628f2a90..154d7ba1767 100644 --- a/erpnext/patches/v12_0/set_valid_till_date_in_supplier_quotation.py +++ b/erpnext/patches/v12_0/set_valid_till_date_in_supplier_quotation.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/unset_customer_supplier_based_on_type_of_item_price.py b/erpnext/patches/v12_0/unset_customer_supplier_based_on_type_of_item_price.py index 1a677f91672..5b5f623b48c 100644 --- a/erpnext/patches/v12_0/unset_customer_supplier_based_on_type_of_item_price.py +++ b/erpnext/patches/v12_0/unset_customer_supplier_based_on_type_of_item_price.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/update_bom_in_so_mr.py b/erpnext/patches/v12_0/update_bom_in_so_mr.py index 7683031e278..37d850fab44 100644 --- a/erpnext/patches/v12_0/update_bom_in_so_mr.py +++ b/erpnext/patches/v12_0/update_bom_in_so_mr.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/update_due_date_in_gle.py b/erpnext/patches/v12_0/update_due_date_in_gle.py index 032c2bb9538..e4418b01036 100644 --- a/erpnext/patches/v12_0/update_due_date_in_gle.py +++ b/erpnext/patches/v12_0/update_due_date_in_gle.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/update_end_date_and_status_in_email_campaign.py b/erpnext/patches/v12_0/update_end_date_and_status_in_email_campaign.py index 48febc5aa45..ef4204fc9c3 100644 --- a/erpnext/patches/v12_0/update_end_date_and_status_in_email_campaign.py +++ b/erpnext/patches/v12_0/update_end_date_and_status_in_email_campaign.py @@ -1,4 +1,3 @@ - import frappe from frappe.utils import add_days, getdate, today diff --git a/erpnext/patches/v12_0/update_ewaybill_field_position.py b/erpnext/patches/v12_0/update_ewaybill_field_position.py index ace3aceebba..132fd900bd1 100644 --- a/erpnext/patches/v12_0/update_ewaybill_field_position.py +++ b/erpnext/patches/v12_0/update_ewaybill_field_position.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/update_gst_category.py b/erpnext/patches/v12_0/update_gst_category.py index 20dce94f2ff..8b15370b09d 100644 --- a/erpnext/patches/v12_0/update_gst_category.py +++ b/erpnext/patches/v12_0/update_gst_category.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/update_healthcare_refactored_changes.py b/erpnext/patches/v12_0/update_healthcare_refactored_changes.py index 4e24a638f98..f553ee9d855 100644 --- a/erpnext/patches/v12_0/update_healthcare_refactored_changes.py +++ b/erpnext/patches/v12_0/update_healthcare_refactored_changes.py @@ -1,4 +1,3 @@ - import frappe from frappe.model.utils.rename_field import rename_field from frappe.modules import get_doctype_module, scrub diff --git a/erpnext/patches/v12_0/update_is_cancelled_field.py b/erpnext/patches/v12_0/update_is_cancelled_field.py index 18787848dfd..df7875079bc 100644 --- a/erpnext/patches/v12_0/update_is_cancelled_field.py +++ b/erpnext/patches/v12_0/update_is_cancelled_field.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/update_item_tax_template_company.py b/erpnext/patches/v12_0/update_item_tax_template_company.py index a737cb2dfa5..abd4f6fb180 100644 --- a/erpnext/patches/v12_0/update_item_tax_template_company.py +++ b/erpnext/patches/v12_0/update_item_tax_template_company.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/update_owner_fields_in_acc_dimension_custom_fields.py b/erpnext/patches/v12_0/update_owner_fields_in_acc_dimension_custom_fields.py index 53e83216673..e5f24d4b888 100644 --- a/erpnext/patches/v12_0/update_owner_fields_in_acc_dimension_custom_fields.py +++ b/erpnext/patches/v12_0/update_owner_fields_in_acc_dimension_custom_fields.py @@ -1,4 +1,3 @@ - import frappe from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( diff --git a/erpnext/patches/v12_0/update_price_list_currency_in_bom.py b/erpnext/patches/v12_0/update_price_list_currency_in_bom.py index e0382d818ea..ea3e002e5d2 100644 --- a/erpnext/patches/v12_0/update_price_list_currency_in_bom.py +++ b/erpnext/patches/v12_0/update_price_list_currency_in_bom.py @@ -1,4 +1,3 @@ - import frappe from frappe.utils import getdate diff --git a/erpnext/patches/v12_0/update_price_or_product_discount.py b/erpnext/patches/v12_0/update_price_or_product_discount.py index 86105a469db..53c0ba525b2 100644 --- a/erpnext/patches/v12_0/update_price_or_product_discount.py +++ b/erpnext/patches/v12_0/update_price_or_product_discount.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v12_0/update_uom_conversion_factor.py b/erpnext/patches/v12_0/update_uom_conversion_factor.py index 3184d1195f0..a09ac190e2e 100644 --- a/erpnext/patches/v12_0/update_uom_conversion_factor.py +++ b/erpnext/patches/v12_0/update_uom_conversion_factor.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v13_0/add_default_interview_notification_templates.py b/erpnext/patches/v13_0/add_default_interview_notification_templates.py index 8d9f5cc89b5..0208ca914eb 100644 --- a/erpnext/patches/v13_0/add_default_interview_notification_templates.py +++ b/erpnext/patches/v13_0/add_default_interview_notification_templates.py @@ -1,4 +1,3 @@ - import os import frappe diff --git a/erpnext/patches/v13_0/add_naming_series_to_old_projects.py b/erpnext/patches/v13_0/add_naming_series_to_old_projects.py index 3bf2762456e..71abe2e98e0 100644 --- a/erpnext/patches/v13_0/add_naming_series_to_old_projects.py +++ b/erpnext/patches/v13_0/add_naming_series_to_old_projects.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v13_0/add_po_to_global_search.py b/erpnext/patches/v13_0/add_po_to_global_search.py index 396d3343ba6..7fbaffb23c7 100644 --- a/erpnext/patches/v13_0/add_po_to_global_search.py +++ b/erpnext/patches/v13_0/add_po_to_global_search.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v13_0/add_standard_navbar_items.py b/erpnext/patches/v13_0/add_standard_navbar_items.py index c739a7a93f9..24141b7862d 100644 --- a/erpnext/patches/v13_0/add_standard_navbar_items.py +++ b/erpnext/patches/v13_0/add_standard_navbar_items.py @@ -1,4 +1,3 @@ - # import frappe from erpnext.setup.install import add_standard_navbar_items diff --git a/erpnext/patches/v13_0/bill_for_rejected_quantity_in_purchase_invoice.py b/erpnext/patches/v13_0/bill_for_rejected_quantity_in_purchase_invoice.py index a95f822d281..ee23747cc04 100644 --- a/erpnext/patches/v13_0/bill_for_rejected_quantity_in_purchase_invoice.py +++ b/erpnext/patches/v13_0/bill_for_rejected_quantity_in_purchase_invoice.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v13_0/change_default_pos_print_format.py b/erpnext/patches/v13_0/change_default_pos_print_format.py index 9664247ab41..23cad31f596 100644 --- a/erpnext/patches/v13_0/change_default_pos_print_format.py +++ b/erpnext/patches/v13_0/change_default_pos_print_format.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py b/erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py index 7ef154e6066..bc64c637722 100644 --- a/erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py +++ b/erpnext/patches/v13_0/convert_qi_parameter_to_link_field.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py b/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py index ce352a008be..fba9e2c4430 100644 --- a/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py +++ b/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py @@ -1,4 +1,3 @@ - import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields diff --git a/erpnext/patches/v13_0/drop_razorpay_payload_column.py b/erpnext/patches/v13_0/drop_razorpay_payload_column.py index aea498d8d30..611ba7e3243 100644 --- a/erpnext/patches/v13_0/drop_razorpay_payload_column.py +++ b/erpnext/patches/v13_0/drop_razorpay_payload_column.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v13_0/gst_fields_for_pos_invoice.py b/erpnext/patches/v13_0/gst_fields_for_pos_invoice.py index cb3df3c5ddc..76f8b274999 100644 --- a/erpnext/patches/v13_0/gst_fields_for_pos_invoice.py +++ b/erpnext/patches/v13_0/gst_fields_for_pos_invoice.py @@ -1,4 +1,3 @@ - import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields diff --git a/erpnext/patches/v13_0/healthcare_lab_module_rename_doctypes.py b/erpnext/patches/v13_0/healthcare_lab_module_rename_doctypes.py index d43e793b9a9..98ce12bc204 100644 --- a/erpnext/patches/v13_0/healthcare_lab_module_rename_doctypes.py +++ b/erpnext/patches/v13_0/healthcare_lab_module_rename_doctypes.py @@ -1,4 +1,3 @@ - import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v13_0/make_non_standard_user_type.py b/erpnext/patches/v13_0/make_non_standard_user_type.py index 9faf298c262..a7bdf93332a 100644 --- a/erpnext/patches/v13_0/make_non_standard_user_type.py +++ b/erpnext/patches/v13_0/make_non_standard_user_type.py @@ -3,7 +3,6 @@ import frappe -from six import iteritems from erpnext.setup.install import add_non_standard_user_types @@ -15,7 +14,7 @@ def execute(): 'hr': ['Employee', 'Expense Claim', 'Leave Application', 'Attendance Request', 'Compensatory Leave Request'] } - for module, doctypes in iteritems(doctype_dict): + for module, doctypes in doctype_dict.items(): for doctype in doctypes: frappe.reload_doc(module, 'doctype', doctype) diff --git a/erpnext/patches/v13_0/modify_invalid_gain_loss_gl_entries.py b/erpnext/patches/v13_0/modify_invalid_gain_loss_gl_entries.py index ad79c811c06..1c659980099 100644 --- a/erpnext/patches/v13_0/modify_invalid_gain_loss_gl_entries.py +++ b/erpnext/patches/v13_0/modify_invalid_gain_loss_gl_entries.py @@ -1,4 +1,3 @@ - import json import frappe diff --git a/erpnext/patches/v13_0/patch_to_fix_reverse_linking_in_additional_salary_encashment_and_incentive.py b/erpnext/patches/v13_0/patch_to_fix_reverse_linking_in_additional_salary_encashment_and_incentive.py index 3d999bf3240..7c10a313a56 100644 --- a/erpnext/patches/v13_0/patch_to_fix_reverse_linking_in_additional_salary_encashment_and_incentive.py +++ b/erpnext/patches/v13_0/patch_to_fix_reverse_linking_in_additional_salary_encashment_and_incentive.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v13_0/rename_discharge_date_in_ip_record.py b/erpnext/patches/v13_0/rename_discharge_date_in_ip_record.py index e9778043229..3bd717d77b8 100644 --- a/erpnext/patches/v13_0/rename_discharge_date_in_ip_record.py +++ b/erpnext/patches/v13_0/rename_discharge_date_in_ip_record.py @@ -1,4 +1,3 @@ - import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v13_0/rename_membership_settings_to_non_profit_settings.py b/erpnext/patches/v13_0/rename_membership_settings_to_non_profit_settings.py index ecd03441e0a..265e2a9b0cf 100644 --- a/erpnext/patches/v13_0/rename_membership_settings_to_non_profit_settings.py +++ b/erpnext/patches/v13_0/rename_membership_settings_to_non_profit_settings.py @@ -1,4 +1,3 @@ - import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v13_0/replace_pos_page_with_point_of_sale_page.py b/erpnext/patches/v13_0/replace_pos_page_with_point_of_sale_page.py index f49b1e4bd8c..7d757b7a0fb 100644 --- a/erpnext/patches/v13_0/replace_pos_page_with_point_of_sale_page.py +++ b/erpnext/patches/v13_0/replace_pos_page_with_point_of_sale_page.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v13_0/set_company_field_in_healthcare_doctypes.py b/erpnext/patches/v13_0/set_company_field_in_healthcare_doctypes.py index b955686a17e..f82a0d56e0c 100644 --- a/erpnext/patches/v13_0/set_company_field_in_healthcare_doctypes.py +++ b/erpnext/patches/v13_0/set_company_field_in_healthcare_doctypes.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v13_0/set_payment_channel_in_payment_gateway_account.py b/erpnext/patches/v13_0/set_payment_channel_in_payment_gateway_account.py index 3b751415eed..87b3389448a 100644 --- a/erpnext/patches/v13_0/set_payment_channel_in_payment_gateway_account.py +++ b/erpnext/patches/v13_0/set_payment_channel_in_payment_gateway_account.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v13_0/set_pos_closing_as_failed.py b/erpnext/patches/v13_0/set_pos_closing_as_failed.py index a838ce07b93..6a3785d8377 100644 --- a/erpnext/patches/v13_0/set_pos_closing_as_failed.py +++ b/erpnext/patches/v13_0/set_pos_closing_as_failed.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v13_0/set_training_event_attendance.py b/erpnext/patches/v13_0/set_training_event_attendance.py index 27a9d3ff089..e44f32157dc 100644 --- a/erpnext/patches/v13_0/set_training_event_attendance.py +++ b/erpnext/patches/v13_0/set_training_event_attendance.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v13_0/set_youtube_video_id.py b/erpnext/patches/v13_0/set_youtube_video_id.py index 76aaaea279c..e1eb1b9bc2f 100644 --- a/erpnext/patches/v13_0/set_youtube_video_id.py +++ b/erpnext/patches/v13_0/set_youtube_video_id.py @@ -1,4 +1,3 @@ - import frappe from erpnext.utilities.doctype.video.video import get_id_from_url diff --git a/erpnext/patches/v13_0/setting_custom_roles_for_some_regional_reports.py b/erpnext/patches/v13_0/setting_custom_roles_for_some_regional_reports.py index 36bedf4f9ba..dc3f8aadc16 100644 --- a/erpnext/patches/v13_0/setting_custom_roles_for_some_regional_reports.py +++ b/erpnext/patches/v13_0/setting_custom_roles_for_some_regional_reports.py @@ -1,4 +1,3 @@ - import frappe from erpnext.regional.india.setup import add_custom_roles_for_reports diff --git a/erpnext/patches/v13_0/update_actual_start_and_end_date_in_wo.py b/erpnext/patches/v13_0/update_actual_start_and_end_date_in_wo.py index 10ecd093069..55fd465b204 100644 --- a/erpnext/patches/v13_0/update_actual_start_and_end_date_in_wo.py +++ b/erpnext/patches/v13_0/update_actual_start_and_end_date_in_wo.py @@ -1,4 +1,3 @@ - # Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt diff --git a/erpnext/patches/v13_0/update_old_loans.py b/erpnext/patches/v13_0/update_old_loans.py index bcd80d4c5c4..e226f1dd567 100644 --- a/erpnext/patches/v13_0/update_old_loans.py +++ b/erpnext/patches/v13_0/update_old_loans.py @@ -1,4 +1,3 @@ - import frappe from frappe import _ from frappe.model.naming import make_autoname diff --git a/erpnext/patches/v13_0/update_subscription.py b/erpnext/patches/v13_0/update_subscription.py index b0bb1c86eea..b67c74de1d2 100644 --- a/erpnext/patches/v13_0/update_subscription.py +++ b/erpnext/patches/v13_0/update_subscription.py @@ -3,7 +3,6 @@ import frappe -from six import iteritems def execute(): @@ -34,7 +33,7 @@ def execute(): 'Based on price list': 'Based On Price List' } - for key, value in iteritems(price_determination_map): + for key, value in price_determination_map.items(): frappe.db.sql(""" UPDATE `tabSubscription Plan` SET price_determination = %s diff --git a/erpnext/patches/v13_0/update_timesheet_changes.py b/erpnext/patches/v13_0/update_timesheet_changes.py index cc38a0c9a16..a5e3391d531 100644 --- a/erpnext/patches/v13_0/update_timesheet_changes.py +++ b/erpnext/patches/v13_0/update_timesheet_changes.py @@ -1,4 +1,3 @@ - import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v14_0/update_opportunity_currency_fields.py b/erpnext/patches/v14_0/update_opportunity_currency_fields.py index 8ef2a94b1c0..13071478c86 100644 --- a/erpnext/patches/v14_0/update_opportunity_currency_fields.py +++ b/erpnext/patches/v14_0/update_opportunity_currency_fields.py @@ -1,4 +1,3 @@ - import frappe from frappe.utils import flt diff --git a/erpnext/patches/v5_7/update_item_description_based_on_item_master.py b/erpnext/patches/v5_7/update_item_description_based_on_item_master.py index e7ef5ff0b49..c46187ca114 100644 --- a/erpnext/patches/v5_7/update_item_description_based_on_item_master.py +++ b/erpnext/patches/v5_7/update_item_description_based_on_item_master.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/patches/v8_1/setup_gst_india.py b/erpnext/patches/v8_1/setup_gst_india.py index 98097d00501..ff9e6a48e83 100644 --- a/erpnext/patches/v8_1/setup_gst_india.py +++ b/erpnext/patches/v8_1/setup_gst_india.py @@ -1,4 +1,3 @@ - import frappe from frappe.email import sendmail_to_system_managers diff --git a/erpnext/patches/v8_7/sync_india_custom_fields.py b/erpnext/patches/v8_7/sync_india_custom_fields.py index b5d58dc2eb8..808c833f6fc 100644 --- a/erpnext/patches/v8_7/sync_india_custom_fields.py +++ b/erpnext/patches/v8_7/sync_india_custom_fields.py @@ -1,4 +1,3 @@ - import frappe from erpnext.regional.india.setup import make_custom_fields diff --git a/erpnext/payroll/doctype/gratuity/gratuity_dashboard.py b/erpnext/payroll/doctype/gratuity/gratuity_dashboard.py index 6276bd6640f..aeadba186d0 100644 --- a/erpnext/payroll/doctype/gratuity/gratuity_dashboard.py +++ b/erpnext/payroll/doctype/gratuity/gratuity_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/payroll/doctype/gratuity_rule/gratuity_rule_dashboard.py b/erpnext/payroll/doctype/gratuity_rule/gratuity_rule_dashboard.py index 15e15d13620..e7c67fbe11b 100644 --- a/erpnext/payroll/doctype/gratuity_rule/gratuity_rule_dashboard.py +++ b/erpnext/payroll/doctype/gratuity_rule/gratuity_rule_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/payroll/doctype/payroll_entry/payroll_entry_dashboard.py b/erpnext/payroll/doctype/payroll_entry/payroll_entry_dashboard.py index 138fed68f4c..a33b28de40f 100644 --- a/erpnext/payroll/doctype/payroll_entry/payroll_entry_dashboard.py +++ b/erpnext/payroll/doctype/payroll_entry/payroll_entry_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'payroll_entry', diff --git a/erpnext/payroll/doctype/payroll_period/payroll_period_dashboard.py b/erpnext/payroll/doctype/payroll_period/payroll_period_dashboard.py index eaa67732af4..8a3332fa6b8 100644 --- a/erpnext/payroll/doctype/payroll_period/payroll_period_dashboard.py +++ b/erpnext/payroll/doctype/payroll_period/payroll_period_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'payroll_period', diff --git a/erpnext/payroll/doctype/salary_slip/salary_slip.py b/erpnext/payroll/doctype/salary_slip/salary_slip.py index 7a5b6d0f6d4..05af09e49db 100644 --- a/erpnext/payroll/doctype/salary_slip/salary_slip.py +++ b/erpnext/payroll/doctype/salary_slip/salary_slip.py @@ -21,7 +21,6 @@ from frappe.utils import ( rounded, ) from frappe.utils.background_jobs import enqueue -from six import iteritems import erpnext from erpnext.accounts.utils import get_fiscal_year @@ -1342,7 +1341,7 @@ class SalarySlip(TransactionBase): from erpnext.hr.doctype.leave_application.leave_application import get_leave_details leave_details = get_leave_details(self.employee, self.end_date) - for leave_type, leave_values in iteritems(leave_details['leave_allocation']): + for leave_type, leave_values in leave_details['leave_allocation'].items(): self.append('leave_details', { 'leave_type': leave_type, 'total_allocated_leaves': flt(leave_values.get('total_leaves')), diff --git a/erpnext/payroll/doctype/salary_structure/salary_structure_dashboard.py b/erpnext/payroll/doctype/salary_structure/salary_structure_dashboard.py index 27eb5ed8b11..014d0bab12a 100644 --- a/erpnext/payroll/doctype/salary_structure/salary_structure_dashboard.py +++ b/erpnext/payroll/doctype/salary_structure/salary_structure_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'salary_structure', diff --git a/erpnext/payroll/notification/retention_bonus/retention_bonus.py b/erpnext/payroll/notification/retention_bonus/retention_bonus.py index 19b550feea7..02e3e933330 100644 --- a/erpnext/payroll/notification/retention_bonus/retention_bonus.py +++ b/erpnext/payroll/notification/retention_bonus/retention_bonus.py @@ -1,5 +1,3 @@ - - def get_context(context): # do your magic here pass diff --git a/erpnext/portal/product_configurator/test_product_configurator.py b/erpnext/portal/product_configurator/test_product_configurator.py index 7a17d1422d9..b478489920d 100644 --- a/erpnext/portal/product_configurator/test_product_configurator.py +++ b/erpnext/portal/product_configurator/test_product_configurator.py @@ -1,4 +1,3 @@ - import unittest import frappe diff --git a/erpnext/portal/utils.py b/erpnext/portal/utils.py index d0a5819fd34..974b51ef0a5 100644 --- a/erpnext/portal/utils.py +++ b/erpnext/portal/utils.py @@ -1,4 +1,3 @@ - import frappe from frappe.utils.nestedset import get_root_of diff --git a/erpnext/projects/doctype/project/project_dashboard.py b/erpnext/projects/doctype/project/project_dashboard.py index df274ed9a94..a7d1835848d 100644 --- a/erpnext/projects/doctype/project/project_dashboard.py +++ b/erpnext/projects/doctype/project/project_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/projects/doctype/project_template/project_template_dashboard.py b/erpnext/projects/doctype/project_template/project_template_dashboard.py index 65cd8d4b55a..a03a57dd80d 100644 --- a/erpnext/projects/doctype/project_template/project_template_dashboard.py +++ b/erpnext/projects/doctype/project_template/project_template_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'project_template', diff --git a/erpnext/projects/doctype/task/task_dashboard.py b/erpnext/projects/doctype/task/task_dashboard.py index 40d04e13ebc..f7470f8972e 100644 --- a/erpnext/projects/doctype/task/task_dashboard.py +++ b/erpnext/projects/doctype/task/task_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/projects/doctype/timesheet/timesheet_dashboard.py b/erpnext/projects/doctype/timesheet/timesheet_dashboard.py index d9a341d4dff..15fe797e23a 100644 --- a/erpnext/projects/doctype/timesheet/timesheet_dashboard.py +++ b/erpnext/projects/doctype/timesheet/timesheet_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/projects/report/delayed_tasks_summary/test_delayed_tasks_summary.py b/erpnext/projects/report/delayed_tasks_summary/test_delayed_tasks_summary.py index 0d97ddf85ae..e2ba7c2c268 100644 --- a/erpnext/projects/report/delayed_tasks_summary/test_delayed_tasks_summary.py +++ b/erpnext/projects/report/delayed_tasks_summary/test_delayed_tasks_summary.py @@ -1,4 +1,3 @@ - import unittest import frappe diff --git a/erpnext/projects/report/employee_hours_utilization_based_on_timesheet/employee_hours_utilization_based_on_timesheet.py b/erpnext/projects/report/employee_hours_utilization_based_on_timesheet/employee_hours_utilization_based_on_timesheet.py index 2854ea31fe0..dd4f8ea7865 100644 --- a/erpnext/projects/report/employee_hours_utilization_based_on_timesheet/employee_hours_utilization_based_on_timesheet.py +++ b/erpnext/projects/report/employee_hours_utilization_based_on_timesheet/employee_hours_utilization_based_on_timesheet.py @@ -5,7 +5,6 @@ import frappe from frappe import _ from frappe.utils import flt, getdate -from six import iteritems def execute(filters=None): @@ -110,7 +109,7 @@ class EmployeeHoursReport: self.data = [] - for emp, data in iteritems(self.stats_by_employee): + for emp, data in self.stats_by_employee.items(): row = frappe._dict() row['employee'] = emp row.update(data) @@ -180,7 +179,7 @@ class EmployeeHoursReport: def calculate_utilizations(self): TOTAL_HOURS = flt(self.standard_working_hours * self.day_span, 2) - for emp, data in iteritems(self.stats_by_employee): + for emp, data in self.stats_by_employee.items(): data['total_hours'] = TOTAL_HOURS data['untracked_hours'] = flt(TOTAL_HOURS - data['billed_hours'] - data['non_billed_hours'], 2) diff --git a/erpnext/projects/report/employee_hours_utilization_based_on_timesheet/test_employee_util.py b/erpnext/projects/report/employee_hours_utilization_based_on_timesheet/test_employee_util.py index 99593822052..b500bc8ab7e 100644 --- a/erpnext/projects/report/employee_hours_utilization_based_on_timesheet/test_employee_util.py +++ b/erpnext/projects/report/employee_hours_utilization_based_on_timesheet/test_employee_util.py @@ -1,4 +1,3 @@ - import unittest import frappe diff --git a/erpnext/projects/report/project_profitability/test_project_profitability.py b/erpnext/projects/report/project_profitability/test_project_profitability.py index 31fd361fce5..2cf9d38bd02 100644 --- a/erpnext/projects/report/project_profitability/test_project_profitability.py +++ b/erpnext/projects/report/project_profitability/test_project_profitability.py @@ -1,4 +1,3 @@ - import unittest import frappe diff --git a/erpnext/projects/web_form/tasks/tasks.py b/erpnext/projects/web_form/tasks/tasks.py index 67cad05a482..99249edff14 100644 --- a/erpnext/projects/web_form/tasks/tasks.py +++ b/erpnext/projects/web_form/tasks/tasks.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/regional/address_template/test_regional_address_template.py b/erpnext/regional/address_template/test_regional_address_template.py index 9ad3d470d4a..780db401584 100644 --- a/erpnext/regional/address_template/test_regional_address_template.py +++ b/erpnext/regional/address_template/test_regional_address_template.py @@ -1,4 +1,3 @@ - from unittest import TestCase import frappe diff --git a/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py b/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py index 8445408e640..d48cd67c384 100644 --- a/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py +++ b/erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py @@ -9,7 +9,6 @@ import frappe from frappe import _ from frappe.model.document import Document from frappe.utils import cstr, flt -from six import iteritems from erpnext.regional.india import state_numbers @@ -281,7 +280,7 @@ class GSTR3BReport(Document): if self.get('invoice_items'): # Build itemised tax for export invoices, nil and exempted where tax table is blank - for invoice, items in iteritems(self.invoice_items): + for invoice, items in self.invoice_items.items(): if invoice not in self.items_based_on_tax_rate and self.invoice_detail_map.get(invoice, {}).get('export_type') \ == "Without Payment of Tax" and self.invoice_detail_map.get(invoice, {}).get('gst_category') == "Overseas": self.items_based_on_tax_rate.setdefault(invoice, {}).setdefault(0, items.keys()) @@ -349,7 +348,7 @@ class GSTR3BReport(Document): self.report_dict['sup_details']['isup_rev']['txval'] += taxable_value def set_inter_state_supply(self, inter_state_supply): - for key, value in iteritems(inter_state_supply): + for key, value in inter_state_supply.items(): if key[0] == "Unregistered": self.report_dict["inter_sup"]["unreg_details"].append(value) diff --git a/erpnext/regional/germany/utils/datev/datev_constants.py b/erpnext/regional/germany/utils/datev/datev_constants.py index be3d7a3e542..8f2dc2dec39 100644 --- a/erpnext/regional/germany/utils/datev/datev_constants.py +++ b/erpnext/regional/germany/utils/datev/datev_constants.py @@ -1,4 +1,3 @@ -# coding: utf-8 """Constants used in datev.py.""" TRANSACTION_COLUMNS = [ diff --git a/erpnext/regional/germany/utils/datev/datev_csv.py b/erpnext/regional/germany/utils/datev/datev_csv.py index d46abe91873..2d1e02eadba 100644 --- a/erpnext/regional/germany/utils/datev/datev_csv.py +++ b/erpnext/regional/germany/utils/datev/datev_csv.py @@ -1,5 +1,3 @@ -# coding: utf-8 - import datetime import zipfile from csv import QUOTE_NONNUMERIC @@ -45,7 +43,7 @@ def get_datev_csv(data, filters, csv_class): data = result.to_csv( # Reason for str(';'): https://github.com/pandas-dev/pandas/issues/6035 - sep=str(';'), + sep=';', # European decimal seperator decimal=',', # Windows "ANSI" encoding diff --git a/erpnext/regional/india/__init__.py b/erpnext/regional/india/__init__.py index 2dc762f0ebd..c703575d7de 100644 --- a/erpnext/regional/india/__init__.py +++ b/erpnext/regional/india/__init__.py @@ -1,6 +1,4 @@ -from six import iteritems - states = [ '', 'Andaman and Nicobar Islands', @@ -82,4 +80,4 @@ state_numbers = { "West Bengal": "19", } -number_state_mapping = {v: k for k, v in iteritems(state_numbers)} +number_state_mapping = {v: k for k, v in state_numbers.items()} diff --git a/erpnext/regional/india/test_utils.py b/erpnext/regional/india/test_utils.py index 61a0e97fe3e..c95a0b3cc65 100644 --- a/erpnext/regional/india/test_utils.py +++ b/erpnext/regional/india/test_utils.py @@ -1,4 +1,3 @@ - import unittest from unittest.mock import patch diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index e7539f516e4..9efad6d05fd 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -1,4 +1,3 @@ - import json import re @@ -6,7 +5,6 @@ import frappe from frappe import _ from frappe.model.utils import get_fetch_values from frappe.utils import cint, cstr, date_diff, flt, getdate, nowdate -from six import string_types from erpnext.controllers.accounts_controller import get_taxes_and_charges from erpnext.controllers.taxes_and_totals import get_itemised_tax, get_itemised_taxable_amount @@ -193,7 +191,7 @@ def get_place_of_supply(party_details, doctype): @frappe.whitelist() def get_regional_address_details(party_details, doctype, company): - if isinstance(party_details, string_types): + if isinstance(party_details, str): party_details = json.loads(party_details) party_details = frappe._dict(party_details) @@ -790,7 +788,7 @@ def get_regional_round_off_accounts(company, account_list): if country != 'India': return - if isinstance(account_list, string_types): + if isinstance(account_list, str): account_list = json.loads(account_list) if not frappe.db.get_single_value('GST Settings', 'round_off_gst_values'): diff --git a/erpnext/regional/italy/__init__.py b/erpnext/regional/italy/__init__.py index 4932f660ca5..eb20f65afb4 100644 --- a/erpnext/regional/italy/__init__.py +++ b/erpnext/regional/italy/__init__.py @@ -1,5 +1,3 @@ -# coding=utf-8 - fiscal_regimes = [ "RF01-Ordinario", "RF02-Contribuenti minimi (art.1, c.96-117, L. 244/07)", diff --git a/erpnext/regional/italy/utils.py b/erpnext/regional/italy/utils.py index 8d1558be227..c82557b9de0 100644 --- a/erpnext/regional/italy/utils.py +++ b/erpnext/regional/italy/utils.py @@ -1,4 +1,3 @@ - import io import json @@ -6,7 +5,6 @@ import frappe from frappe import _ from frappe.utils import cstr, flt from frappe.utils.file_manager import remove_file -from six import string_types from erpnext.controllers.taxes_and_totals import get_itemised_tax from erpnext.regional.italy import state_codes @@ -167,7 +165,7 @@ def get_invoice_summary(items, taxes): if tax.rate == 0: for item in items: item_tax_rate = item.item_tax_rate - if isinstance(item.item_tax_rate, string_types): + if isinstance(item.item_tax_rate, str): item_tax_rate = json.loads(item.item_tax_rate) if item_tax_rate and tax.account_head in item_tax_rate: diff --git a/erpnext/regional/report/datev/datev.py b/erpnext/regional/report/datev/datev.py index 889732229ed..beac7ed65cd 100644 --- a/erpnext/regional/report/datev/datev.py +++ b/erpnext/regional/report/datev/datev.py @@ -1,4 +1,3 @@ -# coding: utf-8 """ Provide a report and downloadable CSV according to the German DATEV format. @@ -12,7 +11,6 @@ import json import frappe from frappe import _ -from six import string_types from erpnext.accounts.utils import get_fiscal_year from erpnext.regional.germany.utils.datev.datev_constants import ( @@ -545,7 +543,7 @@ def download_datev_csv(filters): Arguments / Params: filters -- dict of filters to be passed to the sql query """ - if isinstance(filters, string_types): + if isinstance(filters, str): filters = json.loads(filters) validate(filters) diff --git a/erpnext/regional/report/datev/test_datev.py b/erpnext/regional/report/datev/test_datev.py index 7ca0b1b50fe..14d5495eed7 100644 --- a/erpnext/regional/report/datev/test_datev.py +++ b/erpnext/regional/report/datev/test_datev.py @@ -1,5 +1,3 @@ -# coding=utf-8 - import zipfile from unittest import TestCase diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py index 933c522de25..27cfaf76146 100644 --- a/erpnext/regional/report/gstr_1/gstr_1.py +++ b/erpnext/regional/report/gstr_1/gstr_1.py @@ -8,7 +8,6 @@ from datetime import date import frappe from frappe import _ from frappe.utils import flt, formatdate, getdate -from six import iteritems from erpnext.regional.india.utils import get_gst_accounts @@ -123,7 +122,7 @@ class Gstr1Report(object): row["cess_amount"] += flt(self.invoice_cess.get(inv), 2) row["type"] = "E" if ecommerce_gstin else "OE" - for key, value in iteritems(b2cs_output): + for key, value in b2cs_output.items(): self.data.append(value) def get_row_data_for_invoice(self, invoice, invoice_details, tax_rate, items): @@ -317,7 +316,7 @@ class Gstr1Report(object): + "
" + "
".join(unidentified_gst_accounts), alert=True) # Build itemised tax for export invoices where tax table is blank - for invoice, items in iteritems(self.invoice_items): + for invoice, items in self.invoice_items.items(): if invoice not in self.items_based_on_tax_rate and invoice not in unidentified_gst_accounts_invoice \ and self.invoices.get(invoice, {}).get('export_type') == "Without Payment of Tax" \ and self.invoices.get(invoice, {}).get('gst_category') == "Overseas": @@ -782,7 +781,7 @@ def get_b2b_json(res, gstin): b2b_item, inv = {"ctin": gst_in, "inv": []}, [] if not gst_in: continue - for number, invoice in iteritems(res[gst_in]): + for number, invoice in res[gst_in].items(): if not invoice[0]["place_of_supply"]: frappe.throw(_("""{0} not entered in Invoice {1}. Please update and try again""").format(frappe.bold("Place Of Supply"), @@ -851,7 +850,7 @@ def get_b2cs_json(data, gstin): def get_advances_json(data, gstin): company_state_number = gstin[0:2] out = [] - for place_of_supply, items in iteritems(data): + for place_of_supply, items in data.items(): supply_type = "INTRA" if company_state_number == place_of_supply.split('-')[0] else "INTER" row = { "pos": place_of_supply.split('-')[0], @@ -933,7 +932,7 @@ def get_cdnr_reg_json(res, gstin): cdnr_item, inv = {"ctin": gst_in, "nt": []}, [] if not gst_in: continue - for number, invoice in iteritems(res[gst_in]): + for number, invoice in res[gst_in].items(): if not invoice[0]["place_of_supply"]: frappe.throw(_("""{0} not entered in Invoice {1}. Please update and try again""").format(frappe.bold("Place Of Supply"), @@ -964,7 +963,7 @@ def get_cdnr_reg_json(res, gstin): def get_cdnr_unreg_json(res, gstin): out = [] - for invoice, items in iteritems(res): + for invoice, items in res.items(): inv_item = { "nt_num": items[0]["invoice_number"], "nt_dt": getdate(items[0]["posting_date"]).strftime('%d-%m-%Y'), diff --git a/erpnext/regional/report/hsn_wise_summary_of_outward_supplies/hsn_wise_summary_of_outward_supplies.py b/erpnext/regional/report/hsn_wise_summary_of_outward_supplies/hsn_wise_summary_of_outward_supplies.py index 17d611738d3..e03ad374aef 100644 --- a/erpnext/regional/report/hsn_wise_summary_of_outward_supplies/hsn_wise_summary_of_outward_supplies.py +++ b/erpnext/regional/report/hsn_wise_summary_of_outward_supplies/hsn_wise_summary_of_outward_supplies.py @@ -8,7 +8,6 @@ import frappe from frappe import _ from frappe.model.meta import get_field_precision from frappe.utils import cstr, flt, getdate -from six import iteritems import erpnext from erpnext.regional.india.utils import get_gst_accounts @@ -212,7 +211,7 @@ def get_merged_data(columns, data): else: merged_hsn_dict[row[0]][d['fieldname']] = row[i] - for key, value in iteritems(merged_hsn_dict): + for key, value in merged_hsn_dict.items(): result.append(value) return result diff --git a/erpnext/regional/report/uae_vat_201/test_uae_vat_201.py b/erpnext/regional/report/uae_vat_201/test_uae_vat_201.py index 62d694ba7ba..41336873ac9 100644 --- a/erpnext/regional/report/uae_vat_201/test_uae_vat_201.py +++ b/erpnext/regional/report/uae_vat_201/test_uae_vat_201.py @@ -1,5 +1,3 @@ -# coding=utf-8 - from unittest import TestCase import frappe diff --git a/erpnext/regional/turkey/setup.py b/erpnext/regional/turkey/setup.py index aedebdfc6a9..1d3770aefcb 100644 --- a/erpnext/regional/turkey/setup.py +++ b/erpnext/regional/turkey/setup.py @@ -1,3 +1,2 @@ - def setup(company=None, patch=True): pass diff --git a/erpnext/regional/united_arab_emirates/utils.py b/erpnext/regional/united_arab_emirates/utils.py index 891e75e0033..f350ec4ec2c 100644 --- a/erpnext/regional/united_arab_emirates/utils.py +++ b/erpnext/regional/united_arab_emirates/utils.py @@ -1,8 +1,6 @@ - import frappe from frappe import _ from frappe.utils import flt, money_in_words, round_based_on_smallest_currency_fraction -from six import iteritems import erpnext from erpnext.controllers.taxes_and_totals import get_itemised_tax @@ -23,7 +21,7 @@ def update_itemised_tax_data(doc): # First check if tax rate is present # If not then look up in item_wise_tax_detail if item_tax_rate: - for account, rate in iteritems(item_tax_rate): + for account, rate in item_tax_rate.items(): tax_rate += rate elif row.item_code and itemised_tax.get(row.item_code): tax_rate = sum([tax.get('tax_rate', 0) for d, tax in itemised_tax.get(row.item_code).items()]) diff --git a/erpnext/restaurant/doctype/restaurant/restaurant_dashboard.py b/erpnext/restaurant/doctype/restaurant/restaurant_dashboard.py index c91ef56142d..bfdd052753e 100644 --- a/erpnext/restaurant/doctype/restaurant/restaurant_dashboard.py +++ b/erpnext/restaurant/doctype/restaurant/restaurant_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/selling/doctype/customer/customer_dashboard.py b/erpnext/selling/doctype/customer/customer_dashboard.py index faf8a4403ca..58394d0acb7 100644 --- a/erpnext/selling/doctype/customer/customer_dashboard.py +++ b/erpnext/selling/doctype/customer/customer_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/selling/doctype/customer/test_customer.py b/erpnext/selling/doctype/customer/test_customer.py index 83af81654c5..7d6b74d0665 100644 --- a/erpnext/selling/doctype/customer/test_customer.py +++ b/erpnext/selling/doctype/customer/test_customer.py @@ -17,7 +17,6 @@ test_ignore = ["Price List"] test_dependencies = ['Payment Term', 'Payment Terms Template'] test_records = frappe.get_test_records('Customer') -from six import iteritems class TestCustomer(unittest.TestCase): @@ -90,7 +89,7 @@ class TestCustomer(unittest.TestCase): details = get_party_details("_Test Customer") - for key, value in iteritems(to_check): + for key, value in to_check.items(): val = details.get(key) if not val and not isinstance(val, list): val = None diff --git a/erpnext/selling/doctype/product_bundle/test_product_bundle.py b/erpnext/selling/doctype/product_bundle/test_product_bundle.py index b966c62f66c..c1e2fdee8b8 100644 --- a/erpnext/selling/doctype/product_bundle/test_product_bundle.py +++ b/erpnext/selling/doctype/product_bundle/test_product_bundle.py @@ -1,4 +1,3 @@ - # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt diff --git a/erpnext/selling/doctype/quotation/quotation_dashboard.py b/erpnext/selling/doctype/quotation/quotation_dashboard.py index 46de292cc4d..0a1aad7bb6e 100644 --- a/erpnext/selling/doctype/quotation/quotation_dashboard.py +++ b/erpnext/selling/doctype/quotation/quotation_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 1ab8aa4f3af..8cb0f29e9b5 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -12,7 +12,6 @@ from frappe.desk.notifications import clear_doctype_notifications from frappe.model.mapper import get_mapped_doc from frappe.model.utils import get_fetch_values from frappe.utils import add_days, cint, cstr, flt, get_link_to_form, getdate, nowdate, strip_html -from six import string_types from erpnext.accounts.doctype.sales_invoice.sales_invoice import ( unlink_inter_company_doc, @@ -790,7 +789,7 @@ def make_purchase_order_for_default_supplier(source_name, selected_items=None, t """Creates Purchase Order for each Supplier. Returns a list of doc objects.""" if not selected_items: return - if isinstance(selected_items, string_types): + if isinstance(selected_items, str): selected_items = json.loads(selected_items) def set_missing_values(source, target): @@ -891,7 +890,7 @@ def make_purchase_order_for_default_supplier(source_name, selected_items=None, t def make_purchase_order(source_name, selected_items=None, target_doc=None): if not selected_items: return - if isinstance(selected_items, string_types): + if isinstance(selected_items, str): selected_items = json.loads(selected_items) items_to_map = [item.get('item_code') for item in selected_items if item.get('item_code') and item.get('item_code')] @@ -1045,7 +1044,7 @@ def make_raw_material_request(items, company, sales_order, project=None): if not frappe.has_permission("Sales Order", "write"): frappe.throw(_("Not permitted"), frappe.PermissionError) - if isinstance(items, string_types): + if isinstance(items, str): items = frappe._dict(json.loads(items)) for item in items.get('items'): diff --git a/erpnext/selling/doctype/sales_order/sales_order_dashboard.py b/erpnext/selling/doctype/sales_order/sales_order_dashboard.py index abf507a9e54..1e616b87b22 100644 --- a/erpnext/selling/doctype/sales_order/sales_order_dashboard.py +++ b/erpnext/selling/doctype/sales_order/sales_order_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/selling/report/address_and_contacts/address_and_contacts.py b/erpnext/selling/report/address_and_contacts/address_and_contacts.py index 319e78f4889..915f8dc3cfe 100644 --- a/erpnext/selling/report/address_and_contacts/address_and_contacts.py +++ b/erpnext/selling/report/address_and_contacts/address_and_contacts.py @@ -3,8 +3,6 @@ import frappe -from six import iteritems -from six.moves import range field_map = { "Contact": [ "first_name", "last_name", "phone", "mobile_no", "email_id", "is_primary_contact" ], @@ -66,7 +64,7 @@ def get_party_addresses_and_contact(party_type, party, party_group): party_details = get_party_details(party_type, party_list, "Address", party_details) party_details = get_party_details(party_type, party_list, "Contact", party_details) - for party, details in iteritems(party_details): + for party, details in party_details.items(): addresses = details.get("address", []) contacts = details.get("contact", []) if not any([addresses, contacts]): diff --git a/erpnext/selling/report/sales_analytics/sales_analytics.py b/erpnext/selling/report/sales_analytics/sales_analytics.py index a380f842ebf..83588c34569 100644 --- a/erpnext/selling/report/sales_analytics/sales_analytics.py +++ b/erpnext/selling/report/sales_analytics/sales_analytics.py @@ -5,7 +5,6 @@ import frappe from frappe import _, scrub from frappe.utils import add_days, add_to_date, flt, getdate -from six import iteritems from erpnext.accounts.utils import get_fiscal_year @@ -226,7 +225,7 @@ class Analytics(object): self.data = [] self.get_periodic_data() - for entity, period_data in iteritems(self.entity_periodic_data): + for entity, period_data in self.entity_periodic_data.items(): row = { "entity": entity, "entity_name": self.entity_names.get(entity) if hasattr(self, 'entity_names') else None diff --git a/erpnext/setup/default_energy_point_rules.py b/erpnext/setup/default_energy_point_rules.py index cfff75e525c..1ce06b8c2f4 100644 --- a/erpnext/setup/default_energy_point_rules.py +++ b/erpnext/setup/default_energy_point_rules.py @@ -1,4 +1,3 @@ - from frappe import _ doctype_rule_map = { diff --git a/erpnext/setup/default_success_action.py b/erpnext/setup/default_success_action.py index 338fb43f249..a1f48df672a 100644 --- a/erpnext/setup/default_success_action.py +++ b/erpnext/setup/default_success_action.py @@ -1,4 +1,3 @@ - from frappe import _ doctype_list = [ diff --git a/erpnext/setup/doctype/company/company_dashboard.py b/erpnext/setup/doctype/company/company_dashboard.py index b63c05dbd11..7cb0b1254f6 100644 --- a/erpnext/setup/doctype/company/company_dashboard.py +++ b/erpnext/setup/doctype/company/company_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/setup/doctype/email_digest/quotes.py b/erpnext/setup/doctype/email_digest/quotes.py index 0fbadd98cd5..fbd2d941179 100644 --- a/erpnext/setup/doctype/email_digest/quotes.py +++ b/erpnext/setup/doctype/email_digest/quotes.py @@ -1,4 +1,3 @@ - import random diff --git a/erpnext/setup/doctype/sales_person/sales_person_dashboard.py b/erpnext/setup/doctype/sales_person/sales_person_dashboard.py index d0a5dd99dfc..e946406e638 100644 --- a/erpnext/setup/doctype/sales_person/sales_person_dashboard.py +++ b/erpnext/setup/doctype/sales_person/sales_person_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py index 8e6421eba8a..658f286f7c3 100644 --- a/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py +++ b/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py @@ -9,7 +9,6 @@ from frappe import _, throw from frappe.model.document import Document from frappe.utils import cint from frappe.utils.jinja import validate_template -from six import string_types class TermsandConditions(Document): @@ -21,7 +20,7 @@ class TermsandConditions(Document): @frappe.whitelist() def get_terms_and_conditions(template_name, doc): - if isinstance(doc, string_types): + if isinstance(doc, str): doc = json.loads(doc) terms_and_conditions = frappe.get_doc("Terms and Conditions", template_name) diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py index 67d11438714..86c9b3f178d 100644 --- a/erpnext/setup/install.py +++ b/erpnext/setup/install.py @@ -8,7 +8,6 @@ from frappe.custom.doctype.custom_field.custom_field import create_custom_field from frappe.desk.page.setup_wizard.setup_wizard import add_all_roles_to from frappe.installer import update_site_config from frappe.utils import cint -from six import iteritems from erpnext.accounts.doctype.cash_flow_mapper.default_cash_flow_mapper import DEFAULT_MAPPERS from erpnext.setup.default_energy_point_rules import get_default_energy_point_rules @@ -173,12 +172,12 @@ def add_non_standard_user_types(): user_types = get_user_types_data() user_type_limit = {} - for user_type, data in iteritems(user_types): + for user_type, data in user_types.items(): user_type_limit.setdefault(frappe.scrub(user_type), 10) update_site_config('user_type_doctype_limit', user_type_limit) - for user_type, data in iteritems(user_types): + for user_type, data in user_types.items(): create_custom_role(data) create_user_type(user_type, data) @@ -228,7 +227,7 @@ def create_user_type(user_type, data): doc.save(ignore_permissions=True) def create_role_permissions_for_doctype(doc, data): - for doctype, perms in iteritems(data.get('doctypes')): + for doctype, perms in data.get('doctypes').items(): args = {'document_type': doctype} for perm in perms: args[perm] = 1 diff --git a/erpnext/setup/setup_wizard/data/dashboard_charts.py b/erpnext/setup/setup_wizard/data/dashboard_charts.py index e3b33df237f..6cb15b2a46c 100644 --- a/erpnext/setup/setup_wizard/data/dashboard_charts.py +++ b/erpnext/setup/setup_wizard/data/dashboard_charts.py @@ -1,4 +1,3 @@ - import json import frappe diff --git a/erpnext/setup/setup_wizard/data/industry_type.py b/erpnext/setup/setup_wizard/data/industry_type.py index 542dfc76dcb..ecd8b001991 100644 --- a/erpnext/setup/setup_wizard/data/industry_type.py +++ b/erpnext/setup/setup_wizard/data/industry_type.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/setup/setup_wizard/utils.py b/erpnext/setup/setup_wizard/utils.py index afab7e712bb..f1ec50afcea 100644 --- a/erpnext/setup/setup_wizard/utils.py +++ b/erpnext/setup/setup_wizard/utils.py @@ -1,4 +1,3 @@ - import json import os diff --git a/erpnext/startup/__init__.py b/erpnext/startup/__init__.py index d1933d23969..dd1b40108cb 100644 --- a/erpnext/startup/__init__.py +++ b/erpnext/startup/__init__.py @@ -1,4 +1,3 @@ - # ERPNext - web based ERP (http://erpnext.com) # Copyright (C) 2012 Frappe Technologies Pvt Ltd # diff --git a/erpnext/startup/filters.py b/erpnext/startup/filters.py index c0ccf54d5f6..4fd64312f56 100644 --- a/erpnext/startup/filters.py +++ b/erpnext/startup/filters.py @@ -1,6 +1,3 @@ - - - def get_filters_config(): filters_config = { "fiscal year": { diff --git a/erpnext/startup/leaderboard.py b/erpnext/startup/leaderboard.py index a92abf11130..8ae70d2a903 100644 --- a/erpnext/startup/leaderboard.py +++ b/erpnext/startup/leaderboard.py @@ -1,5 +1,3 @@ - - import frappe from frappe.utils import cint diff --git a/erpnext/stock/__init__.py b/erpnext/stock/__init__.py index 9fd1f0e8ce1..e8b2804b7d7 100644 --- a/erpnext/stock/__init__.py +++ b/erpnext/stock/__init__.py @@ -1,4 +1,3 @@ - import frappe from frappe import _ diff --git a/erpnext/stock/dashboard/item_dashboard.py b/erpnext/stock/dashboard/item_dashboard.py index 9a83372f3e3..57d78a21e14 100644 --- a/erpnext/stock/dashboard/item_dashboard.py +++ b/erpnext/stock/dashboard/item_dashboard.py @@ -1,4 +1,3 @@ - import frappe from frappe.model.db_query import DatabaseQuery from frappe.utils import cint, flt diff --git a/erpnext/stock/dashboard/warehouse_capacity_dashboard.py b/erpnext/stock/dashboard/warehouse_capacity_dashboard.py index e8b0bea468e..c0666cffc78 100644 --- a/erpnext/stock/dashboard/warehouse_capacity_dashboard.py +++ b/erpnext/stock/dashboard/warehouse_capacity_dashboard.py @@ -1,4 +1,3 @@ - import frappe from frappe.model.db_query import DatabaseQuery from frappe.utils import flt, nowdate diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py index 3ce2d87f711..fdefd248783 100644 --- a/erpnext/stock/doctype/batch/batch.py +++ b/erpnext/stock/doctype/batch/batch.py @@ -9,7 +9,6 @@ from frappe.model.naming import make_autoname, revert_series_if_last from frappe.utils import cint, flt, get_link_to_form from frappe.utils.data import add_days from frappe.utils.jinja import render_template -from six import text_type class UnableToSelectBatchError(frappe.ValidationError): @@ -62,7 +61,7 @@ def _make_naming_series_key(prefix): :param prefix: Naming series prefix gotten from Stock Settings :return: The derived key. If no prefix is given, an empty string is returned """ - if not text_type(prefix): + if not str(prefix): return '' else: return prefix.upper() + '.#####' diff --git a/erpnext/stock/doctype/batch/batch_dashboard.py b/erpnext/stock/doctype/batch/batch_dashboard.py index afa0fca99a0..725365b2fc5 100644 --- a/erpnext/stock/doctype/batch/batch_dashboard.py +++ b/erpnext/stock/doctype/batch/batch_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py b/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py index 61d8de4a06d..ca61a369288 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/stock/doctype/item/item_dashboard.py b/erpnext/stock/doctype/item/item_dashboard.py index b0f1bbc2d52..e16f5bbfeb0 100644 --- a/erpnext/stock/doctype/item/item_dashboard.py +++ b/erpnext/stock/doctype/item/item_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py index a9ee4b07426..d717c50919f 100644 --- a/erpnext/stock/doctype/material_request/material_request.py +++ b/erpnext/stock/doctype/material_request/material_request.py @@ -11,7 +11,6 @@ import frappe from frappe import _, msgprint from frappe.model.mapper import get_mapped_doc from frappe.utils import cstr, flt, get_link_to_form, getdate, new_line_sep, nowdate -from six import string_types from erpnext.buying.utils import check_on_hold_or_closed_status, validate_for_items from erpnext.controllers.buying_controller import BuyingController @@ -274,7 +273,7 @@ def update_status(name, status): def make_purchase_order(source_name, target_doc=None, args=None): if args is None: args = {} - if isinstance(args, string_types): + if isinstance(args, str): args = json.loads(args) def postprocess(source, target_doc): diff --git a/erpnext/stock/doctype/material_request/material_request_dashboard.py b/erpnext/stock/doctype/material_request/material_request_dashboard.py index 9133859b24f..c1ce0a93e21 100644 --- a/erpnext/stock/doctype/material_request/material_request_dashboard.py +++ b/erpnext/stock/doctype/material_request/material_request_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/stock/doctype/pick_list/pick_list.py b/erpnext/stock/doctype/pick_list/pick_list.py index b7987543f2b..5484a117ddb 100644 --- a/erpnext/stock/doctype/pick_list/pick_list.py +++ b/erpnext/stock/doctype/pick_list/pick_list.py @@ -9,7 +9,6 @@ from frappe import _ from frappe.model.document import Document from frappe.model.mapper import map_child_doc from frappe.utils import cint, floor, flt, today -from six import iteritems from erpnext.selling.doctype.sales_order.sales_order import ( make_delivery_note as create_delivery_note_from_sales_order, @@ -246,7 +245,7 @@ def get_available_item_locations_for_serialized_item(item_code, from_warehouses, warehouse_serial_nos_map.setdefault(warehouse, []).append(serial_no) locations = [] - for warehouse, serial_nos in iteritems(warehouse_serial_nos_map): + for warehouse, serial_nos in warehouse_serial_nos_map.items(): locations.append({ 'qty': len(serial_nos), 'warehouse': warehouse, diff --git a/erpnext/stock/doctype/pick_list/pick_list_dashboard.py b/erpnext/stock/doctype/pick_list/pick_list_dashboard.py index d19bedeeafe..ec3047e98fe 100644 --- a/erpnext/stock/doctype/pick_list/pick_list_dashboard.py +++ b/erpnext/stock/doctype/pick_list/pick_list_dashboard.py @@ -1,5 +1,3 @@ - - def get_data(): return { 'fieldname': 'pick_list', diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 954e47d3bef..762f45f75f2 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -7,7 +7,6 @@ from frappe import _, throw from frappe.desk.notifications import clear_doctype_notifications from frappe.model.mapper import get_mapped_doc from frappe.utils import cint, flt, getdate, nowdate -from six import iteritems from erpnext.accounts.utils import get_account_currency from erpnext.assets.doctype.asset.asset import get_asset_account, is_cwip_accounting_enabled @@ -358,7 +357,7 @@ class PurchaseReceipt(BuyingController): # Amount added through landed-cos-voucher if d.landed_cost_voucher_amount and landed_cost_entries: - for account, amount in iteritems(landed_cost_entries[(d.item_code, d.name)]): + for account, amount in landed_cost_entries[(d.item_code, d.name)].items(): account_currency = get_account_currency(account) credit_amount = (flt(amount["base_amount"]) if (amount["base_amount"] or account_currency!=self.company_currency) else flt(amount["amount"])) diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py index 18da88c3753..bdc5435988d 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index a4883523fae..102730b055f 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -7,7 +7,6 @@ import unittest import frappe from frappe.utils import add_days, cint, cstr, flt, today -from six import iteritems import erpnext from erpnext.accounts.doctype.account.test_account import get_inventory_account @@ -486,7 +485,7 @@ class TestPurchaseReceipt(ERPNextTestCase): def test_purchase_return_for_serialized_items(self): def _check_serial_no_values(serial_no, field_values): serial_no = frappe.get_doc("Serial No", serial_no) - for field, value in iteritems(field_values): + for field, value in field_values.items(): self.assertEqual(cstr(serial_no.get(field)), value) from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos diff --git a/erpnext/stock/doctype/putaway_rule/putaway_rule.py b/erpnext/stock/doctype/putaway_rule/putaway_rule.py index 25330b71833..523ba120de8 100644 --- a/erpnext/stock/doctype/putaway_rule/putaway_rule.py +++ b/erpnext/stock/doctype/putaway_rule/putaway_rule.py @@ -10,7 +10,6 @@ import frappe from frappe import _ from frappe.model.document import Document from frappe.utils import cint, floor, flt, nowdate -from six import string_types from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos from erpnext.stock.utils import get_stock_balance @@ -75,7 +74,7 @@ def apply_putaway_rule(doctype, items, company, sync=None, purpose=None): purpose: Purpose of Stock Entry sync (optional): Sync with client side only for client side calls """ - if isinstance(items, string_types): + if isinstance(items, str): items = json.loads(items) items_not_accomodated, updated_table = [], [] diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py index 8f41c9da54f..d9d1957c0b1 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.py +++ b/erpnext/stock/doctype/serial_no/serial_no.py @@ -8,8 +8,6 @@ import frappe from frappe import ValidationError, _ from frappe.model.naming import make_autoname from frappe.utils import add_days, cint, cstr, flt, get_link_to_form, getdate, nowdate -from six import string_types -from six.moves import map from erpnext.controllers.stock_controller import StockController from erpnext.stock.get_item_details import get_reserved_qty_for_so @@ -590,7 +588,7 @@ def auto_fetch_serial_number(qty, item_code, warehouse, posting_date=None, batch @frappe.whitelist() def get_pos_reserved_serial_nos(filters): - if isinstance(filters, string_types): + if isinstance(filters, str): filters = json.loads(filters) pos_transacted_sr_nos = frappe.db.sql("""select item.serial_no as serial_no diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 882b8dfae0c..fa2436bd27d 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -9,7 +9,6 @@ import frappe from frappe import _ from frappe.model.mapper import get_mapped_doc from frappe.utils import cint, comma_or, cstr, flt, format_time, formatdate, getdate, nowdate -from six import iteritems, itervalues, string_types import erpnext from erpnext.accounts.general_ledger import process_gl_map @@ -287,7 +286,7 @@ class StockEntry(StockController): if d.is_finished_item or d.is_process_loss: item_wise_qty.setdefault(d.item_code, []).append(d.qty) - for item_code, qty_list in iteritems(item_wise_qty): + for item_code, qty_list in item_wise_qty.items(): total = flt(sum(qty_list), frappe.get_precision("Stock Entry Detail", "qty")) if self.fg_completed_qty != total: frappe.throw(_("The finished product {0} quantity {1} and For Quantity {2} cannot be different") @@ -845,7 +844,7 @@ class StockEntry(StockController): if item_account_wise_additional_cost: for d in self.get("items"): - for account, amount in iteritems(item_account_wise_additional_cost.get((d.item_code, d.name), {})): + for account, amount in item_account_wise_additional_cost.get((d.item_code, d.name), {}).items(): if not amount: continue gl_entries.append(self.get_gl_dict({ @@ -1017,7 +1016,7 @@ class StockEntry(StockController): if self.work_order and self.purpose == "Material Transfer for Manufacture": item_dict = self.get_pending_raw_materials(backflush_based_on) if self.to_warehouse and self.pro_doc: - for item in itervalues(item_dict): + for item in item_dict.values(): item["to_warehouse"] = self.pro_doc.wip_warehouse self.add_to_stock_entry_detail(item_dict) @@ -1048,7 +1047,7 @@ class StockEntry(StockController): WHERE po.name = poitemsup.parent and po.name = %s """,self.purchase_order)) - for item in itervalues(item_dict): + for item in item_dict.values(): if self.pro_doc and cint(self.pro_doc.from_wip_warehouse): item["from_warehouse"] = self.pro_doc.wip_warehouse #Get Reserve Warehouse from PO @@ -1077,7 +1076,7 @@ class StockEntry(StockController): def set_scrap_items(self): if self.purpose != "Send to Subcontractor" and self.purpose in ["Manufacture", "Repack"]: scrap_item_dict = self.get_bom_scrap_material(self.fg_completed_qty) - for item in itervalues(scrap_item_dict): + for item in scrap_item_dict.values(): item.idx = '' if self.pro_doc and self.pro_doc.scrap_warehouse: item["to_warehouse"] = self.pro_doc.scrap_warehouse @@ -1181,7 +1180,7 @@ class StockEntry(StockController): fetch_exploded = self.use_multi_level_bom, fetch_qty_in_stock_uom=False) used_alternative_items = get_used_alternative_items(work_order = self.work_order) - for item in itervalues(item_dict): + for item in item_dict.values(): # if source warehouse presents in BOM set from_warehouse as bom source_warehouse if item["allow_alternative_item"]: item["allow_alternative_item"] = frappe.db.get_value('Work Order', @@ -1206,7 +1205,7 @@ class StockEntry(StockController): item_dict = get_bom_items_as_dict(self.bom_no, self.company, qty=qty, fetch_exploded = 0, fetch_scrap_items = 1) or {} - for item in itervalues(item_dict): + for item in item_dict.values(): item.from_warehouse = "" item.is_scrap_item = 1 @@ -1437,7 +1436,7 @@ class StockEntry(StockController): if transfer_limit_qty >= to_transfer_qty: allow_overproduction = True - for item, item_details in iteritems(item_dict): + for item, item_details in item_dict.items(): pending_to_issue = flt(item_details.required_qty) - flt(item_details.transferred_qty) desire_to_transfer = flt(self.fg_completed_qty) * flt(item_details.required_qty) / max_qty @@ -1747,7 +1746,7 @@ class StockEntry(StockController): @frappe.whitelist() def move_sample_to_retention_warehouse(company, items): - if isinstance(items, string_types): + if isinstance(items, str): items = json.loads(items) retention_warehouse = frappe.db.get_single_value('Stock Settings', 'sample_retention_warehouse') stock_entry = frappe.new_doc("Stock Entry") @@ -1933,7 +1932,7 @@ def get_expired_batch_items(): @frappe.whitelist() def get_warehouse_details(args): - if isinstance(args, string_types): + if isinstance(args, str): args = json.loads(args) args = frappe._dict(args) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry_utils.py b/erpnext/stock/doctype/stock_entry/stock_entry_utils.py index 5832fe49b2d..17266ad059b 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry_utils.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry_utils.py @@ -4,7 +4,6 @@ import frappe from frappe.utils import cint, flt -from six import string_types import erpnext @@ -60,7 +59,7 @@ def make_stock_entry(**args): if args.apply_putaway_rule: s.apply_putaway_rule = args.apply_putaway_rule - if isinstance(args.qty, string_types): + if isinstance(args.qty, str): if '.' in args.qty: args.qty = flt(args.qty) else: diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py index d5d40c116e3..067946785a9 100644 --- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py @@ -7,7 +7,6 @@ import unittest import frappe from frappe.permissions import add_user_permission, remove_user_permission from frappe.utils import flt, nowdate, nowtime -from six import iteritems from erpnext.accounts.doctype.account.test_account import get_inventory_account from erpnext.stock.doctype.item.test_item import ( @@ -30,7 +29,7 @@ from erpnext.stock.stock_ledger import get_previous_sle def get_sle(**args): condition, values = "", [] - for key, value in iteritems(args): + for key, value in args.items(): condition += " and " if condition else " where " condition += "`{0}`=%s".format(key) values.append(value) diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py index 9f0af495949..93bca7a6947 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py @@ -1,4 +1,3 @@ - # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 6de04c41a5f..438d3ebc4de 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -8,7 +8,6 @@ import frappe from frappe import _, throw from frappe.model.meta import get_field_precision from frappe.utils import add_days, add_months, cint, cstr, flt, getdate -from six import iteritems, string_types from erpnext import get_company_currency from erpnext.accounts.doctype.pricing_rule.pricing_rule import ( @@ -58,7 +57,7 @@ def get_item_details(args, doc=None, for_validate=False, overwrite_warehouse=Tru out = get_basic_details(args, item, overwrite_warehouse) - if isinstance(doc, string_types): + if isinstance(doc, str): doc = json.loads(doc) if doc and doc.get('doctype') == 'Purchase Invoice': @@ -97,7 +96,7 @@ def get_item_details(args, doc=None, for_validate=False, overwrite_warehouse=Tru out.update(bin_details) # update args with out, if key or value not exists - for key, value in iteritems(out): + for key, value in out.items(): if args.get(key) is None: args[key] = value @@ -162,7 +161,7 @@ def set_valuation_rate(out, args): def process_args(args): - if isinstance(args, string_types): + if isinstance(args, str): args = json.loads(args) args = frappe._dict(args) @@ -179,7 +178,7 @@ def process_args(args): return args def process_string_args(args): - if isinstance(args, string_types): + if isinstance(args, str): args = json.loads(args) return args @@ -1173,7 +1172,7 @@ def get_gross_profit(out): @frappe.whitelist() def get_serial_no(args, serial_nos=None, sales_order=None): serial_no = None - if isinstance(args, string_types): + if isinstance(args, str): args = json.loads(args) args = frappe._dict(args) if args.get('doctype') == 'Sales Invoice' and not args.get('update_stock'): @@ -1202,7 +1201,7 @@ def update_party_blanket_order(args, out): @frappe.whitelist() def get_blanket_order_details(args): - if isinstance(args, string_types): + if isinstance(args, str): args = frappe._dict(json.loads(args)) blanket_order_details = None diff --git a/erpnext/stock/report/bom_search/bom_search.py b/erpnext/stock/report/bom_search/bom_search.py index 960396d5345..a22b2248676 100644 --- a/erpnext/stock/report/bom_search/bom_search.py +++ b/erpnext/stock/report/bom_search/bom_search.py @@ -3,7 +3,6 @@ import frappe -from six import iteritems def execute(filters=None): @@ -20,9 +19,9 @@ def execute(filters=None): for d in frappe.get_all(doctype, fields=["parent", "item_code"]): all_boms.setdefault(d.parent, []).append(d.item_code) - for parent, items in iteritems(all_boms): + for parent, items in all_boms.items(): valid = True - for key, item in iteritems(filters): + for key, item in filters.items(): if key != "search_sub_assemblies": if item and item not in items: valid = False diff --git a/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.py b/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.py index cf273265599..a381820ca2a 100644 --- a/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.py +++ b/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.py @@ -4,7 +4,6 @@ import frappe from frappe import _ from frappe.utils import flt -from six import iteritems def execute(filters=None): @@ -26,7 +25,7 @@ def get_data(filters): def validate_data(itewise_balance_qty): res = [] - for key, data in iteritems(itewise_balance_qty): + for key, data in itewise_balance_qty.items(): row = get_incorrect_data(data) if row: res.append(row) diff --git a/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.py b/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.py index 5f03c7cbe0a..d452ffd913e 100644 --- a/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.py +++ b/erpnext/stock/report/incorrect_serial_no_valuation/incorrect_serial_no_valuation.py @@ -5,7 +5,6 @@ import copy import frappe from frappe import _ -from six import iteritems from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos @@ -43,7 +42,7 @@ def get_incorrect_serial_nos(serial_nos_data): total_value = frappe._dict({'qty': 0, 'valuation_rate': 0, 'serial_no': frappe.bold(_('Balance'))}) - for serial_no, data in iteritems(serial_nos_data): + for serial_no, data in serial_nos_data.items(): total_dict = frappe._dict({'qty': 0, 'valuation_rate': 0, 'serial_no': frappe.bold(_('Total'))}) if check_incorrect_serial_data(data, total_dict): diff --git a/erpnext/stock/report/incorrect_stock_value_report/incorrect_stock_value_report.py b/erpnext/stock/report/incorrect_stock_value_report/incorrect_stock_value_report.py index 7cce4a7d22e..28e6cb2d275 100644 --- a/erpnext/stock/report/incorrect_stock_value_report/incorrect_stock_value_report.py +++ b/erpnext/stock/report/incorrect_stock_value_report/incorrect_stock_value_report.py @@ -5,7 +5,6 @@ import frappe from frappe import _ from frappe.utils import add_days, getdate, today -from six import iteritems import erpnext from erpnext.accounts.utils import get_stock_and_account_balance @@ -66,7 +65,7 @@ def get_data(report_filters): voucher_wise_dict.setdefault((d.item_code, d.warehouse), []).append(d) closing_date = add_days(from_date, -1) - for key, stock_data in iteritems(voucher_wise_dict): + for key, stock_data in voucher_wise_dict.items(): prev_stock_value = get_stock_value_on(posting_date = closing_date, item_code=key[0], warehouse =key[1]) for data in stock_data: expected_stock_value = prev_stock_value + data.stock_value_difference diff --git a/erpnext/stock/report/product_bundle_balance/product_bundle_balance.py b/erpnext/stock/report/product_bundle_balance/product_bundle_balance.py index 3c4dbce73a6..d9adceddf1d 100644 --- a/erpnext/stock/report/product_bundle_balance/product_bundle_balance.py +++ b/erpnext/stock/report/product_bundle_balance/product_bundle_balance.py @@ -5,7 +5,6 @@ import frappe from frappe import _ from frappe.utils import flt -from six import iteritems from erpnext.stock.report.stock_ledger.stock_ledger import get_item_group_condition @@ -26,11 +25,11 @@ def execute(filters=None): warehouse_company_map = {} for child_item in required_items: child_item_balance = stock_balance.get(child_item.item_code, frappe._dict()) - for warehouse, sle in iteritems(child_item_balance): + for warehouse, sle in child_item_balance.items(): if flt(sle.qty_after_transaction) > 0: warehouse_company_map[warehouse] = sle.company - for warehouse, company in iteritems(warehouse_company_map): + for warehouse, company in warehouse_company_map.items(): parent_row = { "indent": 0, "item_code": parent_item, diff --git a/erpnext/stock/report/stock_ageing/stock_ageing.py b/erpnext/stock/report/stock_ageing/stock_ageing.py index 1209be21eda..0ebe4f903f1 100644 --- a/erpnext/stock/report/stock_ageing/stock_ageing.py +++ b/erpnext/stock/report/stock_ageing/stock_ageing.py @@ -7,7 +7,6 @@ from operator import itemgetter import frappe from frappe import _ from frappe.utils import cint, date_diff, flt -from six import iteritems from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos @@ -19,7 +18,7 @@ def execute(filters=None): _func = itemgetter(1) data = [] - for item, item_dict in iteritems(item_details): + for item, item_dict in item_details.items(): earliest_age, latest_age = 0, 0 fifo_queue = sorted(filter(_func, item_dict["fifo_queue"]), key=_func) diff --git a/erpnext/stock/report/stock_balance/stock_balance.py b/erpnext/stock/report/stock_balance/stock_balance.py index 963c4489e44..c0b89fdd09a 100644 --- a/erpnext/stock/report/stock_balance/stock_balance.py +++ b/erpnext/stock/report/stock_balance/stock_balance.py @@ -7,7 +7,6 @@ from operator import itemgetter import frappe from frappe import _ from frappe.utils import cint, date_diff, flt, getdate -from six import iteritems import erpnext from erpnext.stock.report.stock_ageing.stock_ageing import get_average_age, get_fifo_queue @@ -228,7 +227,7 @@ def filter_items_with_no_transactions(iwb_map, float_precision): qty_dict = iwb_map[(company, item, warehouse)] no_transactions = True - for key, val in iteritems(qty_dict): + for key, val in qty_dict.items(): val = flt(val, float_precision) qty_dict[key] = val if key != "val_rate" and val: @@ -285,7 +284,7 @@ def get_item_details(items, sle, filters): if filters.get('show_variant_attributes', 0) == 1: variant_values = get_variant_values_for(list(item_details)) - item_details = {k: v.update(variant_values.get(k, {})) for k, v in iteritems(item_details)} + item_details = {k: v.update(variant_values.get(k, {})) for k, v in item_details.items()} return item_details diff --git a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py index 11559aa2081..d1748ed24b1 100644 --- a/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py +++ b/erpnext/stock/report/supplier_wise_sales_analytics/supplier_wise_sales_analytics.py @@ -5,7 +5,6 @@ import frappe from frappe import _ from frappe.utils import flt -from six import iteritems def execute(filters=None): @@ -15,7 +14,7 @@ def execute(filters=None): material_transfer_vouchers = get_material_transfer_vouchers() data = [] - for item_code, suppliers in iteritems(supplier_details): + for item_code, suppliers in supplier_details.items(): consumed_qty = consumed_amount = delivered_qty = delivered_amount = 0.0 total_qty = total_amount = 0.0 if consumed_details.get(item_code): @@ -96,7 +95,7 @@ def get_suppliers_details(filters): if supplier: invalid_items = [] - for item_code, suppliers in iteritems(item_supplier_map): + for item_code, suppliers in item_supplier_map.items(): if supplier not in suppliers: invalid_items.append(item_code) diff --git a/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py b/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py index b43921f8592..d3af5f61e33 100644 --- a/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py +++ b/erpnext/stock/report/warehouse_wise_item_balance_age_and_value/warehouse_wise_item_balance_age_and_value.py @@ -8,7 +8,6 @@ import frappe from frappe import _ from frappe.utils import flt -from six import iteritems from erpnext.stock.report.stock_ageing.stock_ageing import get_average_age, get_fifo_queue from erpnext.stock.report.stock_balance.stock_balance import ( @@ -56,7 +55,7 @@ def execute(filters=None): # sum bal_qty by item - for (item, item_group), wh_balance in iteritems(item_balance): + for (item, item_group), wh_balance in item_balance.items(): if not item_ageing.get(item): continue total_stock_value = sum(item_value[(item, item_group)]) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index f694da03ea8..9c4c6761927 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -8,7 +8,6 @@ import frappe from frappe import _ from frappe.model.meta import get_field_precision from frappe.utils import cint, cstr, flt, get_link_to_form, getdate, now -from six import iteritems import erpnext from erpnext.stock.utils import ( @@ -152,7 +151,7 @@ def repost_future_sle(args=None, voucher_type=None, voucher_no=None, allow_negat distinct_item_warehouses[(args[i].get('item_code'), args[i].get('warehouse'))].reposting_status = True if obj.new_items_found: - for item_wh, data in iteritems(distinct_item_warehouses): + for item_wh, data in distinct_item_warehouses.items(): if ('args_idx' not in data and not data.reposting_status) or (data.sle_changed and data.reposting_status): data.args_idx = len(args) args.append(data.sle) @@ -430,7 +429,7 @@ class update_entries_after(object): else: self.get_fifo_values(sle) self.wh_data.qty_after_transaction += flt(sle.actual_qty) - self.wh_data.stock_value = sum((flt(batch[0]) * flt(batch[1]) for batch in self.wh_data.stock_queue)) + self.wh_data.stock_value = sum(flt(batch[0]) * flt(batch[1]) for batch in self.wh_data.stock_queue) # rounding as per precision self.wh_data.stock_value = flt(self.wh_data.stock_value, self.precision) @@ -715,8 +714,8 @@ class update_entries_after(object): # If no entry found with outgoing rate, collapse stack if index is None: # nosemgrep - new_stock_value = sum((d[0]*d[1] for d in self.wh_data.stock_queue)) - qty_to_pop*outgoing_rate - new_stock_qty = sum((d[0] for d in self.wh_data.stock_queue)) - qty_to_pop + new_stock_value = sum(d[0]*d[1] for d in self.wh_data.stock_queue) - qty_to_pop*outgoing_rate + new_stock_qty = sum(d[0] for d in self.wh_data.stock_queue) - qty_to_pop self.wh_data.stock_queue = [[new_stock_qty, new_stock_value/new_stock_qty if new_stock_qty > 0 else outgoing_rate]] break else: @@ -740,8 +739,8 @@ class update_entries_after(object): batch[0] = batch[0] - qty_to_pop qty_to_pop = 0 - stock_value = _round_off_if_near_zero(sum((flt(batch[0]) * flt(batch[1]) for batch in self.wh_data.stock_queue))) - stock_qty = _round_off_if_near_zero(sum((flt(batch[0]) for batch in self.wh_data.stock_queue))) + stock_value = _round_off_if_near_zero(sum(flt(batch[0]) * flt(batch[1]) for batch in self.wh_data.stock_queue)) + stock_qty = _round_off_if_near_zero(sum(flt(batch[0]) for batch in self.wh_data.stock_queue)) if stock_qty: self.wh_data.valuation_rate = stock_value / flt(stock_qty) @@ -774,7 +773,7 @@ class update_entries_after(object): def raise_exceptions(self): msg_list = [] - for warehouse, exceptions in iteritems(self.exceptions): + for warehouse, exceptions in self.exceptions.items(): deficiency = min(e["diff"] for e in exceptions) if ((exceptions[0]["voucher_type"], exceptions[0]["voucher_no"]) in @@ -802,7 +801,7 @@ class update_entries_after(object): def update_bin(self): # update bin for each warehouse - for warehouse, data in iteritems(self.data): + for warehouse, data in self.data.items(): bin_record = get_or_make_bin(self.item_code, warehouse) frappe.db.set_value('Bin', bin_record, { diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py index 5aafecf018a..8031c58b812 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -7,7 +7,6 @@ import json import frappe from frappe import _ from frappe.utils import cstr, flt, get_link_to_form, nowdate, nowtime -from six import string_types import erpnext @@ -216,7 +215,7 @@ def update_bin(args, allow_negative_stock=False, via_landed_cost_voucher=False): def get_incoming_rate(args, raise_error_if_no_rate=True): """Get Incoming Rate based on valuation method""" from erpnext.stock.stock_ledger import get_previous_sle, get_valuation_rate - if isinstance(args, string_types): + if isinstance(args, str): args = json.loads(args) in_rate = 0 diff --git a/erpnext/support/__init__.py b/erpnext/support/__init__.py index b9a7c1e8cee..ac23ede49ef 100644 --- a/erpnext/support/__init__.py +++ b/erpnext/support/__init__.py @@ -1,4 +1,3 @@ - install_docs = [ {'doctype':'Role', 'role_name':'Support Team', 'name':'Support Team'}, {'doctype':'Role', 'role_name':'Maintenance User', 'name':'Maintenance User'}, diff --git a/erpnext/support/doctype/issue/issue_dashboard.py b/erpnext/support/doctype/issue/issue_dashboard.py index e2de992e197..7ab358a9ad1 100644 --- a/erpnext/support/doctype/issue/issue_dashboard.py +++ b/erpnext/support/doctype/issue/issue_dashboard.py @@ -1,4 +1,3 @@ - from frappe import _ diff --git a/erpnext/support/report/issue_analytics/issue_analytics.py b/erpnext/support/report/issue_analytics/issue_analytics.py index 543a34cb304..056f2e0b41a 100644 --- a/erpnext/support/report/issue_analytics/issue_analytics.py +++ b/erpnext/support/report/issue_analytics/issue_analytics.py @@ -7,7 +7,6 @@ import json import frappe from frappe import _, scrub from frappe.utils import add_days, add_to_date, flt, getdate -from six import iteritems from erpnext.accounts.utils import get_fiscal_year @@ -170,7 +169,7 @@ class IssueAnalytics(object): self.data = [] self.get_periodic_data() - for entity, period_data in iteritems(self.issue_periodic_data): + for entity, period_data in self.issue_periodic_data.items(): if self.filters.based_on == 'Customer': row = {'customer': entity} elif self.filters.based_on == 'Assigned To': diff --git a/erpnext/support/report/issue_analytics/test_issue_analytics.py b/erpnext/support/report/issue_analytics/test_issue_analytics.py index b27dc46ad28..ba4dc54887a 100644 --- a/erpnext/support/report/issue_analytics/test_issue_analytics.py +++ b/erpnext/support/report/issue_analytics/test_issue_analytics.py @@ -1,4 +1,3 @@ - import unittest import frappe diff --git a/erpnext/support/report/issue_summary/issue_summary.py b/erpnext/support/report/issue_summary/issue_summary.py index b5d52278b89..39a5c407cd4 100644 --- a/erpnext/support/report/issue_summary/issue_summary.py +++ b/erpnext/support/report/issue_summary/issue_summary.py @@ -7,7 +7,6 @@ import json import frappe from frappe import _, scrub from frappe.utils import flt -from six import iteritems def execute(filters=None): @@ -141,7 +140,7 @@ class IssueSummary(object): self.data = [] self.get_summary_data() - for entity, data in iteritems(self.issue_summary_data): + for entity, data in self.issue_summary_data.items(): if self.filters.based_on == 'Customer': row = {'customer': entity} elif self.filters.based_on == 'Assigned To': diff --git a/erpnext/support/report/support_hour_distribution/support_hour_distribution.py b/erpnext/support/report/support_hour_distribution/support_hour_distribution.py index e3a7e5f54b1..6b2098f4a8e 100644 --- a/erpnext/support/report/support_hour_distribution/support_hour_distribution.py +++ b/erpnext/support/report/support_hour_distribution/support_hour_distribution.py @@ -5,7 +5,6 @@ import frappe from frappe import _ from frappe.utils import add_to_date, get_datetime, getdate -from six import iteritems time_slots = { '12AM - 3AM': '00:00:00-03:00:00', @@ -34,7 +33,7 @@ def get_data(filters): time_slot_wise_total_count = {} while(start_date <= getdate(filters.to_date)): hours_count = {'date': start_date} - for key, value in iteritems(time_slots): + for key, value in time_slots.items(): start_time, end_time = value.split('-') start_time = get_datetime("{0} {1}".format(start_date.strftime("%Y-%m-%d"), start_time)) end_time = get_datetime("{0} {1}".format(start_date.strftime("%Y-%m-%d"), end_time)) diff --git a/erpnext/support/web_form/issues/issues.py b/erpnext/support/web_form/issues/issues.py index 19b550feea7..02e3e933330 100644 --- a/erpnext/support/web_form/issues/issues.py +++ b/erpnext/support/web_form/issues/issues.py @@ -1,5 +1,3 @@ - - def get_context(context): # do your magic here pass diff --git a/erpnext/templates/includes/salary_slip_log.html b/erpnext/templates/includes/salary_slip_log.html index d36ee6e23bb..22c62ceeccc 100644 --- a/erpnext/templates/includes/salary_slip_log.html +++ b/erpnext/templates/includes/salary_slip_log.html @@ -10,7 +10,7 @@ {% for ss_dict in ss_list %} - {% for key, value in ss_dict.iteritems()|sort %} + {% for key, value in ss_dict.items()|sort %} {{value}} {% endfor %} diff --git a/erpnext/templates/pages/help.py b/erpnext/templates/pages/help.py index 25e7c2623db..6a83fc8b57a 100644 --- a/erpnext/templates/pages/help.py +++ b/erpnext/templates/pages/help.py @@ -1,4 +1,3 @@ - import json import frappe diff --git a/erpnext/templates/pages/non_profit/join_chapter.py b/erpnext/templates/pages/non_profit/join_chapter.py index a5d03478866..7caf87db2b3 100644 --- a/erpnext/templates/pages/non_profit/join_chapter.py +++ b/erpnext/templates/pages/non_profit/join_chapter.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/templates/pages/non_profit/leave_chapter.py b/erpnext/templates/pages/non_profit/leave_chapter.py index 6aa875876a2..65908e1dd9d 100644 --- a/erpnext/templates/pages/non_profit/leave_chapter.py +++ b/erpnext/templates/pages/non_profit/leave_chapter.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/templates/pages/regional/india/update_gstin.py b/erpnext/templates/pages/regional/india/update_gstin.py index b65f0a6e739..95b8f72d882 100644 --- a/erpnext/templates/pages/regional/india/update_gstin.py +++ b/erpnext/templates/pages/regional/india/update_gstin.py @@ -1,6 +1,4 @@ - import frappe -from six import iteritems def get_context(context): @@ -30,7 +28,7 @@ def get_context(context): def update_gstin(context): dirty = False - for key, value in iteritems(frappe.form_dict): + for key, value in frappe.form_dict.items(): if key != 'party': address_name = frappe.get_value('Address', key) if address_name: diff --git a/erpnext/templates/pages/search_help.py b/erpnext/templates/pages/search_help.py index c8854d74901..1ef3942cbc9 100644 --- a/erpnext/templates/pages/search_help.py +++ b/erpnext/templates/pages/search_help.py @@ -1,4 +1,3 @@ - import frappe import requests from frappe import _ @@ -6,7 +5,6 @@ from frappe.utils import sanitize_html from frappe.utils.global_search import search from html2text import html2text from jinja2 import utils -from six import text_type def get_context(context): @@ -76,7 +74,7 @@ def prepare_api_results(api, topics_data): for topic in topics_data: route = api.base_url + '/' + (api.post_route + '/' if api.post_route else "") for key in api.post_route_key_list.split(','): - route += text_type(topic[key]) + route += str(topic[key]) results.append(frappe._dict({ 'title': topic[api.post_title_key], diff --git a/erpnext/templates/pages/task_info.py b/erpnext/templates/pages/task_info.py index 1d809c4bd72..d1a70e14c3b 100644 --- a/erpnext/templates/pages/task_info.py +++ b/erpnext/templates/pages/task_info.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/templates/pages/timelog_info.py b/erpnext/templates/pages/timelog_info.py index 3bc74013a9e..db61e7e44b5 100644 --- a/erpnext/templates/pages/timelog_info.py +++ b/erpnext/templates/pages/timelog_info.py @@ -1,4 +1,3 @@ - import frappe diff --git a/erpnext/tests/test_init.py b/erpnext/tests/test_init.py index 020133a9cca..36a9bf5e37b 100644 --- a/erpnext/tests/test_init.py +++ b/erpnext/tests/test_init.py @@ -1,8 +1,6 @@ - import unittest import frappe -from six.moves import range from erpnext import encode_company_abbr diff --git a/erpnext/tests/test_regional.py b/erpnext/tests/test_regional.py index b232d69dbb3..10d62ce69f2 100644 --- a/erpnext/tests/test_regional.py +++ b/erpnext/tests/test_regional.py @@ -1,4 +1,3 @@ - import unittest import frappe diff --git a/erpnext/tests/test_search.py b/erpnext/tests/test_search.py index 3594cfee335..c169458b8ca 100644 --- a/erpnext/tests/test_search.py +++ b/erpnext/tests/test_search.py @@ -1,4 +1,3 @@ - import unittest import frappe diff --git a/erpnext/tests/test_subcontracting.py b/erpnext/tests/test_subcontracting.py index 170daa96733..fccfd0d1cf7 100644 --- a/erpnext/tests/test_subcontracting.py +++ b/erpnext/tests/test_subcontracting.py @@ -1,4 +1,3 @@ - import copy import unittest from collections import defaultdict diff --git a/erpnext/tests/test_woocommerce.py b/erpnext/tests/test_woocommerce.py index 59a9a313dbe..4a451aba4d0 100644 --- a/erpnext/tests/test_woocommerce.py +++ b/erpnext/tests/test_woocommerce.py @@ -1,4 +1,3 @@ - import os import time import unittest diff --git a/erpnext/utilities/activation.py b/erpnext/utilities/activation.py index 8ccda411179..faf3fd4a20c 100644 --- a/erpnext/utilities/activation.py +++ b/erpnext/utilities/activation.py @@ -4,7 +4,6 @@ import frappe from frappe import _ -from six import iteritems import erpnext @@ -45,7 +44,7 @@ def get_level(): "Work Order": 5 } - for doctype, min_count in iteritems(doctypes): + for doctype, min_count in doctypes.items(): count = frappe.db.count(doctype) if count > min_count: activation_level += 1 diff --git a/erpnext/utilities/doctype/video/video.py b/erpnext/utilities/doctype/video/video.py index 4e605134c4b..ae13952bc7d 100644 --- a/erpnext/utilities/doctype/video/video.py +++ b/erpnext/utilities/doctype/video/video.py @@ -10,7 +10,6 @@ import pytz from frappe import _ from frappe.model.document import Document from pyyoutube import Api -from six import string_types class Video(Document): @@ -87,7 +86,7 @@ def get_id_from_url(url): Returns video id from url :param youtube url: String URL """ - if not isinstance(url, string_types): + if not isinstance(url, str): frappe.throw(_("URL can only be a string"), title=_("Invalid URL")) pattern = re.compile(r'[a-z\:\//\.]+(youtube|youtu)\.(com|be)/(watch\?v=|embed/|.+\?v=)?([^"&?\s]{11})?') diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py index a1c954b0604..14b3afa5a72 100644 --- a/erpnext/utilities/transaction_base.py +++ b/erpnext/utilities/transaction_base.py @@ -6,7 +6,6 @@ import frappe import frappe.share from frappe import _ from frappe.utils import cint, cstr, flt, get_time, now_datetime -from six import string_types from erpnext.controllers.status_updater import StatusUpdater @@ -178,7 +177,7 @@ def delete_events(ref_type, ref_name): frappe.delete_doc("Event", events, for_reload=True) def validate_uom_is_integer(doc, uom_field, qty_fields, child_dt=None): - if isinstance(qty_fields, string_types): + if isinstance(qty_fields, str): qty_fields = [qty_fields] distinct_uoms = list(set(d.get(uom_field) for d in doc.get_all_children())) diff --git a/erpnext/utilities/web_form/addresses/addresses.py b/erpnext/utilities/web_form/addresses/addresses.py index 8024f875797..db325529e43 100644 --- a/erpnext/utilities/web_form/addresses/addresses.py +++ b/erpnext/utilities/web_form/addresses/addresses.py @@ -1,5 +1,3 @@ - - def get_context(context): # do your magic here context.show_sidebar = True diff --git a/erpnext/www/lms/content.py b/erpnext/www/lms/content.py index b4d9793266b..b187a788657 100644 --- a/erpnext/www/lms/content.py +++ b/erpnext/www/lms/content.py @@ -1,4 +1,3 @@ - import frappe import erpnext.education.utils as utils diff --git a/erpnext/www/lms/course.py b/erpnext/www/lms/course.py index 6f1f0f208e9..012e25ce52f 100644 --- a/erpnext/www/lms/course.py +++ b/erpnext/www/lms/course.py @@ -1,4 +1,3 @@ - import frappe import erpnext.education.utils as utils diff --git a/erpnext/www/lms/index.py b/erpnext/www/lms/index.py index 97d474befd1..035f7d9f72c 100644 --- a/erpnext/www/lms/index.py +++ b/erpnext/www/lms/index.py @@ -1,4 +1,3 @@ - import frappe import erpnext.education.utils as utils diff --git a/erpnext/www/lms/profile.py b/erpnext/www/lms/profile.py index 5e51ddc6c16..8cd2f24fdcb 100644 --- a/erpnext/www/lms/profile.py +++ b/erpnext/www/lms/profile.py @@ -1,4 +1,3 @@ - import frappe import erpnext.education.utils as utils diff --git a/erpnext/www/lms/program.py b/erpnext/www/lms/program.py index a7c713caed0..db2653a6d54 100644 --- a/erpnext/www/lms/program.py +++ b/erpnext/www/lms/program.py @@ -1,4 +1,3 @@ - import frappe from frappe import _ diff --git a/erpnext/www/lms/topic.py b/erpnext/www/lms/topic.py index 684437cbf22..17fc8f79925 100644 --- a/erpnext/www/lms/topic.py +++ b/erpnext/www/lms/topic.py @@ -1,4 +1,3 @@ - import frappe import erpnext.education.utils as utils diff --git a/erpnext/www/payment_setup_certification.py b/erpnext/www/payment_setup_certification.py index c87f4687c8c..c65cddb5cac 100644 --- a/erpnext/www/payment_setup_certification.py +++ b/erpnext/www/payment_setup_certification.py @@ -1,4 +1,3 @@ - import frappe no_cache = 1 diff --git a/erpnext/www/support/index.py b/erpnext/www/support/index.py index 1d198ed3ed1..408ddf43a52 100644 --- a/erpnext/www/support/index.py +++ b/erpnext/www/support/index.py @@ -1,4 +1,3 @@ - import frappe From 37e6e1f3309cf7c6b0a784ff7b4b2e8fbcb8fa21 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 5 Nov 2021 11:28:31 +0530 Subject: [PATCH 157/200] chore: ignore six removal commit in blame --- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 6eaf9ccec66..88049be32d4 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -20,3 +20,6 @@ b147b85e6ac19a9220cd1e2958a6ebd99373283a # sort and cleanup imports 915b34391c2066dfc83e60a5813c5a877cebe7ac + +# removing six compatibility layer +8fe5feb6a4372bf5f2dfaf65fca41bbcc25c8ce7 From c0b889b94d823a67f847c3fe0d97ab0b14a7b490 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sun, 7 Nov 2021 17:42:51 +0530 Subject: [PATCH 158/200] fix: auto update price list rate (#28255) (#28256) * fix: auto update price list rate * fix: hide field when auto insert isn't enabled (cherry picked from commit bb3957eba35a5204a1a01e412dee596532bd525e) Co-authored-by: Sagar Sharma <63660334+s-aga-r@users.noreply.github.com> [skip ci] --- .../stock/doctype/stock_settings/stock_settings.json | 12 ++++++++++-- erpnext/stock/get_item_details.py | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.json b/erpnext/stock/doctype/stock_settings/stock_settings.json index f75cb561385..33d9a6ce414 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.json +++ b/erpnext/stock/doctype/stock_settings/stock_settings.json @@ -21,6 +21,7 @@ "mr_qty_allowance", "column_break_12", "auto_insert_price_list_rate_if_missing", + "update_existing_price_list_rate", "allow_negative_stock", "show_barcode_field", "clean_description_html", @@ -290,6 +291,13 @@ "fieldname": "mr_qty_allowance", "fieldtype": "Float", "label": "Over Transfer Allowance" + }, + { + "default": "0", + "depends_on": "auto_insert_price_list_rate_if_missing", + "fieldname": "update_existing_price_list_rate", + "fieldtype": "Check", + "label": "Update Existing Price List Rate" } ], "icon": "icon-cog", @@ -297,7 +305,7 @@ "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2021-06-28 17:02:26.683002", + "modified": "2021-11-06 19:40:02.183592", "modified_by": "Administrator", "module": "Stock", "name": "Stock Settings", @@ -317,4 +325,4 @@ "sort_field": "modified", "sort_order": "ASC", "track_changes": 1 -} +} \ No newline at end of file diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 438d3ebc4de..e00382bec1a 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -706,7 +706,7 @@ def insert_item_price(args): {'item_code': args.item_code, 'price_list': args.price_list, 'currency': args.currency}, ['name', 'price_list_rate'], as_dict=1) if item_price and item_price.name: - if item_price.price_list_rate != price_list_rate: + if item_price.price_list_rate != price_list_rate and frappe.db.get_single_value('Stock Settings', 'update_existing_price_list_rate'): frappe.db.set_value('Item Price', item_price.name, "price_list_rate", price_list_rate) frappe.msgprint(_("Item Price updated for {0} in Price List {1}").format(args.item_code, args.price_list), alert=True) From db3193dcab1dc04b67bf04cb3f61b59438371951 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 8 Nov 2021 10:57:20 +0530 Subject: [PATCH 159/200] chore: remove migration_hash (#28263) --- erpnext/crm/doctype/prospect/prospect.json | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/crm/doctype/prospect/prospect.json b/erpnext/crm/doctype/prospect/prospect.json index 0e872ace043..c9554ba31af 100644 --- a/erpnext/crm/doctype/prospect/prospect.json +++ b/erpnext/crm/doctype/prospect/prospect.json @@ -165,7 +165,6 @@ ], "index_web_pages_for_search": 1, "links": [], - "migration_hash": "f39fb8f4e18a0e7fd391f0b4b52d8375", "modified": "2021-11-01 13:10:36.759249", "modified_by": "Administrator", "module": "CRM", From 8df50cf1e0a7f58fbb9af94c2598e91d82f3faf5 Mon Sep 17 00:00:00 2001 From: ahmadpak Date: Mon, 8 Nov 2021 09:29:33 +0300 Subject: [PATCH 160/200] update(Print Format): Sales Invoice - KSA VAT Invoice Customer Identification Number Added --- .../print_format/ksa_vat_invoice/ksa_vat_invoice.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/regional/print_format/ksa_vat_invoice/ksa_vat_invoice.json b/erpnext/regional/print_format/ksa_vat_invoice/ksa_vat_invoice.json index edb107adef4..36d653616ba 100644 --- a/erpnext/regional/print_format/ksa_vat_invoice/ksa_vat_invoice.json +++ b/erpnext/regional/print_format/ksa_vat_invoice/ksa_vat_invoice.json @@ -10,14 +10,14 @@ "docstatus": 0, "doctype": "Print Format", "font_size": 14, - "html": "
\n
\n
\n

TAX INVOICE

\n

\u0641\u0627\u062a\u0648\u0631\u0629 \u0636\u0631\u064a\u0628\u064a\u0629

\n
\n \n \n
\n {% set company = frappe.get_doc(\"Company\", doc.company)%}\n {% if (doc.company_address) %}\n {% set supplier_address_doc = frappe.get_doc('Address', doc.company_address) %}\n {% endif %}\n \n {% if(doc.customer_address) %}\n {% set customer_address = frappe.get_doc('Address', doc.customer_address ) %}\n {% endif %}\n \n {% if(doc.shipping_address_name) %}\n {% set customer_shipping_address = frappe.get_doc('Address', doc.shipping_address_name ) %}\n {% endif %} \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {% if(supplier_address_doc) %}\n \n \n \n \n \n \n \n \n \n \n \n \n {% endif %}\n \n {% if (company.tax_id) %}\n \n \n \n \n \n \n \n \n {% endif %}\n \n \n \n \n \n \n \n \n \n \n \n {% if(customer_address) %}\n \n \n \n \n {% endif %}\n \n {% if(customer_shipping_address) %}\n \n \n \n \n \n \n \n \n \n {% endif %}\n \n \n \n \n \n \n {% if(doc.po_no) %}\n \n \n \n \n {% endif %}\n \n \n \n \n \n \n
{{ company.name }}{{ company.company_name_in_arabic }}
Invoice#: {{doc.name}}\u0631\u0642\u0645 \u0627\u0644\u0641\u0627\u062a\u0648\u0631\u0629: {{doc.name}}
Invoice Date: {{doc.posting_date}}\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u0641\u0627\u062a\u0648\u0631\u0629: {{doc.posting_date}}
Date of Supply:{{doc.posting_date}}\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u062a\u0648\u0631\u064a\u062f: {{doc.posting_date}}
Supplier:\u0627\u0644\u0645\u0648\u0631\u062f:
{{ company.name }}{{ company.company_name_in_arabic }}
{{ supplier_address_doc.address_line1}} {{ supplier_address_doc.address_in_arabic}}
Phone: {{ supplier_address_doc.phone }}\u0647\u0627\u062a\u0641: {{ supplier_address_doc.phone }}
Email: {{ supplier_address_doc.email_id }}\u0628\u0631\u064a\u062f \u0627\u0644\u0643\u062a\u0631\u0648\u0646\u064a: {{ supplier_address_doc.email_id }}
Supplier Tax Identification Number:\u0631\u0642\u0645 \u0627\u0644\u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0636\u0631\u064a\u0628\u064a \u0644\u0644\u0645\u0648\u0631\u062f:
{{ company.tax_id }}{{ company.tax_id }}
CUSTOMER:\u0639\u0645\u064a\u0644:
{{ doc.customer }} {{ doc.customer_name_in_arabic }}
{{ customer_address.address_line1}} {{ customer_address.address_in_arabic}}
SHIPPING ADDRESS:\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0634\u062d\u0646:
{{ customer_shipping_address.address_line1}} {{ customer_shipping_address.address_in_arabic}}
OTHER INFORMATION\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0623\u062e\u0631\u0649
Purchase Order Number: {{ doc.po_no }}\u0631\u0642\u0645 \u0623\u0645\u0631 \u0627\u0644\u0634\u0631\u0627\u0621: {{ doc.po_no }}
Payment Due Date: {{ doc.due_date}} \u062a\u0627\u0631\u064a\u062e \u0627\u0633\u062a\u062d\u0642\u0627\u0642 \u0627\u0644\u062f\u0641\u0639: {{ doc.due_date}}
\n\n \n {% set col = namespace(one = 2, two = 1) %}\n {% set length = doc.taxes | length %}\n {% set length = length / 2 | round %}\n {% set col.one = col.one + length %}\n {% set col.two = col.two + length %}\n \n {%- if(doc.taxes | length % 2 > 0 ) -%}\n {% set col.two = col.two + 1 %}\n {% endif %}\n \n \n {% set total = namespace(amount = 0) %}\n \n \n \n \n \n \n \n \n {% for row in doc.taxes %}\n \n {% endfor %}\n \n \n \n \n \n {%- for item in doc.items -%}\n {% set total.amount = item.amount %}\n \n \n \n \n \n {% for row in doc.taxes %}\n {% set data_object = json.loads(row.item_wise_tax_detail) %}\n \n {% endfor %}\n \n \n {%- endfor -%}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Nature of goods or services
\u0637\u0628\u064a\u0639\u0629 \u0627\u0644\u0633\u0644\u0639 \u0623\u0648 \u0627\u0644\u062e\u062f\u0645\u0627\u062a
\n Unit price
\n \u0633\u0639\u0631 \u0627\u0644\u0648\u062d\u062f\u0629\n
\n Quantity
\n \u0627\u0644\u0643\u0645\u064a\u0629\n
\n Taxable Amount
\n \u0627\u0644\u0645\u0628\u0644\u063a \u0627\u0644\u062e\u0627\u0636\u0639 \u0644\u0644\u0636\u0631\u064a\u0628\u0629\n
{{row.description}}\n Total
\n \u0627\u0644\u0645\u062c\u0645\u0648\u0639\n
{{ item.item_code }}{{ item.get_formatted(\"rate\") }}{{ item.qty }}{{ item.get_formatted(\"amount\") }}\n
\n {%- if(data_object[item.item_code][0])-%}\n {{ frappe.format(data_object[item.item_code][0], {'fieldtype': 'Percent'}) }}\n {%- endif -%}\n \n {%- if(data_object[item.item_code][1])-%}\n {{ frappe.format(data_object[item.item_code][1], {'fieldtype': 'Currency'}) }}\n {% set total.amount = total.amount + data_object[item.item_code][1] %}\n {%- endif -%}\n
\n
{{ frappe.format(total.amount, {'fieldtype': 'Currency'}) }}
\n {{ doc.get_formatted(\"total\") }}
\n {{ doc.get_formatted(\"total_taxes_and_charges\") }}\n
\n \u0627\u0644\u0625\u062c\u0645\u0627\u0644\u064a \u0628\u0627\u0633\u062a\u062b\u0646\u0627\u0621 \u0636\u0631\u064a\u0628\u0629 \u0627\u0644\u0642\u064a\u0645\u0629 \u0627\u0644\u0645\u0636\u0627\u0641\u0629\n
\n \u0625\u062c\u0645\u0627\u0644\u064a \u0636\u0631\u064a\u0628\u0629 \u0627\u0644\u0642\u064a\u0645\u0629 \u0627\u0644\u0645\u0636\u0627\u0641\u0629\n
\n Total (Excluding VAT)\n
\n Total VAT\n
\n {{ doc.get_formatted(\"total\") }}
\n {{ doc.get_formatted(\"total_taxes_and_charges\") }}\n
{{ doc.get_formatted(\"grand_total\") }}\n \u0625\u062c\u0645\u0627\u0644\u064a \u0627\u0644\u0645\u0628\u0644\u063a \u0627\u0644\u0645\u0633\u062a\u062d\u0642Total Amount Due{{ doc.get_formatted(\"grand_total\") }}
\n\n\t{%- if doc.terms -%}\n

\n {{doc.terms}}\n

\n\t{%- endif -%}\n
\n", + "html": "
\n
\n
\n

TAX INVOICE

\n

\u0641\u0627\u062a\u0648\u0631\u0629 \u0636\u0631\u064a\u0628\u064a\u0629

\n
\n \n \n
\n {% set company = frappe.get_doc(\"Company\", doc.company)%}\n {% if (doc.company_address) %}\n {% set supplier_address_doc = frappe.get_doc('Address', doc.company_address) %}\n {% endif %}\n \n {% if(doc.customer_address) %}\n {% set customer_address = frappe.get_doc('Address', doc.customer_address ) %}\n {% endif %}\n \n {% if(doc.shipping_address_name) %}\n {% set customer_shipping_address = frappe.get_doc('Address', doc.shipping_address_name ) %}\n {% endif %} \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t\t{% if (company.tax_id) %}\n \n \n \n \n \n \n \n \n {% endif %}\n \n \n \n \n \n \n {% if(supplier_address_doc) %}\n \n \n \n \n \n \n \n \n \n \n \n \n {% endif %}\n \n \n \n \n \n \n\t\t{% set customer_tax_id = frappe.db.get_value('Customer', doc.customer, 'tax_id') %}\n\t\t{% if customer_tax_id %}\n \n \n \n \n \n \n \n \n {% endif %}\n \n \n \n \n \n {% if(customer_address) %}\n \n \n \n \n {% endif %}\n \n {% if(customer_shipping_address) %}\n \n \n \n \n \n \n \n \n \n {% endif %}\n \n\t\t{% if(doc.po_no) %}\n \n \n \n \n \n \n \n \n \n {% endif %}\n \n \n \n \n \n \n
{{ company.name }}{{ company.company_name_in_arabic }}
Invoice#: {{doc.name}}\u0631\u0642\u0645 \u0627\u0644\u0641\u0627\u062a\u0648\u0631\u0629: {{doc.name}}
Invoice Date: {{doc.posting_date}}\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u0641\u0627\u062a\u0648\u0631\u0629: {{doc.posting_date}}
Date of Supply:{{doc.posting_date}}\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u062a\u0648\u0631\u064a\u062f: {{doc.posting_date}}
Supplier:\u0627\u0644\u0645\u0648\u0631\u062f:
Supplier Tax Identification Number:\u0631\u0642\u0645 \u0627\u0644\u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0636\u0631\u064a\u0628\u064a \u0644\u0644\u0645\u0648\u0631\u062f:
{{ company.tax_id }}{{ company.tax_id }}
{{ company.name }}{{ company.company_name_in_arabic }}
{{ supplier_address_doc.address_line1}} {{ supplier_address_doc.address_in_arabic}}
Phone: {{ supplier_address_doc.phone }}\u0647\u0627\u062a\u0641: {{ supplier_address_doc.phone }}
Email: {{ supplier_address_doc.email_id }}\u0628\u0631\u064a\u062f \u0627\u0644\u0643\u062a\u0631\u0648\u0646\u064a: {{ supplier_address_doc.email_id }}
CUSTOMER:\u0639\u0645\u064a\u0644:
Customer Tax Identification Number:\u0631\u0642\u0645 \u0627\u0644\u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0636\u0631\u064a\u0628\u064a \u0644\u0644\u0639\u0645\u064a\u0644:
{{ customer_tax_id }}{{ customer_tax_id }}
{{ doc.customer }} {{ doc.customer_name_in_arabic }}
{{ customer_address.address_line1}} {{ customer_address.address_in_arabic}}
SHIPPING ADDRESS:\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0634\u062d\u0646:
{{ customer_shipping_address.address_line1}} {{ customer_shipping_address.address_in_arabic}}
OTHER INFORMATION\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0623\u062e\u0631\u0649
Purchase Order Number: {{ doc.po_no }}\u0631\u0642\u0645 \u0623\u0645\u0631 \u0627\u0644\u0634\u0631\u0627\u0621: {{ doc.po_no }}
Payment Due Date: {{ doc.due_date}} \u062a\u0627\u0631\u064a\u062e \u0627\u0633\u062a\u062d\u0642\u0627\u0642 \u0627\u0644\u062f\u0641\u0639: {{ doc.due_date}}
\n\n \n {% set col = namespace(one = 2, two = 1) %}\n {% set length = doc.taxes | length %}\n {% set length = length / 2 | round %}\n {% set col.one = col.one + length %}\n {% set col.two = col.two + length %}\n \n {%- if(doc.taxes | length % 2 > 0 ) -%}\n {% set col.two = col.two + 1 %}\n {% endif %}\n \n \n {% set total = namespace(amount = 0) %}\n \n \n \n \n \n \n \n \n {% for row in doc.taxes %}\n \n {% endfor %}\n \n \n \n \n \n {%- for item in doc.items -%}\n {% set total.amount = item.amount %}\n \n \n \n \n \n {% for row in doc.taxes %}\n {% set data_object = json.loads(row.item_wise_tax_detail) %}\n \n {% endfor %}\n \n \n {%- endfor -%}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Nature of goods or services
\u0637\u0628\u064a\u0639\u0629 \u0627\u0644\u0633\u0644\u0639 \u0623\u0648 \u0627\u0644\u062e\u062f\u0645\u0627\u062a
\n Unit price
\n \u0633\u0639\u0631 \u0627\u0644\u0648\u062d\u062f\u0629\n
\n Quantity
\n \u0627\u0644\u0643\u0645\u064a\u0629\n
\n Taxable Amount
\n \u0627\u0644\u0645\u0628\u0644\u063a \u0627\u0644\u062e\u0627\u0636\u0639 \u0644\u0644\u0636\u0631\u064a\u0628\u0629\n
{{row.description}}\n Total
\n \u0627\u0644\u0645\u062c\u0645\u0648\u0639\n
{{ item.item_code }}{{ item.get_formatted(\"rate\") }}{{ item.qty }}{{ item.get_formatted(\"amount\") }}\n
\n {%- if(data_object[item.item_code][0])-%}\n {{ frappe.format(data_object[item.item_code][0], {'fieldtype': 'Percent'}) }}\n {%- endif -%}\n \n {%- if(data_object[item.item_code][1])-%}\n {{ frappe.format(data_object[item.item_code][1], {'fieldtype': 'Currency'}) }}\n {% set total.amount = total.amount + data_object[item.item_code][1] %}\n {%- endif -%}\n
\n
{{ frappe.format(total.amount, {'fieldtype': 'Currency'}) }}
\n {{ doc.get_formatted(\"total\") }}
\n {{ doc.get_formatted(\"total_taxes_and_charges\") }}\n
\n \u0627\u0644\u0625\u062c\u0645\u0627\u0644\u064a \u0628\u0627\u0633\u062a\u062b\u0646\u0627\u0621 \u0636\u0631\u064a\u0628\u0629 \u0627\u0644\u0642\u064a\u0645\u0629 \u0627\u0644\u0645\u0636\u0627\u0641\u0629\n
\n \u0625\u062c\u0645\u0627\u0644\u064a \u0636\u0631\u064a\u0628\u0629 \u0627\u0644\u0642\u064a\u0645\u0629 \u0627\u0644\u0645\u0636\u0627\u0641\u0629\n
\n Total (Excluding VAT)\n
\n Total VAT\n
\n {{ doc.get_formatted(\"total\") }}
\n {{ doc.get_formatted(\"total_taxes_and_charges\") }}\n
{{ doc.get_formatted(\"grand_total\") }}\n \u0625\u062c\u0645\u0627\u0644\u064a \u0627\u0644\u0645\u0628\u0644\u063a \u0627\u0644\u0645\u0633\u062a\u062d\u0642Total Amount Due{{ doc.get_formatted(\"grand_total\") }}
\n\n\t{%- if doc.terms -%}\n

\n {{doc.terms}}\n

\n\t{%- endif -%}\n
\n", "idx": 0, "line_breaks": 0, "margin_bottom": 15.0, "margin_left": 15.0, "margin_right": 15.0, "margin_top": 15.0, - "modified": "2021-10-30 17:12:49.496507", + "modified": "2021-11-08 09:19:18.660806", "modified_by": "Administrator", "module": "Regional", "name": "KSA VAT Invoice", From c81d4734c48656b7ca9766a01ce33ed4d2ac00ed Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Mon, 8 Nov 2021 17:14:03 +0530 Subject: [PATCH 161/200] fix: KSA VAT setup issues --- erpnext/regional/report/ksa_vat/ksa_vat.js | 1 - erpnext/regional/report/ksa_vat/ksa_vat.py | 4 +- erpnext/regional/saudi_arabia/setup.py | 55 ++++++++++--------- .../wizard/data/ksa_vat_settings.json | 4 +- .../operations/setup_ksa_vat_setting.py | 3 - .../setup_wizard/data/country_wise_tax.json | 4 ++ 6 files changed, 38 insertions(+), 33 deletions(-) diff --git a/erpnext/regional/report/ksa_vat/ksa_vat.js b/erpnext/regional/report/ksa_vat/ksa_vat.js index d46d260ac1e..59e72c3e638 100644 --- a/erpnext/regional/report/ksa_vat/ksa_vat.js +++ b/erpnext/regional/report/ksa_vat/ksa_vat.js @@ -49,7 +49,6 @@ frappe.query_reports["KSA VAT"] = { value = $(`${value}`); var $value = $(value).css("font-weight", "bold"); value = $value.wrap("

").parent().html(); - console.log($value) return value } }else{ diff --git a/erpnext/regional/report/ksa_vat/ksa_vat.py b/erpnext/regional/report/ksa_vat/ksa_vat.py index 198b0b2b1b1..b41b2b0428f 100644 --- a/erpnext/regional/report/ksa_vat/ksa_vat.py +++ b/erpnext/regional/report/ksa_vat/ksa_vat.py @@ -118,14 +118,14 @@ def get_tax_data_for_each_vat_setting(vat_setting, filters, doctype): total_taxable_adjustment_amount = 0 total_tax = 0 # Fetch All Invoices - invoices = frappe.get_list(doctype, + invoices = frappe.get_all(doctype, filters ={ 'docstatus': 1, 'posting_date': ['between', [from_date, to_date]] }, fields =['name', 'is_return']) for invoice in invoices: - invoice_items = frappe.get_list(f'{doctype} Item', + invoice_items = frappe.get_all(f'{doctype} Item', filters ={ 'docstatus': 1, 'parent': invoice.name, diff --git a/erpnext/regional/saudi_arabia/setup.py b/erpnext/regional/saudi_arabia/setup.py index 0c52ee178ba..38a089c6326 100644 --- a/erpnext/regional/saudi_arabia/setup.py +++ b/erpnext/regional/saudi_arabia/setup.py @@ -5,13 +5,12 @@ import frappe from frappe.permissions import add_permission, update_permission_property from erpnext.regional.united_arab_emirates.setup import make_custom_fields as uae_custom_fields, add_print_formats from erpnext.regional.saudi_arabia.wizard.operations.setup_ksa_vat_setting import create_ksa_vat_setting -from frappe.custom.doctype.custom_field.custom_field import create_custom_field +from frappe.custom.doctype.custom_field.custom_field import create_custom_fields def setup(company=None, patch=True): uae_custom_fields() add_print_formats() add_permissions() - create_ksa_vat_setting(company) make_custom_fields() def add_permissions(): @@ -31,28 +30,34 @@ def make_custom_fields(): - Company Name in Arabic - Address in Arabic """ - qr_code = dict( - fieldname='qr_code', - label='QR Code', - fieldtype='Attach Image', - read_only=1, no_copy=1, hidden=1) + custom_fields = { + 'Sales Invoice': [ + dict( + fieldname='qr_code', + label='QR Code', + fieldtype='Attach Image', + read_only=1, no_copy=1, hidden=1 + ) + ], + 'Address': [ + dict( + fieldname='address_in_arabic', + label='Address in Arabic', + fieldtype='Data', + insert_after='address_line2' + ) + ], + 'Company': [ + dict( + fieldname='company_name_in_arabic', + label='Company Name In Arabic', + fieldtype='Data', + insert_after='company_name' + ) + ] + } - create_custom_field('Sales Invoice', qr_code) + create_custom_fields(custom_fields, update=True) - company_name_in_arabic = dict( - fieldname='company_name_in_arabic', - label='Company Name In Arabic', - fieldtype='Data', - insert_after='company_name' - ) - - create_custom_field('Company', company_name_in_arabic) - - address_in_arabic = dict( - fieldname='address_in_arabic', - label='Address in Arabic', - fieldtype='Data', - insert_after='address_line2' - ) - - create_custom_field('Address', address_in_arabic) +def update_regional_tax_settings(country, company): + create_ksa_vat_setting(company) diff --git a/erpnext/regional/saudi_arabia/wizard/data/ksa_vat_settings.json b/erpnext/regional/saudi_arabia/wizard/data/ksa_vat_settings.json index 709d65be041..60951a9ceca 100644 --- a/erpnext/regional/saudi_arabia/wizard/data/ksa_vat_settings.json +++ b/erpnext/regional/saudi_arabia/wizard/data/ksa_vat_settings.json @@ -15,7 +15,7 @@ { "title": "Exempted sales", "item_tax_template": "KSA VAT Exempted", - "account": "VAT Zero" + "account": "VAT Exempted" } ] }, @@ -40,7 +40,7 @@ { "title": "Exempted purchases", "item_tax_template": "KSA VAT Exempted", - "account": "VAT Zero" + "account": "VAT Exempted" } ] } diff --git a/erpnext/regional/saudi_arabia/wizard/operations/setup_ksa_vat_setting.py b/erpnext/regional/saudi_arabia/wizard/operations/setup_ksa_vat_setting.py index 3c89edd37ed..97300dc3782 100644 --- a/erpnext/regional/saudi_arabia/wizard/operations/setup_ksa_vat_setting.py +++ b/erpnext/regional/saudi_arabia/wizard/operations/setup_ksa_vat_setting.py @@ -3,14 +3,11 @@ import os import frappe -from erpnext.setup.setup_wizard.operations.taxes_setup import setup_taxes_and_charges - def create_ksa_vat_setting(company): """On creation of first company. Creates KSA VAT Setting""" company = frappe.get_doc('Company', company) - setup_taxes_and_charges(company.name, company.country) file_path = os.path.join(os.path.dirname(__file__), '..', 'data', 'ksa_vat_settings.json') with open(file_path, 'r') as json_file: diff --git a/erpnext/setup/setup_wizard/data/country_wise_tax.json b/erpnext/setup/setup_wizard/data/country_wise_tax.json index 8a1338583ba..14b79510c12 100644 --- a/erpnext/setup/setup_wizard/data/country_wise_tax.json +++ b/erpnext/setup/setup_wizard/data/country_wise_tax.json @@ -2120,6 +2120,10 @@ "account_name": "VAT 15%", "tax_rate": 15.00 }, + "KSA VAT 5%": { + "account_name": "VAT 5%", + "tax_rate": 5.00 + }, "KSA VAT Zero": { "account_name": "VAT Zero", "tax_rate": 0.00 From 508832e90a3863e0a2030b999a6772d291afd84b Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Mon, 8 Nov 2021 17:46:24 +0530 Subject: [PATCH 162/200] fix: Add patch to make custom fields --- erpnext/patches.txt | 1 + .../patches/v13_0/create_ksa_vat_custom_fields.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 erpnext/patches/v13_0/create_ksa_vat_custom_fields.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 2c21ab6c3ae..a60b851c5a2 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -309,3 +309,4 @@ erpnext.patches.v14_0.delete_healthcare_doctypes erpnext.patches.v13_0.update_category_in_ltds_certificate erpnext.patches.v13_0.create_pan_field_for_india #2 erpnext.patches.v14_0.delete_hub_doctypes +erpnext.patches.v13_0.create_ksa_vat_custom_fields diff --git a/erpnext/patches/v13_0/create_ksa_vat_custom_fields.py b/erpnext/patches/v13_0/create_ksa_vat_custom_fields.py new file mode 100644 index 00000000000..f33b4b3ea0d --- /dev/null +++ b/erpnext/patches/v13_0/create_ksa_vat_custom_fields.py @@ -0,0 +1,12 @@ +import frappe + +from erpnext.regional.saudi_arabia.setup import make_custom_fields + + +def execute(): + company = frappe.get_all('Company', filters = {'country': 'Saudi Arabia'}) + if not company: + return + + make_custom_fields() + From 75e9100a5389eacca8f51c4a7ebe268f641cf2b8 Mon Sep 17 00:00:00 2001 From: Subin Tom Date: Mon, 8 Nov 2021 09:49:11 +0530 Subject: [PATCH 163/200] fix: Fixed customer address variable, sales invoice item field currency issue (cherry picked from commit 904010ab645fdb16f09072c062269945f7747712) --- .../doctype/taxjar_settings/taxjar_settings.py | 4 ++-- erpnext/erpnext_integrations/taxjar_integration.py | 2 +- erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py index bfc5e6f98df..b9f24b65b38 100644 --- a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py +++ b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.py @@ -80,9 +80,9 @@ def make_custom_fields(update=True): dict(fieldname='product_tax_category', fieldtype='Link', insert_after='description', options='Product Tax Category', label='Product Tax Category', fetch_from='item_code.product_tax_category'), dict(fieldname='tax_collectable', fieldtype='Currency', insert_after='net_amount', - label='Tax Collectable', read_only=1), + label='Tax Collectable', read_only=1, options='currency'), dict(fieldname='taxable_amount', fieldtype='Currency', insert_after='tax_collectable', - label='Taxable Amount', read_only=1) + label='Taxable Amount', read_only=1, options='currency') ], 'Item': [ dict(fieldname='product_tax_category', fieldtype='Link', insert_after='item_group', options='Product Tax Category', diff --git a/erpnext/erpnext_integrations/taxjar_integration.py b/erpnext/erpnext_integrations/taxjar_integration.py index 2a7243c2430..39aac0c4073 100644 --- a/erpnext/erpnext_integrations/taxjar_integration.py +++ b/erpnext/erpnext_integrations/taxjar_integration.py @@ -262,7 +262,7 @@ def get_shipping_address_details(doc): if doc.shipping_address_name: shipping_address = frappe.get_doc("Address", doc.shipping_address_name) elif doc.customer_address: - shipping_address = frappe.get_doc("Address", doc.customer_address_name) + shipping_address = frappe.get_doc("Address", doc.customer_address) else: shipping_address = get_company_address_details(doc) diff --git a/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py b/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py index fba9e2c4430..1625e4f17e7 100644 --- a/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py +++ b/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py @@ -21,9 +21,9 @@ def execute(): dict(fieldname='product_tax_category', fieldtype='Link', insert_after='description', options='Product Tax Category', label='Product Tax Category', fetch_from='item_code.product_tax_category'), dict(fieldname='tax_collectable', fieldtype='Currency', insert_after='net_amount', - label='Tax Collectable', read_only=1), + label='Tax Collectable', read_only=1, options='currency'), dict(fieldname='taxable_amount', fieldtype='Currency', insert_after='tax_collectable', - label='Taxable Amount', read_only=1) + label='Taxable Amount', read_only=1, options='currency') ], 'Item': [ dict(fieldname='product_tax_category', fieldtype='Link', insert_after='item_group', options='Product Tax Category', From e51c4ba8a9c96dd28580a8a6e3fcffdb45c7bdb4 Mon Sep 17 00:00:00 2001 From: Subin Tom Date: Mon, 8 Nov 2021 15:16:20 +0530 Subject: [PATCH 164/200] fix: Added company field, filtered account heads (cherry picked from commit 902c03cd375c7b1b2f35cff4dfbc5f1ff3e4cd56) --- .../taxjar_settings/taxjar_settings.js | 17 ++++++++++++++ .../taxjar_settings/taxjar_settings.json | 22 ++++++++++++++----- .../taxjar_integration.py | 6 +++++ .../custom_fields_for_taxjar_integration.py | 4 ++++ 4 files changed, 44 insertions(+), 5 deletions(-) diff --git a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.js b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.js index d49598932fe..a362ba1f0b4 100644 --- a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.js +++ b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.js @@ -7,6 +7,23 @@ frappe.ui.form.on('TaxJar Settings', { frm.toggle_reqd("sandbox_api_key", frm.doc.is_sandbox); }, + on_load: (frm) => { + frm.set_query('shipping_account_head', function() { + return { + filters: { + 'company': frm.doc.current_company + } + }; + }); + frm.set_query('tax_account_head', function() { + return { + filters: { + 'company': frm.doc.current_company + } + }; + }); + }, + refresh: (frm) => { frm.add_custom_button(__('Update Nexus List'), function() { frm.call({ diff --git a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json index 2d17f2ed832..1fda8929e90 100644 --- a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json +++ b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json @@ -14,6 +14,8 @@ "cb_keys", "sandbox_api_key", "configuration", + "current_company", + "column_break_10", "tax_account_head", "configuration_cb", "shipping_account_head", @@ -67,10 +69,6 @@ "fieldtype": "Password", "label": "Sandbox API Key" }, - { - "fieldname": "configuration_cb", - "fieldtype": "Column Break" - }, { "default": "0", "depends_on": "taxjar_calculate_tax", @@ -104,11 +102,25 @@ "label": "Nexus", "options": "TaxJar Nexus", "read_only": 1 + }, + { + "fieldname": "current_company", + "fieldtype": "Link", + "label": "Company", + "options": "Company" + }, + { + "fieldname": "configuration_cb", + "fieldtype": "Column Break" + }, + { + "fieldname": "column_break_10", + "fieldtype": "Column Break" } ], "issingle": 1, "links": [], - "modified": "2021-10-06 10:59:13.475442", + "modified": "2021-11-08 14:40:15.684224", "modified_by": "Administrator", "module": "ERPNext Integrations", "name": "TaxJar Settings", diff --git a/erpnext/erpnext_integrations/taxjar_integration.py b/erpnext/erpnext_integrations/taxjar_integration.py index 39aac0c4073..794b281c55a 100644 --- a/erpnext/erpnext_integrations/taxjar_integration.py +++ b/erpnext/erpnext_integrations/taxjar_integration.py @@ -19,6 +19,8 @@ SUPPORTED_STATE_CODES = ['AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', ' 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY'] +USA_COMPANIES = frappe.get_all('Company', filters = {'country': 'United States'}, fields=['name'], pluck='name') + def get_client(): @@ -158,6 +160,10 @@ def set_sales_tax(doc, method): if not TAXJAR_CALCULATE_TAX: return + taxjar_settings_company = frappe.db.get_single_value('TaxJar Settings','current_company') + if taxjar_settings_company not in USA_COMPANIES: + return + if not doc.items: return diff --git a/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py b/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py index 1625e4f17e7..775e4d8cd56 100644 --- a/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py +++ b/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py @@ -28,6 +28,10 @@ def execute(): 'Item': [ dict(fieldname='product_tax_category', fieldtype='Link', insert_after='item_group', options='Product Tax Category', label='Product Tax Category') + ], + 'TaxJar Settings': [ + dict(fieldname='current_company', fieldtype='Link', insert_after='configuration', options='Company', + label='Company') ] } create_custom_fields(custom_fields, update=True) From d2915c6bc7330eb245d398dc61bd1d63d13a3b48 Mon Sep 17 00:00:00 2001 From: Subin Tom Date: Mon, 8 Nov 2021 17:59:03 +0530 Subject: [PATCH 165/200] fix: fixed company field, updated patch (cherry picked from commit 7f2d304f32fdf580a354c1dbba58189cdd4f35f2) # Conflicts: # erpnext/patches.txt --- .../doctype/taxjar_settings/taxjar_settings.js | 4 ++-- .../doctype/taxjar_settings/taxjar_settings.json | 9 +-------- erpnext/erpnext_integrations/taxjar_integration.py | 6 ++---- erpnext/patches.txt | 4 ++++ .../v13_0/custom_fields_for_taxjar_integration.py | 2 +- 5 files changed, 10 insertions(+), 15 deletions(-) diff --git a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.js b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.js index a362ba1f0b4..2925db82e33 100644 --- a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.js +++ b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.js @@ -11,14 +11,14 @@ frappe.ui.form.on('TaxJar Settings', { frm.set_query('shipping_account_head', function() { return { filters: { - 'company': frm.doc.current_company + 'company': frm.doc.company } }; }); frm.set_query('tax_account_head', function() { return { filters: { - 'company': frm.doc.current_company + 'company': frm.doc.company } }; }); diff --git a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json index 1fda8929e90..d9ae5b601cc 100644 --- a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json +++ b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json @@ -14,7 +14,6 @@ "cb_keys", "sandbox_api_key", "configuration", - "current_company", "column_break_10", "tax_account_head", "configuration_cb", @@ -103,12 +102,6 @@ "options": "TaxJar Nexus", "read_only": 1 }, - { - "fieldname": "current_company", - "fieldtype": "Link", - "label": "Company", - "options": "Company" - }, { "fieldname": "configuration_cb", "fieldtype": "Column Break" @@ -120,7 +113,7 @@ ], "issingle": 1, "links": [], - "modified": "2021-11-08 14:40:15.684224", + "modified": "2021-11-08 17:57:17.323275", "modified_by": "Administrator", "module": "ERPNext Integrations", "name": "TaxJar Settings", diff --git a/erpnext/erpnext_integrations/taxjar_integration.py b/erpnext/erpnext_integrations/taxjar_integration.py index 794b281c55a..1adc1ddb140 100644 --- a/erpnext/erpnext_integrations/taxjar_integration.py +++ b/erpnext/erpnext_integrations/taxjar_integration.py @@ -6,7 +6,7 @@ from frappe import _ from frappe.contacts.doctype.address.address import get_company_address from frappe.utils import cint, flt -from erpnext import get_default_company +from erpnext import get_default_company, get_region TAX_ACCOUNT_HEAD = frappe.db.get_single_value("TaxJar Settings", "tax_account_head") SHIP_ACCOUNT_HEAD = frappe.db.get_single_value("TaxJar Settings", "shipping_account_head") @@ -19,7 +19,6 @@ SUPPORTED_STATE_CODES = ['AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', ' 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY'] -USA_COMPANIES = frappe.get_all('Company', filters = {'country': 'United States'}, fields=['name'], pluck='name') @@ -160,8 +159,7 @@ def set_sales_tax(doc, method): if not TAXJAR_CALCULATE_TAX: return - taxjar_settings_company = frappe.db.get_single_value('TaxJar Settings','current_company') - if taxjar_settings_company not in USA_COMPANIES: + if get_region(doc.company): return if not doc.items: diff --git a/erpnext/patches.txt b/erpnext/patches.txt index a60b851c5a2..0dcd3b73a30 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -283,8 +283,12 @@ erpnext.patches.v13_0.reset_clearance_date_for_intracompany_payment_entries erpnext.patches.v13_0.einvoicing_deprecation_warning execute:frappe.reload_doc("erpnext_integrations", "doctype", "TaxJar Settings") execute:frappe.reload_doc("erpnext_integrations", "doctype", "Product Tax Category") +<<<<<<< HEAD erpnext.patches.v13_0.custom_fields_for_taxjar_integration erpnext.patches.v14_0.delete_einvoicing_doctypes +======= +erpnext.patches.v13_0.custom_fields_for_taxjar_integration #08-11-2021 +>>>>>>> 7f2d304f32 (fix: fixed company field, updated patch) erpnext.patches.v13_0.set_operation_time_based_on_operating_cost erpnext.patches.v13_0.validate_options_for_data_field erpnext.patches.v13_0.create_gst_payment_entry_fields diff --git a/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py b/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py index 775e4d8cd56..078c558d885 100644 --- a/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py +++ b/erpnext/patches/v13_0/custom_fields_for_taxjar_integration.py @@ -30,7 +30,7 @@ def execute(): label='Product Tax Category') ], 'TaxJar Settings': [ - dict(fieldname='current_company', fieldtype='Link', insert_after='configuration', options='Company', + dict(fieldname='company', fieldtype='Link', insert_after='configuration', options='Company', label='Company') ] } From 45fd819729a73be9e334194e64ad00e81b36dabc Mon Sep 17 00:00:00 2001 From: Subin Tom Date: Mon, 8 Nov 2021 18:03:44 +0530 Subject: [PATCH 166/200] fix: company condition fix, added company field (cherry picked from commit 7ad2717accea61883f98d418b4abed47ca3937a8) --- .../doctype/taxjar_settings/taxjar_settings.json | 9 ++++++++- erpnext/erpnext_integrations/taxjar_integration.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json index d9ae5b601cc..23ccb7e4dac 100644 --- a/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json +++ b/erpnext/erpnext_integrations/doctype/taxjar_settings/taxjar_settings.json @@ -14,6 +14,7 @@ "cb_keys", "sandbox_api_key", "configuration", + "company", "column_break_10", "tax_account_head", "configuration_cb", @@ -109,11 +110,17 @@ { "fieldname": "column_break_10", "fieldtype": "Column Break" + }, + { + "fieldname": "company", + "fieldtype": "Link", + "label": "Company", + "options": "Company" } ], "issingle": 1, "links": [], - "modified": "2021-11-08 17:57:17.323275", + "modified": "2021-11-08 18:02:29.232090", "modified_by": "Administrator", "module": "ERPNext Integrations", "name": "TaxJar Settings", diff --git a/erpnext/erpnext_integrations/taxjar_integration.py b/erpnext/erpnext_integrations/taxjar_integration.py index 1adc1ddb140..a4e21579e32 100644 --- a/erpnext/erpnext_integrations/taxjar_integration.py +++ b/erpnext/erpnext_integrations/taxjar_integration.py @@ -159,7 +159,7 @@ def set_sales_tax(doc, method): if not TAXJAR_CALCULATE_TAX: return - if get_region(doc.company): + if get_region(doc.company) != 'United States': return if not doc.items: From 94d70bca9ed8bfbaf28d70569970bd19cf4e23fe Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Mon, 8 Nov 2021 18:48:46 +0530 Subject: [PATCH 167/200] fix: Resolve conflicts --- erpnext/patches.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 0dcd3b73a30..1006e2180ff 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -283,12 +283,8 @@ erpnext.patches.v13_0.reset_clearance_date_for_intracompany_payment_entries erpnext.patches.v13_0.einvoicing_deprecation_warning execute:frappe.reload_doc("erpnext_integrations", "doctype", "TaxJar Settings") execute:frappe.reload_doc("erpnext_integrations", "doctype", "Product Tax Category") -<<<<<<< HEAD -erpnext.patches.v13_0.custom_fields_for_taxjar_integration erpnext.patches.v14_0.delete_einvoicing_doctypes -======= erpnext.patches.v13_0.custom_fields_for_taxjar_integration #08-11-2021 ->>>>>>> 7f2d304f32 (fix: fixed company field, updated patch) erpnext.patches.v13_0.set_operation_time_based_on_operating_cost erpnext.patches.v13_0.validate_options_for_data_field erpnext.patches.v13_0.create_gst_payment_entry_fields From 27709a1c71a9943cb95deb8ef1b563c465489dcb Mon Sep 17 00:00:00 2001 From: Anupam Date: Tue, 9 Nov 2021 09:56:58 +0530 Subject: [PATCH 168/200] fix: test cases --- .../doctype/work_order/test_work_order.py | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index c3f3917b5c8..f4a88dc4598 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -826,19 +826,20 @@ class TestWorkOrder(unittest.TestCase): wo_order = make_wo_order_test_record(item=item, company=company, planned_start_date=now(), qty=20, skip_transfer=1) job_cards = frappe.db.get_value('Job Card', {'work_order': wo_order.name}, 'name') - self.assertEqual(len(job_cards), len(bom.operations)) - for jc in job_cards: - job_card_doc = frappe.get_doc('Job Card', jc) - job_card_doc.append('time_logs', { - 'from_time': now(), - 'time_in_mins': 60, - 'completed_qty': job_card_doc.for_quantity - }) - job_card_doc.submit() + if len(job_cards) == len(bom.operations): + for jc in job_cards: + job_card_doc = frappe.get_doc('Job Card', jc) + job_card_doc.append('time_logs', { + 'from_time': now(), + 'time_in_mins': 60, + 'completed_qty': job_card_doc.for_quantity + }) - close_work_order(wo_order, "Closed") - self.assertEqual(wo_order.get('status'), "Closed") + job_card_doc.submit() + + close_work_order(wo_order, "Closed") + self.assertEqual(wo_order.get('status'), "Closed") def update_job_card(job_card): job_card_doc = frappe.get_doc('Job Card', job_card) From 0e8e7e21c3bf020497be7c599d43650ff5ff0b91 Mon Sep 17 00:00:00 2001 From: Bibin <17405044+bibinqcs@users.noreply.github.com> Date: Tue, 9 Nov 2021 08:32:05 +0400 Subject: [PATCH 169/200] fix: filter only submitted fees in student fee collection report (#28280) * Update student_fee_collection.json Fix: filter and show only submitted fees documents * fix: add total row for the student fee collection --- .../student_fee_collection/student_fee_collection.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/education/report/student_fee_collection/student_fee_collection.json b/erpnext/education/report/student_fee_collection/student_fee_collection.json index 8deb865ebcd..c0229a2ee26 100644 --- a/erpnext/education/report/student_fee_collection/student_fee_collection.json +++ b/erpnext/education/report/student_fee_collection/student_fee_collection.json @@ -1,5 +1,5 @@ { - "add_total_row": 0, + "add_total_row": 1, "creation": "2016-06-22 02:58:41.024538", "disable_prepared_report": 0, "disabled": 0, @@ -13,7 +13,7 @@ "name": "Student Fee Collection", "owner": "Administrator", "prepared_report": 0, - "query": "SELECT\n student as \"Student:Link/Student:200\",\n student_name as \"Student Name::200\",\n sum(grand_total) - sum(outstanding_amount) as \"Paid Amount:Currency:150\",\n sum(outstanding_amount) as \"Outstanding Amount:Currency:150\",\n sum(grand_total) as \"Grand Total:Currency:150\"\nFROM\n `tabFees` \nGROUP BY\n student", + "query": "SELECT\n student as \"Student:Link/Student:200\",\n student_name as \"Student Name::200\",\n sum(grand_total) - sum(outstanding_amount) as \"Paid Amount:Currency:150\",\n sum(outstanding_amount) as \"Outstanding Amount:Currency:150\",\n sum(grand_total) as \"Grand Total:Currency:150\"\nFROM\n `tabFees` \nWHERE\n docstatus=1 \nGROUP BY\n student", "ref_doctype": "Fees", "report_name": "Student Fee Collection", "report_type": "Query Report", @@ -22,4 +22,4 @@ "role": "Academics User" } ] -} \ No newline at end of file +} From 663a7afe4df81fe3956af4eb18ca1eaa0614b626 Mon Sep 17 00:00:00 2001 From: Anupam Date: Tue, 9 Nov 2021 10:50:38 +0530 Subject: [PATCH 170/200] fix: get_planned_qty chnages --- erpnext/stock/stock_balance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/stock_balance.py b/erpnext/stock/stock_balance.py index 1cb0f0d0a49..51c20b02506 100644 --- a/erpnext/stock/stock_balance.py +++ b/erpnext/stock/stock_balance.py @@ -161,7 +161,7 @@ def get_ordered_qty(item_code, warehouse): def get_planned_qty(item_code, warehouse): planned_qty = frappe.db.sql(""" select sum(qty - produced_qty) from `tabWork Order` - where production_item = %s and fg_warehouse = %s and status not in ("Stopped", "Completed") + where production_item = %s and fg_warehouse = %s and status not in ("Stopped", "Completed", "Closed") and docstatus=1 and qty > produced_qty""", (item_code, warehouse)) return flt(planned_qty[0][0]) if planned_qty else 0 From 34f5283c1773b79463fcf77a037c6ae258e329dc Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Tue, 9 Nov 2021 11:55:33 +0530 Subject: [PATCH 171/200] fix: show full item name in search widget (#28283) --- erpnext/controllers/queries.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index 22e02b4a745..76a7d1a95ff 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -210,12 +210,15 @@ def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=Fals meta = frappe.get_meta("Item", cached=True) searchfields = meta.get_search_fields() - if "description" in searchfields: - searchfields.remove("description") + # these are handled separately + ignored_search_fields = ("item_name", "description") + for ignored_field in ignored_search_fields: + if ignored_field in searchfields: + searchfields.remove(ignored_field) columns = '' extra_searchfields = [field for field in searchfields - if not field in ["name", "item_group", "description"]] + if not field in ["name", "item_group", "description", "item_name"]] if extra_searchfields: columns = ", " + ", ".join(extra_searchfields) @@ -252,10 +255,8 @@ def item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=Fals if frappe.db.count('Item', cache=True) < 50000: # scan description only if items are less than 50000 description_cond = 'or tabItem.description LIKE %(txt)s' - return frappe.db.sql("""select tabItem.name, - if(length(tabItem.item_name) > 40, - concat(substr(tabItem.item_name, 1, 40), "..."), item_name) as item_name, - tabItem.item_group, + return frappe.db.sql("""select + tabItem.name, tabItem.item_name, tabItem.item_group, if(length(tabItem.description) > 40, \ concat(substr(tabItem.description, 1, 40), "..."), description) as description {columns} From 4a3cef6436287b7d0be69b5e0965c4f989957931 Mon Sep 17 00:00:00 2001 From: Saqib Date: Tue, 9 Nov 2021 14:16:38 +0530 Subject: [PATCH 172/200] fix: update 'current_invoice_end' after processing invoice (#28278) --- erpnext/accounts/doctype/subscription/subscription.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/subscription/subscription.py b/erpnext/accounts/doctype/subscription/subscription.py index 63b714e68c6..1dae87f2a44 100644 --- a/erpnext/accounts/doctype/subscription/subscription.py +++ b/erpnext/accounts/doctype/subscription/subscription.py @@ -519,8 +519,6 @@ class Subscription(Document): 2. Change the `Subscription` status to 'Past Due Date' 3. Change the `Subscription` status to 'Cancelled' """ - if getdate() > getdate(self.current_invoice_end) and self.is_prepaid_to_invoice(): - self.update_subscription_period(add_days(self.current_invoice_end, 1)) if not self.is_current_invoice_generated(self.current_invoice_start, self.current_invoice_end) \ and (self.is_postpaid_to_invoice() or self.is_prepaid_to_invoice()): @@ -528,6 +526,9 @@ class Subscription(Document): prorate = frappe.db.get_single_value('Subscription Settings', 'prorate') self.generate_invoice(prorate) + if getdate() > getdate(self.current_invoice_end) and self.is_prepaid_to_invoice(): + self.update_subscription_period(add_days(self.current_invoice_end, 1)) + if self.cancel_at_period_end and getdate() > getdate(self.current_invoice_end): self.cancel_subscription_at_period_end() From 17acb08545a5bab991a5eb2f0f3e720886006bc4 Mon Sep 17 00:00:00 2001 From: Jannat Patel <31363128+pateljannat@users.noreply.github.com> Date: Tue, 9 Nov 2021 15:21:51 +0530 Subject: [PATCH 173/200] fix: sum of components in salary register (#28237) * fix: sum of components in salary register * fix: sum of deduction components Co-authored-by: Rucha Mahabal --- .../report/salary_register/salary_register.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/payroll/report/salary_register/salary_register.py b/erpnext/payroll/report/salary_register/salary_register.py index 13ee691d876..78deb227783 100644 --- a/erpnext/payroll/report/salary_register/salary_register.py +++ b/erpnext/payroll/report/salary_register/salary_register.py @@ -134,11 +134,11 @@ def get_ss_earning_map(salary_slips, currency, company_currency): ss_earning_map = {} for d in ss_earnings: - ss_earning_map.setdefault(d.parent, frappe._dict()).setdefault(d.salary_component, []) + ss_earning_map.setdefault(d.parent, frappe._dict()).setdefault(d.salary_component, 0.0) if currency == company_currency: - ss_earning_map[d.parent][d.salary_component] = flt(d.amount) * flt(d.exchange_rate if d.exchange_rate else 1) + ss_earning_map[d.parent][d.salary_component] += flt(d.amount) * flt(d.exchange_rate if d.exchange_rate else 1) else: - ss_earning_map[d.parent][d.salary_component] = flt(d.amount) + ss_earning_map[d.parent][d.salary_component] += flt(d.amount) return ss_earning_map @@ -149,10 +149,10 @@ def get_ss_ded_map(salary_slips, currency, company_currency): ss_ded_map = {} for d in ss_deductions: - ss_ded_map.setdefault(d.parent, frappe._dict()).setdefault(d.salary_component, []) + ss_ded_map.setdefault(d.parent, frappe._dict()).setdefault(d.salary_component, 0.0) if currency == company_currency: - ss_ded_map[d.parent][d.salary_component] = flt(d.amount) * flt(d.exchange_rate if d.exchange_rate else 1) + ss_ded_map[d.parent][d.salary_component] += flt(d.amount) * flt(d.exchange_rate if d.exchange_rate else 1) else: - ss_ded_map[d.parent][d.salary_component] = flt(d.amount) + ss_ded_map[d.parent][d.salary_component] += flt(d.amount) return ss_ded_map From da22744e0fd7e19a6536aa653ebd78a83fafbac1 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Tue, 9 Nov 2021 15:49:32 +0530 Subject: [PATCH 174/200] fix: specify fields to be set in Lead (#28288) --- erpnext/shopping_cart/cart.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py index a7d90ea201a..ebbe233ca3a 100644 --- a/erpnext/shopping_cart/cart.py +++ b/erpnext/shopping_cart/cart.py @@ -194,7 +194,9 @@ def add_new_address(doc): def create_lead_for_item_inquiry(lead, subject, message): lead = frappe.parse_json(lead) lead_doc = frappe.new_doc('Lead') - lead_doc.update(lead) + for fieldname in ("lead_name", "company_name", "email_id", "phone"): + lead_doc.set(fieldname, lead.get(fieldname)) + lead_doc.set('lead_owner', '') if not frappe.db.exists('Lead Source', 'Product Inquiry'): @@ -202,6 +204,7 @@ def create_lead_for_item_inquiry(lead, subject, message): 'doctype': 'Lead Source', 'source_name' : 'Product Inquiry' }).insert(ignore_permissions=True) + lead_doc.set('source', 'Product Inquiry') try: From 88b5bda34b80fb83e71f94a984184304e5b4c853 Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Tue, 9 Nov 2021 16:04:52 +0530 Subject: [PATCH 175/200] fix(India setup): setup company independent fixtures for patch --- erpnext/regional/india/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/regional/india/setup.py b/erpnext/regional/india/setup.py index 42ee27171fb..316bb6b1977 100644 --- a/erpnext/regional/india/setup.py +++ b/erpnext/regional/india/setup.py @@ -12,7 +12,7 @@ from frappe.utils import today def setup(company=None, patch=True): # Company independent fixtures should be called only once at the first company setup - if frappe.db.count('Company', {'country': 'India'}) <=1: + if patch or frappe.db.count('Company', {'country': 'India'}) <=1: setup_company_independent_fixtures(patch=patch) if not patch: From 6907ad8adb2e15239598df8908eec16b56e106f1 Mon Sep 17 00:00:00 2001 From: Wolfram Schmidt Date: Tue, 9 Nov 2021 13:02:57 +0100 Subject: [PATCH 176/200] fix: add Email option to contact email field (#28296) * Update warranty_claim.json Added the Email in option field of Contact Email so you are able to create a notification mapping to this field as reciever. * Update warranty_claim.json --- erpnext/support/doctype/warranty_claim/warranty_claim.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/support/doctype/warranty_claim/warranty_claim.json b/erpnext/support/doctype/warranty_claim/warranty_claim.json index 88ee4a3bebd..45485ca2c2f 100644 --- a/erpnext/support/doctype/warranty_claim/warranty_claim.json +++ b/erpnext/support/doctype/warranty_claim/warranty_claim.json @@ -256,6 +256,7 @@ "fieldname": "contact_email", "fieldtype": "Data", "label": "Contact Email", + "options": "Email", "read_only": 1 }, { @@ -361,7 +362,7 @@ ], "icon": "fa fa-bug", "idx": 1, - "modified": "2020-09-18 17:26:09.703215", + "modified": "2021-11-09 17:26:09.703215", "modified_by": "Administrator", "module": "Support", "name": "Warranty Claim", @@ -385,4 +386,4 @@ "sort_order": "DESC", "timeline_field": "customer", "title_field": "customer_name" -} \ No newline at end of file +} From 37799fe3dd5beed8b05ab0ea83139f3e5f200179 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 3 Nov 2021 16:33:28 +0530 Subject: [PATCH 177/200] fix: use completion qty instead of transfer quantity for JC status --- erpnext/manufacturing/doctype/job_card/job_card.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index f0f18cf7ddb..5eea032be59 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -504,13 +504,11 @@ class JobCard(Document): self.status = 'Work In Progress' if (self.docstatus == 1 and - (self.for_quantity <= self.transferred_qty or not self.items)): - # consider excess transfer - # completed qty is checked via separate validation + (self.for_quantity <= self.total_completed_qty or not self.items)): self.status = 'Completed' if self.status != 'Completed': - if self.for_quantity == self.transferred_qty: + if self.for_quantity <= self.transferred_qty: self.status = 'Material Transferred' if update_status: From fdfa39c231ed3648d6e8b7cf0cda1934062b49da Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 3 Nov 2021 12:48:57 +0530 Subject: [PATCH 178/200] fix: avoid mutating iterator while iterating over it --- erpnext/stock/doctype/stock_entry/stock_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index fa2436bd27d..46c9576a9c8 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -1450,7 +1450,7 @@ class StockEntry(StockController): item_dict[item]["qty"] = 0 # delete items with 0 qty - list_of_items = item_dict.keys() + list_of_items = list(item_dict.keys()) for item in list_of_items: if not item_dict[item]["qty"]: del item_dict[item] From ccf84ae88a752d94d459e369fa5c1afaab9e49f1 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Sun, 7 Nov 2021 18:06:37 +0530 Subject: [PATCH 179/200] fix: patch to update job card status --- erpnext/patches.txt | 1 + .../patches/v13_0/update_job_card_status.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 erpnext/patches/v13_0/update_job_card_status.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 1006e2180ff..778cbdf65bd 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -303,6 +303,7 @@ erpnext.patches.v13_0.set_status_in_maintenance_schedule_table erpnext.patches.v13_0.add_default_interview_notification_templates erpnext.patches.v13_0.enable_scheduler_job_for_item_reposting erpnext.patches.v13_0.requeue_failed_reposts +erpnext.patches.v13_0.update_job_card_status erpnext.patches.v12_0.update_production_plan_status erpnext.patches.v13_0.healthcare_deprecation_warning erpnext.patches.v14_0.delete_healthcare_doctypes diff --git a/erpnext/patches/v13_0/update_job_card_status.py b/erpnext/patches/v13_0/update_job_card_status.py new file mode 100644 index 00000000000..797a3e2ae35 --- /dev/null +++ b/erpnext/patches/v13_0/update_job_card_status.py @@ -0,0 +1,18 @@ +# Copyright (c) 2021, Frappe and Contributors +# License: GNU General Public License v3. See license.txt + +import frappe + + +def execute(): + + job_card = frappe.qb.DocType("Job Card") + (frappe.qb + .update(job_card) + .set(job_card.status, "Completed") + .where( + (job_card.docstatus == 1) + & (job_card.for_quantity <= job_card.total_completed_qty) + & (job_card.status.isin(["Work In Progress", "Material Transferred"])) + ) + ).run() From 6954dd6329f2af0db88413fe933c5e1a111bcb9b Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Tue, 9 Nov 2021 19:36:27 +0530 Subject: [PATCH 180/200] feat: Competitor Tagging in Opportunity and Quotation (#28050) * feat: Competitor Tagging in Opportunity and Quotation * fix: review changes * fix: linter issue * fix: section label Co-authored-by: Rucha Mahabal --- erpnext/crm/doctype/competitor/__init__.py | 0 erpnext/crm/doctype/competitor/competitor.js | 8 +++ .../crm/doctype/competitor/competitor.json | 68 +++++++++++++++++++ erpnext/crm/doctype/competitor/competitor.py | 9 +++ .../crm/doctype/competitor/test_competitor.py | 9 +++ .../crm/doctype/competitor_detail/__init__.py | 0 .../competitor_detail/competitor_detail.json | 33 +++++++++ .../competitor_detail/competitor_detail.py | 9 +++ .../crm/doctype/opportunity/opportunity.json | 31 +++++++-- .../crm/doctype/opportunity/opportunity.py | 10 ++- .../selling/doctype/quotation/quotation.json | 15 +++- .../selling/doctype/quotation/quotation.py | 5 +- erpnext/selling/sales_common.js | 18 +++-- 13 files changed, 197 insertions(+), 18 deletions(-) create mode 100644 erpnext/crm/doctype/competitor/__init__.py create mode 100644 erpnext/crm/doctype/competitor/competitor.js create mode 100644 erpnext/crm/doctype/competitor/competitor.json create mode 100644 erpnext/crm/doctype/competitor/competitor.py create mode 100644 erpnext/crm/doctype/competitor/test_competitor.py create mode 100644 erpnext/crm/doctype/competitor_detail/__init__.py create mode 100644 erpnext/crm/doctype/competitor_detail/competitor_detail.json create mode 100644 erpnext/crm/doctype/competitor_detail/competitor_detail.py diff --git a/erpnext/crm/doctype/competitor/__init__.py b/erpnext/crm/doctype/competitor/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/crm/doctype/competitor/competitor.js b/erpnext/crm/doctype/competitor/competitor.js new file mode 100644 index 00000000000..a5b617dc74c --- /dev/null +++ b/erpnext/crm/doctype/competitor/competitor.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Competitor', { + // refresh: function(frm) { + + // } +}); diff --git a/erpnext/crm/doctype/competitor/competitor.json b/erpnext/crm/doctype/competitor/competitor.json new file mode 100644 index 00000000000..280441f16fd --- /dev/null +++ b/erpnext/crm/doctype/competitor/competitor.json @@ -0,0 +1,68 @@ +{ + "actions": [], + "allow_rename": 1, + "autoname": "field:competitor_name", + "creation": "2021-10-21 10:28:52.071316", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "competitor_name", + "website" + ], + "fields": [ + { + "fieldname": "competitor_name", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Competitor Name", + "reqd": 1, + "unique": 1 + }, + { + "allow_in_quick_entry": 1, + "fieldname": "website", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Website", + "options": "URL" + } + ], + "index_web_pages_for_search": 1, + "links": [], + "modified": "2021-10-21 12:43:59.106807", + "modified_by": "Administrator", + "module": "CRM", + "name": "Competitor", + "naming_rule": "By fieldname", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + }, + { + "create": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "Sales User", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/erpnext/crm/doctype/competitor/competitor.py b/erpnext/crm/doctype/competitor/competitor.py new file mode 100644 index 00000000000..a292e461048 --- /dev/null +++ b/erpnext/crm/doctype/competitor/competitor.py @@ -0,0 +1,9 @@ +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class Competitor(Document): + pass diff --git a/erpnext/crm/doctype/competitor/test_competitor.py b/erpnext/crm/doctype/competitor/test_competitor.py new file mode 100644 index 00000000000..f77d7e658dc --- /dev/null +++ b/erpnext/crm/doctype/competitor/test_competitor.py @@ -0,0 +1,9 @@ +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors +# See license.txt + +# import frappe +import unittest + + +class TestCompetitor(unittest.TestCase): + pass diff --git a/erpnext/crm/doctype/competitor_detail/__init__.py b/erpnext/crm/doctype/competitor_detail/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/crm/doctype/competitor_detail/competitor_detail.json b/erpnext/crm/doctype/competitor_detail/competitor_detail.json new file mode 100644 index 00000000000..9512b22a3f2 --- /dev/null +++ b/erpnext/crm/doctype/competitor_detail/competitor_detail.json @@ -0,0 +1,33 @@ +{ + "actions": [], + "allow_rename": 1, + "creation": "2021-10-21 10:34:58.841689", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "competitor" + ], + "fields": [ + { + "fieldname": "competitor", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Competitor", + "options": "Competitor", + "reqd": 1 + } + ], + "index_web_pages_for_search": 1, + "istable": 1, + "links": [], + "modified": "2021-10-21 10:34:58.841689", + "modified_by": "Administrator", + "module": "CRM", + "name": "Competitor Detail", + "owner": "Administrator", + "permissions": [], + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/erpnext/crm/doctype/competitor_detail/competitor_detail.py b/erpnext/crm/doctype/competitor_detail/competitor_detail.py new file mode 100644 index 00000000000..0ef75605b76 --- /dev/null +++ b/erpnext/crm/doctype/competitor_detail/competitor_detail.py @@ -0,0 +1,9 @@ +# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and contributors +# For license information, please see license.txt + +# import frappe +from frappe.model.document import Document + + +class CompetitorDetail(Document): + pass diff --git a/erpnext/crm/doctype/opportunity/opportunity.json b/erpnext/crm/doctype/opportunity/opportunity.json index dc886b51b40..feb6044d64c 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.json +++ b/erpnext/crm/doctype/opportunity/opportunity.json @@ -23,7 +23,6 @@ "status", "converted_by", "sales_stage", - "order_lost_reason", "first_response_time", "expected_closing", "next_contact", @@ -64,7 +63,11 @@ "transaction_date", "language", "amended_from", - "lost_reasons" + "lost_detail_section", + "lost_reasons", + "order_lost_reason", + "column_break_56", + "competitors" ], "fields": [ { @@ -154,10 +157,9 @@ "reqd": 1 }, { - "depends_on": "eval:doc.status===\"Lost\"", "fieldname": "order_lost_reason", "fieldtype": "Small Text", - "label": "Lost Reason", + "label": "Detailed Reason", "no_copy": 1, "read_only": 1 }, @@ -409,6 +411,7 @@ "width": "150px" }, { + "depends_on": "eval:doc.status===\"Lost\"", "fieldname": "lost_reasons", "fieldtype": "Table MultiSelect", "label": "Lost Reasons", @@ -486,15 +489,33 @@ "label": "Grand Total", "options": "currency", "read_only": 1 + }, + { + "fieldname": "lost_detail_section", + "fieldtype": "Section Break", + "label": "Lost Reasons" + }, + { + "fieldname": "column_break_56", + "fieldtype": "Column Break" + }, + { + "fieldname": "competitors", + "fieldtype": "Table MultiSelect", + "label": "Competitors", + "options": "Competitor Detail", + "read_only": 1 } ], "icon": "fa fa-info-sign", "idx": 195, "links": [], - "modified": "2021-09-06 10:02:18.609136", + "migration_hash": "d87c646ea2579b6900197fd41e6c5c5a", + "modified": "2021-10-21 11:04:30.151379", "modified_by": "Administrator", "module": "CRM", "name": "Opportunity", + "naming_rule": "By \"Naming Series\" field", "owner": "Administrator", "permissions": [ { diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index 90eae8dcb94..0bef80a749d 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -116,16 +116,20 @@ class Opportunity(TransactionBase): self.party_name = lead_name @frappe.whitelist() - def declare_enquiry_lost(self, lost_reasons_list, detailed_reason=None): + def declare_enquiry_lost(self, lost_reasons_list, competitors, detailed_reason=None): if not self.has_active_quotation(): - frappe.db.set(self, 'status', 'Lost') + self.status = 'Lost' + self.lost_reasons = self.competitors = [] if detailed_reason: - frappe.db.set(self, 'order_lost_reason', detailed_reason) + self.order_lost_reason = detailed_reason for reason in lost_reasons_list: self.append('lost_reasons', reason) + for competitor in competitors: + self.append('competitors', competitor) + self.save() else: diff --git a/erpnext/selling/doctype/quotation/quotation.json b/erpnext/selling/doctype/quotation/quotation.json index 43a44900fcb..ad788e5c8bf 100644 --- a/erpnext/selling/doctype/quotation/quotation.json +++ b/erpnext/selling/doctype/quotation/quotation.json @@ -110,7 +110,8 @@ "enq_det", "supplier_quotation", "opportunity", - "lost_reasons" + "lost_reasons", + "competitors" ], "fields": [ { @@ -946,6 +947,14 @@ "label": "Bundle Items", "options": "fa fa-suitcase", "print_hide": 1 + }, + { + "allow_on_submit": 1, + "fieldname": "competitors", + "fieldtype": "Table MultiSelect", + "label": "Competitors", + "options": "Competitor Detail", + "read_only": 1 } ], "icon": "fa fa-shopping-cart", @@ -953,10 +962,12 @@ "is_submittable": 1, "links": [], "max_attachments": 1, - "modified": "2021-08-27 20:10:07.864951", + "migration_hash": "75a86a19f062c2257bcbc8e6e31c7f1e", + "modified": "2021-10-21 12:58:55.514512", "modified_by": "Administrator", "module": "Selling", "name": "Quotation", + "naming_rule": "By \"Naming Series\" field", "owner": "Administrator", "permissions": [ { diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 31b62d6da5a..c4752aebb5a 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -68,7 +68,7 @@ class Quotation(SellingController): opp.set_status(status=status, update=True) @frappe.whitelist() - def declare_enquiry_lost(self, lost_reasons_list, detailed_reason=None): + def declare_enquiry_lost(self, lost_reasons_list, competitors, detailed_reason=None): if not self.has_sales_order(): get_lost_reasons = frappe.get_list('Quotation Lost Reason', fields = ["name"]) @@ -84,6 +84,9 @@ class Quotation(SellingController): else: frappe.throw(_("Invalid lost reason {0}, please create a new lost reason").format(frappe.bold(reason.get('lost_reason')))) + for competitor in competitors: + self.append('competitors', competitor) + self.update_opportunity('Lost') self.update_lead() self.save() diff --git a/erpnext/selling/sales_common.js b/erpnext/selling/sales_common.js index a86e60494e8..20504789aa7 100644 --- a/erpnext/selling/sales_common.js +++ b/erpnext/selling/sales_common.js @@ -473,6 +473,12 @@ frappe.ui.form.on(cur_frm.doctype, { "options": frm.doctype === 'Opportunity' ? 'Opportunity Lost Reason Detail': 'Quotation Lost Reason Detail', "reqd": 1 }, + { + "fieldtype": "Table MultiSelect", + "label": __("Competitors"), + "fieldname": "competitors", + "options": "Competitor Detail" + }, { "fieldtype": "Text", "label": __("Detailed Reason"), @@ -480,27 +486,25 @@ frappe.ui.form.on(cur_frm.doctype, { }, ], primary_action: function() { - var values = dialog.get_values(); - var reasons = values["lost_reason"]; - var detailed_reason = values["detailed_reason"]; + let values = dialog.get_values(); frm.call({ doc: frm.doc, method: 'declare_enquiry_lost', args: { - 'lost_reasons_list': reasons, - 'detailed_reason': detailed_reason + 'lost_reasons_list': values.lost_reason, + 'competitors': values.competitors, + 'detailed_reason': values.detailed_reason }, callback: function(r) { dialog.hide(); frm.reload_doc(); }, }); - refresh_field("lost_reason"); }, primary_action_label: __('Declare Lost') }); dialog.show(); } -}) +}) \ No newline at end of file From 4d4bfa2333f78b666fc3e6d8821a56d165bfb047 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 10 Nov 2021 00:00:38 +0530 Subject: [PATCH 181/200] fix: commision rate not fetch from sales person --- erpnext/accounts/party.py | 3 +- .../doctype/sales_team/sales_team.json | 321 +++++------------- 2 files changed, 89 insertions(+), 235 deletions(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 7ea6ccee5b4..85aa9f5080e 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -85,7 +85,8 @@ def _get_party_details(party=None, account=None, party_type="Customer", company= if party_type=="Customer": party_details["sales_team"] = [{ "sales_person": d.sales_person, - "allocated_percentage": d.allocated_percentage or None + "allocated_percentage": d.allocated_percentage or None, + "commission_rate": d.commission_rate } for d in party.get("sales_team")] # supplier tax withholding category diff --git a/erpnext/selling/doctype/sales_team/sales_team.json b/erpnext/selling/doctype/sales_team/sales_team.json index 876789135c8..cac5b763ffd 100644 --- a/erpnext/selling/doctype/sales_team/sales_team.json +++ b/erpnext/selling/doctype/sales_team/sales_team.json @@ -1,247 +1,100 @@ { - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "beta": 0, - "creation": "2013-04-19 13:30:51", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "Setup", - "editable_grid": 1, - "engine": "InnoDB", + "actions": [], + "creation": "2013-04-19 13:30:51", + "doctype": "DocType", + "document_type": "Setup", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "sales_person", + "contact_no", + "allocated_percentage", + "allocated_amount", + "commission_rate", + "incentives" + ], "fields": [ { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "sales_person", - "fieldtype": "Link", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Sales Person", - "length": 0, - "no_copy": 0, - "oldfieldname": "sales_person", - "oldfieldtype": "Link", - "options": "Sales Person", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": "200px", - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 1, - "set_only_once": 0, - "translatable": 0, - "unique": 0, + "allow_on_submit": 1, + "fieldname": "sales_person", + "fieldtype": "Link", + "in_list_view": 1, + "label": "Sales Person", + "oldfieldname": "sales_person", + "oldfieldtype": "Link", + "options": "Sales Person", + "print_width": "200px", + "reqd": 1, + "search_index": 1, "width": "200px" - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "contact_no", - "fieldtype": "Data", - "hidden": 1, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Contact No.", - "length": 0, - "no_copy": 0, - "oldfieldname": "contact_no", - "oldfieldtype": "Data", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": "100px", - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, + "allow_on_submit": 1, + "fieldname": "contact_no", + "fieldtype": "Data", + "hidden": 1, + "in_list_view": 1, + "label": "Contact No.", + "oldfieldname": "contact_no", + "oldfieldtype": "Data", + "print_width": "100px", "width": "100px" - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "allocated_percentage", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Contribution (%)", - "length": 0, - "no_copy": 0, - "oldfieldname": "allocated_percentage", - "oldfieldtype": "Currency", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": "100px", - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, + "allow_on_submit": 1, + "fieldname": "allocated_percentage", + "fieldtype": "Float", + "in_list_view": 1, + "label": "Contribution (%)", + "oldfieldname": "allocated_percentage", + "oldfieldtype": "Currency", + "print_width": "100px", "width": "100px" - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "allocated_amount", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Contribution to Net Total", - "length": 0, - "no_copy": 0, - "oldfieldname": "allocated_amount", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "print_width": "120px", - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0, + "allow_on_submit": 1, + "fieldname": "allocated_amount", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Contribution to Net Total", + "oldfieldname": "allocated_amount", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency", + "print_width": "120px", + "read_only": 1, "width": "120px" - }, + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "commission_rate", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Commission Rate", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 1, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 - }, + "fetch_from": "sales_person.commission_rate", + "fetch_if_empty": 1, + "fieldname": "commission_rate", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Commission Rate", + "read_only": 1 + }, { - "allow_bulk_edit": 0, - "allow_in_quick_entry": 0, - "allow_on_submit": 1, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "incentives", - "fieldtype": "Currency", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Incentives", - "length": 0, - "no_copy": 0, - "oldfieldname": "incentives", - "oldfieldtype": "Currency", - "options": "Company:company:default_currency", - "permlevel": 0, - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "translatable": 0, - "unique": 0 + "allow_on_submit": 1, + "fieldname": "incentives", + "fieldtype": "Currency", + "in_list_view": 1, + "label": "Incentives", + "oldfieldname": "incentives", + "oldfieldtype": "Currency", + "options": "Company:company:default_currency" } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 1, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 1, - "max_attachments": 0, - "modified": "2018-09-17 13:03:14.755974", - "modified_by": "Administrator", - "module": "Selling", - "name": "Sales Team", - "owner": "Administrator", - "permissions": [], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "track_changes": 1, - "track_seen": 0, - "track_views": 0 -} + ], + "idx": 1, + "istable": 1, + "links": [], + "modified": "2021-11-09 23:55:20.670475", + "modified_by": "Administrator", + "module": "Selling", + "name": "Sales Team", + "owner": "Administrator", + "permissions": [], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file From e498389b00a2edadff47454e2cc55465d5d1bd52 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 10 Nov 2021 12:02:07 +0530 Subject: [PATCH 182/200] fix: ignore cancelled entries in incorrect balance qty report --- .../incorrect_balance_qty_after_transaction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.py b/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.py index a381820ca2a..6aa12ac2c99 100644 --- a/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.py +++ b/erpnext/stock/report/incorrect_balance_qty_after_transaction/incorrect_balance_qty_after_transaction.py @@ -46,7 +46,7 @@ def get_incorrect_data(data): return row def get_stock_ledger_entries(report_filters): - filters = {} + filters = {"is_cancelled": 0} fields = ['name', 'voucher_type', 'voucher_no', 'item_code', 'actual_qty', 'posting_date', 'posting_time', 'company', 'warehouse', 'qty_after_transaction', 'batch_no'] From 2f004693c36f3dc34c2ef96889fb17e28f2bd385 Mon Sep 17 00:00:00 2001 From: Anuja Pawar <60467153+Anuja-pawar@users.noreply.github.com> Date: Wed, 10 Nov 2021 12:36:54 +0530 Subject: [PATCH 183/200] fix(Bank Reconciliation): get credit amount for bank account of type liability --- .../bank_reconciliation_tool.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py index 002e312a39f..5cbf00b2c69 100644 --- a/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py +++ b/erpnext/accounts/doctype/bank_reconciliation_tool/bank_reconciliation_tool.py @@ -342,7 +342,15 @@ def get_pe_matching_query(amount_condition, account_from_to, transaction): def get_je_matching_query(amount_condition, transaction): # get matching journal entry query - cr_or_dr = "credit" if transaction.withdrawal > 0 else "debit" + + company_account = frappe.get_value("Bank Account", transaction.bank_account, "account") + root_type = frappe.get_value("Account", company_account, "root_type") + + if root_type == "Liability": + cr_or_dr = "debit" if transaction.withdrawal > 0 else "credit" + else: + cr_or_dr = "credit" if transaction.withdrawal > 0 else "debit" + return f""" SELECT From 12e81df2b79a0c7fb7cedb3e467837b60540be04 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 10 Nov 2021 12:36:00 +0530 Subject: [PATCH 184/200] fix: default value for allow neg stock in repost_item_valuation Negative stock can be toggled back after queuing transactions, this causes failure when repost is executed. Now allow_negative_stock stock is set at time of queuing the repost job. This means setting changes done afterwards won't affect already submitted reposts. --- .../doctype/repost_item_valuation/repost_item_valuation.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py index 86b4b860f85..170aa7f76c1 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py @@ -31,6 +31,9 @@ class RepostItemValuation(Document): self.voucher_type = None self.voucher_no = None + self.allow_negative_stock = self.allow_negative_stock or \ + cint(frappe.db.get_single_value("Stock Settings", "allow_negative_stock")) + def set_company(self): if self.voucher_type and self.voucher_no: self.company = frappe.get_cached_value(self.voucher_type, self.voucher_no, "company") From 6d05bb527432c7fb70794634c7c51692b25bdbfe Mon Sep 17 00:00:00 2001 From: Saqib Date: Wed, 10 Nov 2021 13:06:55 +0530 Subject: [PATCH 185/200] fix(pos): get mode of payments query (#28321) --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index cd270f505e0..59d46fc2e87 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -2029,7 +2029,7 @@ def get_mode_of_payments_info(mode_of_payments, company): mpa.parent = mp.name and mpa.company = %s and mp.enabled = 1 and - mp.name in (%s) + mp.name in %s group by mp.name """, (company, mode_of_payments), as_dict=1) From b728597ef41dc27ddca4531f22109834bb4268ab Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 10 Nov 2021 17:59:07 +0530 Subject: [PATCH 186/200] fix: use hotfix branches for patch tests --- .github/workflows/patch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index f8abb6c7741..97bccf5d56a 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -93,7 +93,7 @@ jobs: for version in $(seq 12 13) do echo "Updating to v$version" - branch_name="version-$version" + branch_name="version-$version-hotfix" git -C "apps/frappe" fetch --depth 1 upstream $branch_name:$branch_name git -C "apps/erpnext" fetch --depth 1 upstream $branch_name:$branch_name From c96b5492dbe860e40f82497a6972cc1cb29071a5 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Wed, 10 Nov 2021 19:04:37 +0530 Subject: [PATCH 187/200] fix: reload doctype forcefully --- erpnext/patches/v13_0/create_pan_field_for_india.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/patches/v13_0/create_pan_field_for_india.py b/erpnext/patches/v13_0/create_pan_field_for_india.py index c37651aaa3b..6df6e1eb329 100644 --- a/erpnext/patches/v13_0/create_pan_field_for_india.py +++ b/erpnext/patches/v13_0/create_pan_field_for_india.py @@ -5,6 +5,7 @@ from frappe.custom.doctype.custom_field.custom_field import create_custom_fields def execute(): frappe.reload_doc('buying', 'doctype', 'supplier', force=True) frappe.reload_doc('selling', 'doctype', 'customer', force=True) + frappe.reload_doc('core', 'doctype', 'doctype', force=True) custom_fields = { 'Supplier': [ From 0dca97eb9f56a9a45b736c42cbf48b4a3a7ee834 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 10 Nov 2021 20:54:12 +0530 Subject: [PATCH 188/200] fix(India): Sales Invoice with duplicate items not showing correct taxable value --- erpnext/regional/report/gstr_1/gstr_1.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py index 27cfaf76146..11b684d3f6a 100644 --- a/erpnext/regional/report/gstr_1/gstr_1.py +++ b/erpnext/regional/report/gstr_1/gstr_1.py @@ -248,18 +248,17 @@ class Gstr1Report(object): """ % (self.doctype, ', '.join(['%s']*len(self.invoices))), tuple(self.invoices), as_dict=1) for d in items: - if d.item_code not in self.invoice_items.get(d.parent, {}): - self.invoice_items.setdefault(d.parent, {}).setdefault(d.item_code, 0.0) - self.invoice_items[d.parent][d.item_code] += d.get('taxable_value', 0) or d.get('base_net_amount', 0) + self.invoice_items.setdefault(d.parent, {}).setdefault(d.item_code, 0.0) + self.invoice_items[d.parent][d.item_code] += d.get('taxable_value', 0) or d.get('base_net_amount', 0) - item_tax_rate = {} + item_tax_rate = {} - if d.item_tax_rate: - item_tax_rate = json.loads(d.item_tax_rate) + if d.item_tax_rate: + item_tax_rate = json.loads(d.item_tax_rate) - for account, rate in item_tax_rate.items(): - tax_rate_dict = self.item_tax_rate.setdefault(d.parent, {}).setdefault(d.item_code, []) - tax_rate_dict.append(rate) + for account, rate in item_tax_rate.items(): + tax_rate_dict = self.item_tax_rate.setdefault(d.parent, {}).setdefault(d.item_code, []) + tax_rate_dict.append(rate) def get_items_based_on_tax_rate(self): self.tax_details = frappe.db.sql(""" From ecbe4b16b8dedacb6a4d5bbdf43fa20570095009 Mon Sep 17 00:00:00 2001 From: Saqib Date: Thu, 11 Nov 2021 13:55:21 +0530 Subject: [PATCH 189/200] perf(minor): general ledger report (#27987) --- .../report/general_ledger/general_ledger.py | 65 ++++++++++++------- 1 file changed, 43 insertions(+), 22 deletions(-) diff --git a/erpnext/accounts/report/general_ledger/general_ledger.py b/erpnext/accounts/report/general_ledger/general_ledger.py index 050403d21ea..385c8b2b6ed 100644 --- a/erpnext/accounts/report/general_ledger/general_ledger.py +++ b/erpnext/accounts/report/general_ledger/general_ledger.py @@ -6,7 +6,7 @@ from collections import OrderedDict import frappe from frappe import _, _dict -from frappe.utils import cstr, flt, getdate +from frappe.utils import cstr, getdate from erpnext import get_company_currency, get_default_company from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import ( @@ -17,6 +17,8 @@ from erpnext.accounts.report.financial_statements import get_cost_centers_with_c from erpnext.accounts.report.utils import convert_to_presentation_currency, get_currency from erpnext.accounts.utils import get_account_currency +# to cache translations +TRANSLATIONS = frappe._dict() def execute(filters=None): if not filters: @@ -42,10 +44,20 @@ def execute(filters=None): columns = get_columns(filters) + update_translations() + res = get_result(filters, account_details) return columns, res +def update_translations(): + TRANSLATIONS.update( + dict( + OPENING = _('Opening'), + TOTAL = _('Total'), + CLOSING_TOTAL = _('Closing (Opening + Total)') + ) + ) def validate_filters(filters, account_details): if not filters.get("company"): @@ -351,9 +363,9 @@ def get_totals_dict(): credit_in_account_currency=0.0 ) return _dict( - opening = _get_debit_credit_dict(_('Opening')), - total = _get_debit_credit_dict(_('Total')), - closing = _get_debit_credit_dict(_('Closing (Opening + Total)')) + opening = _get_debit_credit_dict(TRANSLATIONS.OPENING), + total = _get_debit_credit_dict(TRANSLATIONS.TOTAL), + closing = _get_debit_credit_dict(TRANSLATIONS.CLOSING_TOTAL) ) def group_by_field(group_by): @@ -378,22 +390,23 @@ def get_accountwise_gle(filters, accounting_dimensions, gl_entries, gle_map): entries = [] consolidated_gle = OrderedDict() group_by = group_by_field(filters.get('group_by')) + group_by_voucher_consolidated = filters.get("group_by") == 'Group by Voucher (Consolidated)' if filters.get('show_net_values_in_party_account'): account_type_map = get_account_type_map(filters.get('company')) def update_value_in_dict(data, key, gle): - data[key].debit += flt(gle.debit) - data[key].credit += flt(gle.credit) + data[key].debit += gle.debit + data[key].credit += gle.credit - data[key].debit_in_account_currency += flt(gle.debit_in_account_currency) - data[key].credit_in_account_currency += flt(gle.credit_in_account_currency) + data[key].debit_in_account_currency += gle.debit_in_account_currency + data[key].credit_in_account_currency += gle.credit_in_account_currency if filters.get('show_net_values_in_party_account') and \ account_type_map.get(data[key].account) in ('Receivable', 'Payable'): - net_value = flt(data[key].debit) - flt(data[key].credit) - net_value_in_account_currency = flt(data[key].debit_in_account_currency) \ - - flt(data[key].credit_in_account_currency) + net_value = data[key].debit - data[key].credit + net_value_in_account_currency = data[key].debit_in_account_currency \ + - data[key].credit_in_account_currency if net_value < 0: dr_or_cr = 'credit' @@ -411,19 +424,29 @@ def get_accountwise_gle(filters, accounting_dimensions, gl_entries, gle_map): data[key].against_voucher += ', ' + gle.against_voucher from_date, to_date = getdate(filters.from_date), getdate(filters.to_date) - for gle in gl_entries: - if (gle.posting_date < from_date or - (cstr(gle.is_opening) == "Yes" and not filters.get("show_opening_entries"))): - update_value_in_dict(gle_map[gle.get(group_by)].totals, 'opening', gle) - update_value_in_dict(totals, 'opening', gle) + show_opening_entries = filters.get("show_opening_entries") - update_value_in_dict(gle_map[gle.get(group_by)].totals, 'closing', gle) + for gle in gl_entries: + group_by_value = gle.get(group_by) + + if (gle.posting_date < from_date or (cstr(gle.is_opening) == "Yes" and not show_opening_entries)): + if not group_by_voucher_consolidated: + update_value_in_dict(gle_map[group_by_value].totals, 'opening', gle) + update_value_in_dict(gle_map[group_by_value].totals, 'closing', gle) + + update_value_in_dict(totals, 'opening', gle) update_value_in_dict(totals, 'closing', gle) elif gle.posting_date <= to_date: - if filters.get("group_by") != 'Group by Voucher (Consolidated)': - gle_map[gle.get(group_by)].entries.append(gle) - elif filters.get("group_by") == 'Group by Voucher (Consolidated)': + if not group_by_voucher_consolidated: + update_value_in_dict(gle_map[group_by_value].totals, 'total', gle) + update_value_in_dict(gle_map[group_by_value].totals, 'closing', gle) + update_value_in_dict(totals, 'total', gle) + update_value_in_dict(totals, 'closing', gle) + + gle_map[group_by_value].entries.append(gle) + + elif group_by_voucher_consolidated: keylist = [gle.get("voucher_type"), gle.get("voucher_no"), gle.get("account")] for dim in accounting_dimensions: keylist.append(gle.get(dim)) @@ -435,9 +458,7 @@ def get_accountwise_gle(filters, accounting_dimensions, gl_entries, gle_map): update_value_in_dict(consolidated_gle, key, gle) for key, value in consolidated_gle.items(): - update_value_in_dict(gle_map[value.get(group_by)].totals, 'total', value) update_value_in_dict(totals, 'total', value) - update_value_in_dict(gle_map[value.get(group_by)].totals, 'closing', value) update_value_in_dict(totals, 'closing', value) entries.append(value) From 944bf8da71284a4fd72afa4410e421ded63992fa Mon Sep 17 00:00:00 2001 From: Sagar Sharma <63660334+s-aga-r@users.noreply.github.com> Date: Thu, 11 Nov 2021 19:49:41 +0530 Subject: [PATCH 190/200] fix: Unable to edit supplier scorecard criteria name once created (#28348) --- .../supplier_scorecard_criteria.json | 228 +++++------------- 1 file changed, 57 insertions(+), 171 deletions(-) diff --git a/erpnext/buying/doctype/supplier_scorecard_criteria/supplier_scorecard_criteria.json b/erpnext/buying/doctype/supplier_scorecard_criteria/supplier_scorecard_criteria.json index 2623585aeae..3668b2505f6 100644 --- a/erpnext/buying/doctype/supplier_scorecard_criteria/supplier_scorecard_criteria.json +++ b/erpnext/buying/doctype/supplier_scorecard_criteria/supplier_scorecard_criteria.json @@ -1,184 +1,70 @@ { - "allow_copy": 0, - "allow_guest_to_view": 0, - "allow_import": 0, - "allow_rename": 0, - "autoname": "field:criteria_name", - "beta": 0, - "creation": "2017-05-29 01:32:43.064891", - "custom": 0, - "docstatus": 0, - "doctype": "DocType", - "document_type": "", - "editable_grid": 1, - "engine": "InnoDB", + "actions": [], + "allow_rename": 1, + "autoname": "field:criteria_name", + "creation": "2017-05-29 01:32:43.064891", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "criteria_name", + "max_score", + "formula", + "weight" + ], "fields": [ { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "criteria_name", - "fieldtype": "Data", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Criteria Name", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, + "fieldname": "criteria_name", + "fieldtype": "Data", + "label": "Criteria Name", + "reqd": 1, "unique": 1 - }, + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "default": "100", - "fieldname": "max_score", - "fieldtype": "Float", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Max Score", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "default": "100", + "fieldname": "max_score", + "fieldtype": "Float", + "in_list_view": 1, + "label": "Max Score", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "formula", - "fieldtype": "Small Text", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 1, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 1, - "in_standard_filter": 0, - "label": "Criteria Formula", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 1, - "search_index": 0, - "set_only_once": 0, - "unique": 0 - }, + "fieldname": "formula", + "fieldtype": "Small Text", + "ignore_xss_filter": 1, + "in_list_view": 1, + "label": "Criteria Formula", + "reqd": 1 + }, { - "allow_bulk_edit": 0, - "allow_on_submit": 0, - "bold": 0, - "collapsible": 0, - "columns": 0, - "fieldname": "weight", - "fieldtype": "Percent", - "hidden": 0, - "ignore_user_permissions": 0, - "ignore_xss_filter": 0, - "in_filter": 0, - "in_global_search": 0, - "in_list_view": 0, - "in_standard_filter": 0, - "label": "Criteria Weight", - "length": 0, - "no_copy": 0, - "permlevel": 0, - "precision": "", - "print_hide": 0, - "print_hide_if_no_value": 0, - "read_only": 0, - "remember_last_selected_value": 0, - "report_hide": 0, - "reqd": 0, - "search_index": 0, - "set_only_once": 0, - "unique": 0 + "fieldname": "weight", + "fieldtype": "Percent", + "label": "Criteria Weight" } - ], - "has_web_view": 0, - "hide_heading": 0, - "hide_toolbar": 0, - "idx": 0, - "image_view": 0, - "in_create": 0, - "is_submittable": 0, - "issingle": 0, - "istable": 0, - "max_attachments": 0, - "modified": "2019-01-22 10:47:00.000822", - "modified_by": "Administrator", - "module": "Buying", - "name": "Supplier Scorecard Criteria", - "name_case": "", - "owner": "Administrator", + ], + "links": [], + "modified": "2021-11-11 18:34:58.477648", + "modified_by": "Administrator", + "module": "Buying", + "name": "Supplier Scorecard Criteria", + "naming_rule": "By fieldname", + "owner": "Administrator", "permissions": [ { - "amend": 0, - "apply_user_permissions": 0, - "cancel": 0, - "create": 1, - "delete": 1, - "email": 1, - "export": 1, - "if_owner": 0, - "import": 0, - "permlevel": 0, - "print": 1, - "read": 1, - "report": 1, - "role": "System Manager", - "set_user_permissions": 0, - "share": 1, - "submit": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, "write": 1 } - ], - "quick_entry": 1, - "read_only": 0, - "read_only_onload": 0, - "show_name_in_global_search": 0, - "sort_field": "modified", - "sort_order": "DESC", - "track_changes": 1, - "track_seen": 0 + ], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 } \ No newline at end of file From 88648570d78ebba2894357af6873adb4fc55f728 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 12 Nov 2021 12:39:30 +0530 Subject: [PATCH 191/200] fix: Default party account getting overriden in invoices --- .../doctype/purchase_invoice/purchase_invoice.js | 13 +++++++++++-- .../accounts/doctype/sales_invoice/sales_invoice.js | 13 +++++++++++-- erpnext/accounts/party.py | 9 ++++++--- erpnext/controllers/accounts_controller.py | 4 ++-- 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 3526e488e11..1a398aba2ec 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -592,8 +592,17 @@ frappe.ui.form.on("Purchase Invoice", { erpnext.accounts.dimensions.update_dimension(frm, frm.doctype); if (frm.doc.company) { - frappe.db.get_value('Company', frm.doc.company, 'default_payable_account', (r) => { - frm.set_value('credit_to', r.default_payable_account); + frappe.call({ + method: + "erpnext.accounts.party.get_party_account", + args: { + party_type: 'Supplier', + party: frm.doc.supplier, + company: frm.doc.company + }, + callback: (response) => { + if (response) frm.set_value("credit_to", response.message); + }, }); } }, diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js index bee153b7b8f..a1f3ee4b063 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js @@ -15,8 +15,17 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e let me = this; if (this.frm.doc.company) { - frappe.db.get_value('Company', this.frm.doc.company, 'default_receivable_account', (r) => { - me.frm.set_value('debit_to', r.default_receivable_account); + frappe.call({ + method: + "erpnext.accounts.party.get_party_account", + args: { + party_type: 'Customer', + party: this.frm.doc.customer, + company: this.frm.doc.company + }, + callback: (response) => { + if (response) me.frm.set_value("debit_to", response.message); + }, }); } } diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 2108bc158df..1c9d19d8dc1 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -218,7 +218,7 @@ def set_account_and_due_date(party, account, party_type, company, posting_date, return out @frappe.whitelist() -def get_party_account(party_type, party, company=None): +def get_party_account(party_type, party=None, company=None): """Returns the account for the given `party`. Will first search in party (Customer / Supplier) record, if not found, will search in group (Customer Group / Supplier Group), @@ -226,8 +226,11 @@ def get_party_account(party_type, party, company=None): if not company: frappe.throw(_("Please select a Company")) - if not party: - return + if not party and party_type in ['Customer', 'Supplier']: + default_account_name = "default_receivable_account" \ + if party_type=="Customer" else "default_payable_account" + + return frappe.get_cached_value('Company', company, default_account_name) account = frappe.db.get_value("Party Account", {"parenttype": party_type, "parent": party, "company": company}, "account") diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index e0551a4ca87..3190feac705 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -1402,8 +1402,8 @@ class AccountsController(TransactionBase): grand_total -= self.get("total_advance") base_grand_total = flt(grand_total * self.get("conversion_rate"), self.precision("base_grand_total")) - if flt(total, self.precision("grand_total")) != flt(grand_total, self.precision("grand_total")) or \ - flt(base_total, self.precision("base_grand_total")) != flt(base_grand_total, self.precision("base_grand_total")): + if flt(total, self.precision("grand_total")) - flt(grand_total, self.precision("grand_total")) > 0.1 or \ + flt(base_total, self.precision("base_grand_total")) - flt(base_grand_total, self.precision("base_grand_total")) > 0.1: frappe.throw(_("Total Payment Amount in Payment Schedule must be equal to Grand / Rounded Total")) def is_rounded_total_disabled(self): From a424310581fc7c4306fafd3038e7deaa2c584706 Mon Sep 17 00:00:00 2001 From: Sagar Sharma <63660334+s-aga-r@users.noreply.github.com> Date: Fri, 12 Nov 2021 13:50:30 +0530 Subject: [PATCH 192/200] fix: Collapse Scrap Items in Job Card (#28362) --- erpnext/manufacturing/doctype/job_card/job_card.js | 6 ++++++ erpnext/manufacturing/doctype/job_card/job_card.json | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.js b/erpnext/manufacturing/doctype/job_card/job_card.js index e3eed92d7e1..f9259fbdf4f 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.js +++ b/erpnext/manufacturing/doctype/job_card/job_card.js @@ -23,6 +23,12 @@ frappe.ui.form.on('Job Card', { ); }, + onload: function(frm) { + if (frm.doc.scrap_items.length == 0) { + frm.fields_dict['scrap_items_section'].collapse(); + } + }, + refresh: function(frm) { frappe.flags.pause_job = 0; frappe.flags.resume_job = 0; diff --git a/erpnext/manufacturing/doctype/job_card/job_card.json b/erpnext/manufacturing/doctype/job_card/job_card.json index 7dd38f4673d..6528199d82a 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.json +++ b/erpnext/manufacturing/doctype/job_card/job_card.json @@ -396,6 +396,7 @@ "options": "Batch" }, { + "collapsible": 1, "fieldname": "scrap_items_section", "fieldtype": "Section Break", "label": "Scrap Items" @@ -411,7 +412,7 @@ ], "is_submittable": 1, "links": [], - "modified": "2021-09-14 00:38:46.873105", + "modified": "2021-11-12 10:15:03.572401", "modified_by": "Administrator", "module": "Manufacturing", "name": "Job Card", From 24b048925bb758cad3cb0fa59a571165320132f8 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Fri, 12 Nov 2021 14:08:02 +0530 Subject: [PATCH 193/200] fix(WooCommerce): always expect signature in webhook requests (#28367) --- .../erpnext_integrations/connectors/woocommerce_connection.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/erpnext/erpnext_integrations/connectors/woocommerce_connection.py b/erpnext/erpnext_integrations/connectors/woocommerce_connection.py index f5f9ce3b16a..9409485a9f6 100644 --- a/erpnext/erpnext_integrations/connectors/woocommerce_connection.py +++ b/erpnext/erpnext_integrations/connectors/woocommerce_connection.py @@ -19,8 +19,7 @@ def verify_request(): ) if frappe.request.data and \ - frappe.get_request_header("X-Wc-Webhook-Signature") and \ - not sig == bytes(frappe.get_request_header("X-Wc-Webhook-Signature").encode()): + not sig == frappe.get_request_header("X-Wc-Webhook-Signature", "").encode(): frappe.throw(_("Unverified Webhook Data")) frappe.set_user(woocommerce_settings.creation_user) From 6d3e9bce5f6bcecd6f4eec555cbdffd8f1df62e3 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Fri, 12 Nov 2021 14:24:33 +0530 Subject: [PATCH 194/200] fix(M-Pesa): validate type before executing `get_doc` (#28369) --- .../doctype/mpesa_settings/mpesa_settings.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py index d2b6190a299..e7b4a30e0a5 100644 --- a/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py +++ b/erpnext/erpnext_integrations/doctype/mpesa_settings/mpesa_settings.py @@ -141,6 +141,9 @@ def verify_transaction(**kwargs): transaction_response = frappe._dict(kwargs["Body"]["stkCallback"]) checkout_id = getattr(transaction_response, "CheckoutRequestID", "") + if not isinstance(checkout_id, str): + frappe.throw(_("Invalid Checkout Request ID")) + integration_request = frappe.get_doc("Integration Request", checkout_id) transaction_data = frappe._dict(loads(integration_request.data)) total_paid = 0 # for multiple integration request made against a pos invoice @@ -231,6 +234,9 @@ def process_balance_info(**kwargs): account_balance_response = frappe._dict(kwargs["Result"]) conversation_id = getattr(account_balance_response, "ConversationID", "") + if not isinstance(conversation_id, str): + frappe.throw(_("Invalid Conversation ID")) + request = frappe.get_doc("Integration Request", conversation_id) if request.status == "Completed": From c0f06bc8e382a0543a476f119989f7422a21add0 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 12 Nov 2021 14:45:51 +0530 Subject: [PATCH 195/200] fix: validate hmac unconditionally (#28372) --- erpnext/erpnext_integrations/utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/erpnext_integrations/utils.py b/erpnext/erpnext_integrations/utils.py index b52c3fc2a87..d922d875fdd 100644 --- a/erpnext/erpnext_integrations/utils.py +++ b/erpnext/erpnext_integrations/utils.py @@ -23,7 +23,6 @@ def validate_webhooks_request(doctype, hmac_key, secret_key='secret'): ) if frappe.request.data and \ - frappe.get_request_header(hmac_key) and \ not sig == bytes(frappe.get_request_header(hmac_key).encode()): frappe.throw(_("Unverified Webhook Data")) frappe.set_user(settings.modified_by) From 03370c63c59226afbea3e8f2e41f69c7747fe219 Mon Sep 17 00:00:00 2001 From: Conor Date: Sat, 13 Nov 2021 22:16:31 -0600 Subject: [PATCH 196/200] chore: minor typo correction in CONTRIBUTING (#28386) --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 511b682f371..1cf9a5bd9b5 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -23,7 +23,7 @@ If your issue is not clear or does not meet the guidelines, then it will be clos 1. **Steps to Reproduce:** The bug report must have a list of steps needed to reproduce a bug. If we cannot reproduce it, then we cannot solve it. 1. **Version Number:** Please add the version number in your report. Often a bug is fixed in the latest version 1. **Clear Title:** Add a clear subject to your bug report like "Unable to submit Purchase Order without Basic Rate" instead of just "Cannot Submit" -1. **Screenshots:** Screenshots are a great way of communicating the issues. Try adding annotations or using LiceCAP to take a screencast in `gif`. +1. **Screenshots:** Screenshots are a great way of communicating issues. Try adding annotations or using LiceCAP to take a screencast in `gif`. ### Feature Request Guidelines From 2eccb7a1ca626b05bca9d3f7a8621a9162cbd599 Mon Sep 17 00:00:00 2001 From: Sagar Sharma <63660334+s-aga-r@users.noreply.github.com> Date: Mon, 15 Nov 2021 02:38:15 -0800 Subject: [PATCH 197/200] fix: Work order creation from sales order (#28388) * fix: Work order creation from sales order * chore: formatting Co-authored-by: Ankush Menat --- erpnext/selling/doctype/sales_order/sales_order.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js index d46c46f90e6..79e9e17e414 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.js +++ b/erpnext/selling/doctype/sales_order/sales_order.js @@ -319,7 +319,7 @@ erpnext.selling.SalesOrderController = class SalesOrderController extends erpnex title: __('Select Items to Manufacture'), fields: fields, primary_action: function() { - var data = d.get_values(); + var data = {items: d.fields_dict.items.grid.get_selected_children()}; me.frm.call({ method: 'make_work_orders', args: { From 7fcaeca403c229f0101a8f89ca4cd64f6d5bcdc0 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 15 Nov 2021 17:11:33 +0530 Subject: [PATCH 198/200] fix: don't make naming series mandatory for items Item variants are an exception, hence this needs to be checked conditionally. --- erpnext/setup/doctype/naming_series/naming_series.py | 4 ++-- erpnext/stock/doctype/stock_settings/stock_settings.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/setup/doctype/naming_series/naming_series.py b/erpnext/setup/doctype/naming_series/naming_series.py index 4def6eb9e8a..986b4e87ff0 100644 --- a/erpnext/setup/doctype/naming_series/naming_series.py +++ b/erpnext/setup/doctype/naming_series/naming_series.py @@ -180,11 +180,11 @@ class NamingSeries(Document): prefix = parse_naming_series(parts) return prefix -def set_by_naming_series(doctype, fieldname, naming_series, hide_name_field=True): +def set_by_naming_series(doctype, fieldname, naming_series, hide_name_field=True, make_mandatory=1): from frappe.custom.doctype.property_setter.property_setter import make_property_setter if naming_series: make_property_setter(doctype, "naming_series", "hidden", 0, "Check", validate_fields_for_doctype=False) - make_property_setter(doctype, "naming_series", "reqd", 1, "Check", validate_fields_for_doctype=False) + make_property_setter(doctype, "naming_series", "reqd", make_mandatory, "Check", validate_fields_for_doctype=False) # set values for mandatory try: diff --git a/erpnext/stock/doctype/stock_settings/stock_settings.py b/erpnext/stock/doctype/stock_settings/stock_settings.py index 2dd103d607f..1de48b6f1f1 100644 --- a/erpnext/stock/doctype/stock_settings/stock_settings.py +++ b/erpnext/stock/doctype/stock_settings/stock_settings.py @@ -20,7 +20,7 @@ class StockSettings(Document): from erpnext.setup.doctype.naming_series.naming_series import set_by_naming_series set_by_naming_series("Item", "item_code", - self.get("item_naming_by")=="Naming Series", hide_name_field=True) + self.get("item_naming_by")=="Naming Series", hide_name_field=True, make_mandatory=0) stock_frozen_limit = 356 submitted_stock_frozen = self.stock_frozen_upto_days or 0 From 54184e54ed352a6264957e3efe659868a4523a11 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 15 Nov 2021 17:54:53 +0530 Subject: [PATCH 199/200] fix: patch for naming series property setter --- erpnext/patches.txt | 1 + .../patches/v13_0/item_naming_series_not_mandatory.py | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 erpnext/patches/v13_0/item_naming_series_not_mandatory.py diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 778cbdf65bd..e475229125f 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -306,6 +306,7 @@ erpnext.patches.v13_0.requeue_failed_reposts erpnext.patches.v13_0.update_job_card_status erpnext.patches.v12_0.update_production_plan_status erpnext.patches.v13_0.healthcare_deprecation_warning +erpnext.patches.v13_0.item_naming_series_not_mandatory erpnext.patches.v14_0.delete_healthcare_doctypes erpnext.patches.v13_0.update_category_in_ltds_certificate erpnext.patches.v13_0.create_pan_field_for_india #2 diff --git a/erpnext/patches/v13_0/item_naming_series_not_mandatory.py b/erpnext/patches/v13_0/item_naming_series_not_mandatory.py new file mode 100644 index 00000000000..5fe85a48308 --- /dev/null +++ b/erpnext/patches/v13_0/item_naming_series_not_mandatory.py @@ -0,0 +1,11 @@ +import frappe + +from erpnext.setup.doctype.naming_series.naming_series import set_by_naming_series + + +def execute(): + + stock_settings = frappe.get_doc("Stock Settings") + + set_by_naming_series("Item", "item_code", + stock_settings.get("item_naming_by")=="Naming Series", hide_name_field=True, make_mandatory=0) From 043e3255d66d3919fb7317218760fa181be87c5f Mon Sep 17 00:00:00 2001 From: Rohan Date: Mon, 15 Nov 2021 19:41:17 +0530 Subject: [PATCH 200/200] fix: remove item-item group name validation (#28392) --- erpnext/setup/doctype/item_group/item_group.py | 5 ----- erpnext/stock/doctype/item/item.py | 7 ------- 2 files changed, 12 deletions(-) diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py index 4c42b61f01e..c94b3463fc8 100644 --- a/erpnext/setup/doctype/item_group/item_group.py +++ b/erpnext/setup/doctype/item_group/item_group.py @@ -43,7 +43,6 @@ class ItemGroup(NestedSet, WebsiteGenerator): def on_update(self): NestedSet.on_update(self) invalidate_cache_for(self) - self.validate_name_with_item() self.validate_one_root() self.delete_child_item_groups_key() @@ -67,10 +66,6 @@ class ItemGroup(NestedSet, WebsiteGenerator): WebsiteGenerator.on_trash(self) self.delete_child_item_groups_key() - def validate_name_with_item(self): - if frappe.db.exists("Item", self.name): - frappe.throw(frappe._("An item exists with same name ({0}), please change the item group name or rename the item").format(self.name), frappe.NameError) - def get_context(self, context): context.show_search=True context.page_length = cint(frappe.db.get_single_value('Products Settings', 'products_per_page')) or 6 diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index fa42c7d934b..5daabe817b2 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -152,7 +152,6 @@ class Item(WebsiteGenerator): def on_update(self): invalidate_cache_for_item(self) - self.validate_name_with_item_group() self.update_variants() self.update_item_price() self.update_template_item() @@ -628,12 +627,6 @@ class Item(WebsiteGenerator): where item_code = %s and is_cancelled = 0 limit 1""", self.name)) return self._stock_ledger_created - def validate_name_with_item_group(self): - # causes problem with tree build - if frappe.db.exists("Item Group", self.name): - frappe.throw( - _("An Item Group exists with same name, please change the item name or rename the item group")) - def update_item_price(self): frappe.db.sql(""" UPDATE `tabItem Price`