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 9b812a8b56..bcb163fc19 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,5 +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 diff --git a/erpnext/accounts/doctype/accounts_settings/test_accounts_settings.py b/erpnext/accounts/doctype/accounts_settings/test_accounts_settings.py index bf1e967bdb..014cf45e51 100644 --- a/erpnext/accounts/doctype/accounts_settings/test_accounts_settings.py +++ b/erpnext/accounts/doctype/accounts_settings/test_accounts_settings.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import unittest import frappe 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 6e7b687c04..43ebcb0cac 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,3 +1,5 @@ +from __future__ import unicode_literals + DEFAULT_MAPPERS = [ { 'doctype': 'Cash Flow Mapper', diff --git a/erpnext/accounts/doctype/monthly_distribution/test_monthly_distribution.py b/erpnext/accounts/doctype/monthly_distribution/test_monthly_distribution.py index 834d105d69..efbf4eb105 100644 --- a/erpnext/accounts/doctype/monthly_distribution/test_monthly_distribution.py +++ b/erpnext/accounts/doctype/monthly_distribution/test_monthly_distribution.py @@ -1,6 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt +from __future__ import unicode_literals import frappe import unittest diff --git a/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py b/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py index 80ac69fe8e..6b93f926cd 100644 --- a/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py +++ b/erpnext/accounts/doctype/payment_order/payment_order_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index d28dc936bb..9138739253 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -1,5 +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, erpnext diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py index f101b6aa7e..173939df00 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py index 287da08ef5..d6e60d1277 100755 --- a/erpnext/accounts/doctype/sales_invoice/pos.py +++ b/erpnext/accounts/doctype/sales_invoice/pos.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/sales_invoice/sales_invoice_dashboard.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py index 71fce77695..28da815655 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py index f911eaa5c1..43786a4446 100644 --- a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe import frappe.defaults import unittest 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 d81a8f3c9f..3869d685a1 100644 --- a/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.py +++ b/erpnext/accounts/report/tds_computation_summary/tds_computation_summary.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import flt diff --git a/erpnext/accounts/report/utils.py b/erpnext/accounts/report/utils.py index e33bd832af..a8ae94f879 100644 --- a/erpnext/accounts/report/utils.py +++ b/erpnext/accounts/report/utils.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from erpnext import get_company_currency, get_default_company from erpnext.setup.utils import get_exchange_rate diff --git a/erpnext/accounts/test/test_utils.py b/erpnext/accounts/test/test_utils.py index 0fca470fe5..628c8ce646 100644 --- a/erpnext/accounts/test/test_utils.py +++ b/erpnext/accounts/test/test_utils.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import unittest from erpnext.accounts.party import get_party_shipping_address from frappe.test_runner import make_test_objects diff --git a/erpnext/agriculture/doctype/crop/crop_dashboard.py b/erpnext/agriculture/doctype/crop/crop_dashboard.py index 715f92b6eb..9a8f26fe90 100644 --- a/erpnext/agriculture/doctype/crop/crop_dashboard.py +++ b/erpnext/agriculture/doctype/crop/crop_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/assets/doctype/asset/asset_dashboard.py b/erpnext/assets/doctype/asset/asset_dashboard.py index 89699f3edb..b48989923e 100644 --- a/erpnext/assets/doctype/asset/asset_dashboard.py +++ b/erpnext/assets/doctype/asset/asset_dashboard.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + def get_data(): return { 'fieldname': 'asset_name', diff --git a/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py b/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py index cce4b2747b..ab514dac30 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): 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 9582523001..6efbc78225 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,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/buying/doctype/supplier/supplier_dashboard.py b/erpnext/buying/doctype/supplier/supplier_dashboard.py index f971776948..aea1e2d38c 100644 --- a/erpnext/buying/doctype/supplier/supplier_dashboard.py +++ b/erpnext/buying/doctype/supplier/supplier_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py b/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py index 0387437b32..6b40305e01 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py index ff7f119253..3d2305e285 100644 --- a/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py +++ b/erpnext/buying/doctype/supplier_scorecard/supplier_scorecard_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/config/crm.py b/erpnext/config/crm.py index dd67005ecf..5ac46bd7b8 100644 --- a/erpnext/config/crm.py +++ b/erpnext/config/crm.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/config/maintenance.py b/erpnext/config/maintenance.py index 7a44f55667..97be47cdd1 100644 --- a/erpnext/config/maintenance.py +++ b/erpnext/config/maintenance.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/config/website.py b/erpnext/config/website.py index 237c49c9af..59e7d404d4 100644 --- a/erpnext/config/website.py +++ b/erpnext/config/website.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/crm/doctype/lead/lead_dashboard.py b/erpnext/crm/doctype/lead/lead_dashboard.py index b87fc0ea4a..e8472aafc2 100644 --- a/erpnext/crm/doctype/lead/lead_dashboard.py +++ b/erpnext/crm/doctype/lead/lead_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/crm/doctype/opportunity/opportunity_dashboard.py b/erpnext/crm/doctype/opportunity/opportunity_dashboard.py index bd4a6a265f..9ed616afd2 100644 --- a/erpnext/crm/doctype/opportunity/opportunity_dashboard.py +++ b/erpnext/crm/doctype/opportunity/opportunity_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/demo/setup/education.py b/erpnext/demo/setup/education.py index 0403c06411..cf9451d5da 100644 --- a/erpnext/demo/setup/education.py +++ b/erpnext/demo/setup/education.py @@ -1,5 +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, json from frappe.utils.make_random import get_random @@ -162,7 +163,7 @@ def make_assessment_groups(): def get_json_path(doctype): return frappe.get_app_path('erpnext', 'demo', 'data', frappe.scrub(doctype) + '.json') - + def weighted_choice(weights): totals = [] running_total = 0 diff --git a/erpnext/demo/setup/healthcare.py b/erpnext/demo/setup/healthcare.py index 3ddb2ae19d..aa389e56b4 100644 --- a/erpnext/demo/setup/healthcare.py +++ b/erpnext/demo/setup/healthcare.py @@ -1,5 +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, json from frappe.utils.make_random import get_random diff --git a/erpnext/domains/agriculture.py b/erpnext/domains/agriculture.py index 594624778d..8c7427ab2d 100644 --- a/erpnext/domains/agriculture.py +++ b/erpnext/domains/agriculture.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + data = { 'desktop_icons': [ 'Agriculture Task', diff --git a/erpnext/domains/distribution.py b/erpnext/domains/distribution.py index 020ab3b83b..3661260f9b 100644 --- a/erpnext/domains/distribution.py +++ b/erpnext/domains/distribution.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + data = { 'desktop_icons': [ 'Item', diff --git a/erpnext/domains/education.py b/erpnext/domains/education.py index 0631f299ad..c640576457 100644 --- a/erpnext/domains/education.py +++ b/erpnext/domains/education.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + data = { 'desktop_icons': [ 'Student', diff --git a/erpnext/domains/healthcare.py b/erpnext/domains/healthcare.py index 4e783c7920..8bd4c76290 100644 --- a/erpnext/domains/healthcare.py +++ b/erpnext/domains/healthcare.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + data = { 'desktop_icons': [ 'Patient', diff --git a/erpnext/domains/hospitality.py b/erpnext/domains/hospitality.py index 09b98c288b..2a2d0c60ef 100644 --- a/erpnext/domains/hospitality.py +++ b/erpnext/domains/hospitality.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + data = { 'desktop_icons': [ 'Restaurant', diff --git a/erpnext/domains/manufacturing.py b/erpnext/domains/manufacturing.py index 7f328b1d95..259ee9238e 100644 --- a/erpnext/domains/manufacturing.py +++ b/erpnext/domains/manufacturing.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + data = { 'desktop_icons': [ 'Item', diff --git a/erpnext/domains/non_profit.py b/erpnext/domains/non_profit.py index 81aff02fa6..b6772c5315 100644 --- a/erpnext/domains/non_profit.py +++ b/erpnext/domains/non_profit.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + data = { 'desktop_icons': [ 'Non Profit', diff --git a/erpnext/domains/retail.py b/erpnext/domains/retail.py index 07b2e2781e..73607615f3 100644 --- a/erpnext/domains/retail.py +++ b/erpnext/domains/retail.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + data = { 'desktop_icons': [ 'POS', diff --git a/erpnext/domains/services.py b/erpnext/domains/services.py index 1fb0e19edd..7a4ffc4993 100644 --- a/erpnext/domains/services.py +++ b/erpnext/domains/services.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + data = { 'desktop_icons': [ 'Project', diff --git a/erpnext/education/__init__.py b/erpnext/education/__init__.py index 13bc12d6a9..c0589bb489 100644 --- a/erpnext/education/__init__.py +++ b/erpnext/education/__init__.py @@ -1,3 +1,4 @@ +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 b36599c2db..d86f4f231c 100644 --- a/erpnext/education/doctype/student/student_dashboard.py +++ b/erpnext/education/doctype/student/student_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): 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 23acd2855c..aeb5352a22 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,3 +1,4 @@ +from __future__ import unicode_literals import frappe def pre_process(issue): 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 212f81b5f9..9d3f02eaaf 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,3 +1,5 @@ +from __future__ import unicode_literals + def pre_process(milestone): return { 'title': milestone.title, 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 bf6d85b911..fd364e87fb 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 @@ -4,6 +4,7 @@ # 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 urllib import hashlib 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 985ac083e5..58db669411 100644 --- a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/xml_utils.py +++ b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/xml_utils.py @@ -6,6 +6,7 @@ Borrowed from https://github.com/timotheus/ebaysdk-python @author: pierre """ +from __future__ import unicode_literals import xml.etree.ElementTree as ET import re diff --git a/erpnext/erpnext_integrations/doctype/shopify_settings/sync_customer.py b/erpnext/erpnext_integrations/doctype/shopify_settings/sync_customer.py index 02e1fc9a69..4b284b2e9d 100644 --- a/erpnext/erpnext_integrations/doctype/shopify_settings/sync_customer.py +++ b/erpnext/erpnext_integrations/doctype/shopify_settings/sync_customer.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py b/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py index ff1edea713..5570e6903a 100644 --- a/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py +++ b/erpnext/erpnext_integrations/doctype/shopify_settings/sync_product.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import cstr, cint, get_request_session diff --git a/erpnext/erpnext_integrations/utils.py b/erpnext/erpnext_integrations/utils.py index 2c0368609d..9065779097 100644 --- a/erpnext/erpnext_integrations/utils.py +++ b/erpnext/erpnext_integrations/utils.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe import _ import base64, hashlib, hmac diff --git a/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner_dashboard.py b/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner_dashboard.py index 635464edd9..70c0b3c098 100644 --- a/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner_dashboard.py +++ b/erpnext/healthcare/doctype/healthcare_practitioner/healthcare_practitioner_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/healthcare/doctype/inpatient_record/inpatient_record_dashboard.py b/erpnext/healthcare/doctype/inpatient_record/inpatient_record_dashboard.py index 0dc89701a8..92cc6103f4 100644 --- a/erpnext/healthcare/doctype/inpatient_record/inpatient_record_dashboard.py +++ b/erpnext/healthcare/doctype/inpatient_record/inpatient_record_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/healthcare/doctype/patient/patient_dashboard.py b/erpnext/healthcare/doctype/patient/patient_dashboard.py index 46b10136a3..e3def72334 100644 --- a/erpnext/healthcare/doctype/patient/patient_dashboard.py +++ b/erpnext/healthcare/doctype/patient/patient_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment_dashboard.py b/erpnext/healthcare/doctype/patient_appointment/patient_appointment_dashboard.py index a030f19e95..085c4f6cbf 100644 --- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment_dashboard.py +++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/healthcare/doctype/patient_encounter/patient_encounter_dashboard.py b/erpnext/healthcare/doctype/patient_encounter/patient_encounter_dashboard.py index ec3521175b..b08b172bba 100644 --- a/erpnext/healthcare/doctype/patient_encounter/patient_encounter_dashboard.py +++ b/erpnext/healthcare/doctype/patient_encounter/patient_encounter_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py b/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py index cc5f62930d..cfdd6d3aef 100644 --- a/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py +++ b/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + def get_data(): return { 'fieldname': 'attendance_request', diff --git a/erpnext/hr/doctype/employee/employee_dashboard.py b/erpnext/hr/doctype/employee/employee_dashboard.py index e62f59f49f..46461da1a5 100644 --- a/erpnext/hr/doctype/employee/employee_dashboard.py +++ b/erpnext/hr/doctype/employee/employee_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/hr/doctype/employee_grade/employee_grade_dashboard.py b/erpnext/hr/doctype/employee_grade/employee_grade_dashboard.py index 2ac66981bf..f2656e9a2b 100644 --- a/erpnext/hr/doctype/employee_grade/employee_grade_dashboard.py +++ b/erpnext/hr/doctype/employee_grade/employee_grade_dashboard.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + def get_data(): return { 'transactions': [ diff --git a/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py b/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py index 30828a31c0..d1599a4f47 100644 --- a/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py +++ b/erpnext/hr/doctype/holiday_list/holiday_list_dashboard.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + def get_data(): return { 'fieldname': 'holiday_list', 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 37a3474dc4..2aa54984ec 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,3 +1,5 @@ +from __future__ import unicode_literals + 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 5214a58fbf..1572de3cb7 100644 --- a/erpnext/hr/doctype/leave_period/leave_period_dashboard.py +++ b/erpnext/hr/doctype/leave_period/leave_period_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py b/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py index a12ba7f62d..f97d2855a4 100644 --- a/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py +++ b/erpnext/hr/doctype/leave_policy/leave_policy_dashboard.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + def get_data(): return { 'fieldname': 'leave_policy', diff --git a/erpnext/hr/doctype/leave_type/leave_type_dashboard.py b/erpnext/hr/doctype/leave_type/leave_type_dashboard.py index 75e0c08c82..5cae9a8809 100644 --- a/erpnext/hr/doctype/leave_type/leave_type_dashboard.py +++ b/erpnext/hr/doctype/leave_type/leave_type_dashboard.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + def get_data(): return { 'fieldname': 'leave_type', diff --git a/erpnext/hr/doctype/loan/loan_dashboard.py b/erpnext/hr/doctype/loan/loan_dashboard.py index c621a7fc4b..7256d9424a 100644 --- a/erpnext/hr/doctype/loan/loan_dashboard.py +++ b/erpnext/hr/doctype/loan/loan_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/hr/doctype/payroll_entry/payroll_entry_dashboard.py b/erpnext/hr/doctype/payroll_entry/payroll_entry_dashboard.py index c4fa7f6dd5..7af507d119 100644 --- a/erpnext/hr/doctype/payroll_entry/payroll_entry_dashboard.py +++ b/erpnext/hr/doctype/payroll_entry/payroll_entry_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/hr/doctype/salary_structure/salary_structure_dashboard.py b/erpnext/hr/doctype/salary_structure/salary_structure_dashboard.py index 7a29878ac3..3803c1d3ea 100644 --- a/erpnext/hr/doctype/salary_structure/salary_structure_dashboard.py +++ b/erpnext/hr/doctype/salary_structure/salary_structure_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/hr/doctype/training_program/training_program_dashboard.py b/erpnext/hr/doctype/training_program/training_program_dashboard.py index a314081c6b..441a71bba7 100644 --- a/erpnext/hr/doctype/training_program/training_program_dashboard.py +++ b/erpnext/hr/doctype/training_program/training_program_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/hr/doctype/vehicle/vehicle_dashboard.py b/erpnext/hr/doctype/vehicle/vehicle_dashboard.py index 2c1c4c31aa..d27c7ac009 100644 --- a/erpnext/hr/doctype/vehicle/vehicle_dashboard.py +++ b/erpnext/hr/doctype/vehicle/vehicle_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ data = { diff --git a/erpnext/manufacturing/doctype/job_card/job_card_dashboard.py b/erpnext/manufacturing/doctype/job_card/job_card_dashboard.py index a9811fcf95..d48bccf9d4 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card_dashboard.py +++ b/erpnext/manufacturing/doctype/job_card/job_card_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/manufacturing/doctype/operation/test_operation.py b/erpnext/manufacturing/doctype/operation/test_operation.py index 401ac748f3..17d206a4e1 100644 --- a/erpnext/manufacturing/doctype/operation/test_operation.py +++ b/erpnext/manufacturing/doctype/operation/test_operation.py @@ -1,5 +1,6 @@ # Copyright (c) 2015, 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/production_plan_dashboard.py b/erpnext/manufacturing/doctype/production_plan/production_plan_dashboard.py index 8611372dfc..91c28555d6 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan_dashboard.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/manufacturing/doctype/work_order/work_order_dashboard.py b/erpnext/manufacturing/doctype/work_order/work_order_dashboard.py index 02fbfcdeab..3fe5282582 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order_dashboard.py +++ b/erpnext/manufacturing/doctype/work_order/work_order_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/non_profit/doctype/member/member_dashboard.py b/erpnext/non_profit/doctype/member/member_dashboard.py index c44a9a8422..945fb7b7d3 100644 --- a/erpnext/non_profit/doctype/member/member_dashboard.py +++ b/erpnext/non_profit/doctype/member/member_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/patches/v10_0/copy_projects_renamed_fields.py b/erpnext/patches/v10_0/copy_projects_renamed_fields.py index 58e32b0de8..80db3bdd1e 100644 --- a/erpnext/patches/v10_0/copy_projects_renamed_fields.py +++ b/erpnext/patches/v10_0/copy_projects_renamed_fields.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v10_0/delete_hub_documents.py b/erpnext/patches/v10_0/delete_hub_documents.py index 6dcfec7ca8..f6a1499895 100644 --- a/erpnext/patches/v10_0/delete_hub_documents.py +++ b/erpnext/patches/v10_0/delete_hub_documents.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field 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 f888ef6b63..2e3095153a 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,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v10_0/set_discount_amount.py b/erpnext/patches/v10_0/set_discount_amount.py index eb8bb2d48f..d5e2c5a84b 100644 --- a/erpnext/patches/v10_0/set_discount_amount.py +++ b/erpnext/patches/v10_0/set_discount_amount.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v10_0/set_student_party_type.py b/erpnext/patches/v10_0/set_student_party_type.py index 6ac1451623..08376ae894 100644 --- a/erpnext/patches/v10_0/set_student_party_type.py +++ b/erpnext/patches/v10_0/set_student_party_type.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v10_0/show_leaves_of_all_department_members_in_calendar.py b/erpnext/patches/v10_0/show_leaves_of_all_department_members_in_calendar.py index 1ae8b4a54e..7e2ff7a8a7 100644 --- a/erpnext/patches/v10_0/show_leaves_of_all_department_members_in_calendar.py +++ b/erpnext/patches/v10_0/show_leaves_of_all_department_members_in_calendar.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v10_0/update_asset_calculate_depreciation.py b/erpnext/patches/v10_0/update_asset_calculate_depreciation.py index 44b8c7f320..b947a40b4a 100644 --- a/erpnext/patches/v10_0/update_asset_calculate_depreciation.py +++ b/erpnext/patches/v10_0/update_asset_calculate_depreciation.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v10_0/update_hub_connector_domain.py b/erpnext/patches/v10_0/update_hub_connector_domain.py index 808ae77129..baf580a369 100644 --- a/erpnext/patches/v10_0/update_hub_connector_domain.py +++ b/erpnext/patches/v10_0/update_hub_connector_domain.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v10_0/update_lft_rgt_for_employee.py b/erpnext/patches/v10_0/update_lft_rgt_for_employee.py index 82fbeaaeaf..46ca786e0d 100644 --- a/erpnext/patches/v10_0/update_lft_rgt_for_employee.py +++ b/erpnext/patches/v10_0/update_lft_rgt_for_employee.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.utils.nestedset import rebuild_tree diff --git a/erpnext/patches/v10_0/update_reserved_qty_for_purchase_order.py b/erpnext/patches/v10_0/update_reserved_qty_for_purchase_order.py index b0df91890b..7b2c36698a 100644 --- a/erpnext/patches/v10_0/update_reserved_qty_for_purchase_order.py +++ b/erpnext/patches/v10_0/update_reserved_qty_for_purchase_order.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from erpnext.stock.utils import get_bin diff --git a/erpnext/patches/v10_0/update_status_in_purchase_receipt.py b/erpnext/patches/v10_0/update_status_in_purchase_receipt.py index 69e2bb881b..a0bdd9e2cc 100644 --- a/erpnext/patches/v10_0/update_status_in_purchase_receipt.py +++ b/erpnext/patches/v10_0/update_status_in_purchase_receipt.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v10_0/update_territory_and_customer_group.py b/erpnext/patches/v10_0/update_territory_and_customer_group.py index c02d3276aa..8f0c230717 100644 --- a/erpnext/patches/v10_0/update_territory_and_customer_group.py +++ b/erpnext/patches/v10_0/update_territory_and_customer_group.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.model.rename_doc import get_fetch_fields 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 08006ad01b..f4c1895539 100644 --- a/erpnext/patches/v11_0/add_default_dispatch_notification_template.py +++ b/erpnext/patches/v11_0/add_default_dispatch_notification_template.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals 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 bd86ae29e3..f722be26b4 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,3 +1,4 @@ +from __future__ import unicode_literals import frappe, os from frappe import _ 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 685020222f..eecf75568a 100644 --- a/erpnext/patches/v11_0/add_expense_claim_default_account.py +++ b/erpnext/patches/v11_0/add_expense_claim_default_account.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v11_0/add_healthcare_service_unit_tree_root.py b/erpnext/patches/v11_0/add_healthcare_service_unit_tree_root.py index 029ea8738b..d956052f1a 100644 --- a/erpnext/patches/v11_0/add_healthcare_service_unit_tree_root.py +++ b/erpnext/patches/v11_0/add_healthcare_service_unit_tree_root.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe import _ 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 064e036742..5a30c780f8 100644 --- a/erpnext/patches/v11_0/add_index_on_nestedset_doctypes.py +++ b/erpnext/patches/v11_0/add_index_on_nestedset_doctypes.py @@ -1,6 +1,7 @@ # 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 def execute(): diff --git a/erpnext/patches/v11_0/add_market_segments.py b/erpnext/patches/v11_0/add_market_segments.py index 0e7a23ad66..ed47d4293f 100644 --- a/erpnext/patches/v11_0/add_market_segments.py +++ b/erpnext/patches/v11_0/add_market_segments.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/patches/v11_0/add_sales_stages.py b/erpnext/patches/v11_0/add_sales_stages.py index 69182c2179..ac2ae1511a 100644 --- a/erpnext/patches/v11_0/add_sales_stages.py +++ b/erpnext/patches/v11_0/add_sales_stages.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe import _ from erpnext.setup.setup_wizard.operations.install_fixtures import add_sale_stages diff --git a/erpnext/patches/v11_0/change_healthcare_desktop_icons.py b/erpnext/patches/v11_0/change_healthcare_desktop_icons.py index ed7df503e5..0b77395865 100644 --- a/erpnext/patches/v11_0/change_healthcare_desktop_icons.py +++ b/erpnext/patches/v11_0/change_healthcare_desktop_icons.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe import _ 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 ee336be3b5..462f830c18 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,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v11_0/create_default_success_action.py b/erpnext/patches/v11_0/create_default_success_action.py index 29687d2692..31feff25b9 100644 --- a/erpnext/patches/v11_0/create_default_success_action.py +++ b/erpnext/patches/v11_0/create_default_success_action.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals 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 eb48eed7a6..1257f1918b 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,3 +1,4 @@ +from __future__ import unicode_literals 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 f663674d1e..591c521efb 100644 --- a/erpnext/patches/v11_0/drop_column_max_days_allowed.py +++ b/erpnext/patches/v11_0/drop_column_max_days_allowed.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v11_0/ewaybill_fields_gst_india.py b/erpnext/patches/v11_0/ewaybill_fields_gst_india.py index fc552a99e2..9925b70a96 100644 --- a/erpnext/patches/v11_0/ewaybill_fields_gst_india.py +++ b/erpnext/patches/v11_0/ewaybill_fields_gst_india.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals 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 acaf83d980..80476c8a74 100644 --- a/erpnext/patches/v11_0/hr_ux_cleanups.py +++ b/erpnext/patches/v11_0/hr_ux_cleanups.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): 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 7f5c3aa067..232d44256f 100644 --- a/erpnext/patches/v11_0/inter_state_field_for_gst.py +++ b/erpnext/patches/v11_0/inter_state_field_for_gst.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals 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 304bf7d3bb..edab34cc58 100644 --- a/erpnext/patches/v11_0/move_leave_approvers_from_employee.py +++ b/erpnext/patches/v11_0/move_leave_approvers_from_employee.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe import _ 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 0fc4780a30..4cb74c7256 100644 --- a/erpnext/patches/v11_0/rebuild_tree_for_company.py +++ b/erpnext/patches/v11_0/rebuild_tree_for_company.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.utils.nestedset import rebuild_tree diff --git a/erpnext/patches/v11_0/redesign_healthcare_billing_work_flow.py b/erpnext/patches/v11_0/redesign_healthcare_billing_work_flow.py index eef6722a18..7c8a822fa2 100644 --- a/erpnext/patches/v11_0/redesign_healthcare_billing_work_flow.py +++ b/erpnext/patches/v11_0/redesign_healthcare_billing_work_flow.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_fields from erpnext.domains.healthcare import data diff --git a/erpnext/patches/v11_0/remove_land_unit_icon.py b/erpnext/patches/v11_0/remove_land_unit_icon.py index 98051cc7f1..f28c16f0c7 100644 --- a/erpnext/patches/v11_0/remove_land_unit_icon.py +++ b/erpnext/patches/v11_0/remove_land_unit_icon.py @@ -1,6 +1,8 @@ # Copyright (c) 2018, Frappe and Contributors # License: GNU General Public License v3. See license.txt +from __future__ import unicode_literals + # imports - module imports import frappe diff --git a/erpnext/patches/v11_0/remove_subscriber_doctype.py b/erpnext/patches/v11_0/remove_subscriber_doctype.py index 4e50c35cd2..4839a20f91 100644 --- a/erpnext/patches/v11_0/remove_subscriber_doctype.py +++ b/erpnext/patches/v11_0/remove_subscriber_doctype.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field 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 8fa876dd74..8eb7016744 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,3 +1,4 @@ +from __future__ import unicode_literals 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_asset_adjustment_doctype.py b/erpnext/patches/v11_0/rename_asset_adjustment_doctype.py index e32149ec44..c03ab0b711 100644 --- a/erpnext/patches/v11_0/rename_asset_adjustment_doctype.py +++ b/erpnext/patches/v11_0/rename_asset_adjustment_doctype.py @@ -1,6 +1,7 @@ # 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.rename_doc import rename_doc diff --git a/erpnext/patches/v11_0/rename_employee_loan_to_loan.py b/erpnext/patches/v11_0/rename_employee_loan_to_loan.py index e674137130..b2ff6b8c5d 100644 --- a/erpnext/patches/v11_0/rename_employee_loan_to_loan.py +++ b/erpnext/patches/v11_0/rename_employee_loan_to_loan.py @@ -1,3 +1,4 @@ +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 730b271420..4e99fac822 100644 --- a/erpnext/patches/v11_0/rename_field_max_days_allowed.py +++ b/erpnext/patches/v11_0/rename_field_max_days_allowed.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v11_0/rename_healthcare_doctype_and_fields.py b/erpnext/patches/v11_0/rename_healthcare_doctype_and_fields.py index ba18de8174..8fdac07658 100644 --- a/erpnext/patches/v11_0/rename_healthcare_doctype_and_fields.py +++ b/erpnext/patches/v11_0/rename_healthcare_doctype_and_fields.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.model.rename_doc import rename_doc from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v11_0/rename_healthcare_fields.py b/erpnext/patches/v11_0/rename_healthcare_fields.py index d47a3c38fd..9aeb433cff 100644 --- a/erpnext/patches/v11_0/rename_healthcare_fields.py +++ b/erpnext/patches/v11_0/rename_healthcare_fields.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field from frappe.modules import scrub, get_doctype_module 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 7fa1b09e7b..84f5518926 100644 --- a/erpnext/patches/v11_0/rename_members_with_naming_series.py +++ b/erpnext/patches/v11_0/rename_members_with_naming_series.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): 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 index fac772ccdd..56e95e0328 100644 --- 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 @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): 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 a4bc3559f8..e895eaeb65 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,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v11_0/set_department_for_doctypes.py b/erpnext/patches/v11_0/set_department_for_doctypes.py index b1098abb57..175d2a189f 100644 --- a/erpnext/patches/v11_0/set_department_for_doctypes.py +++ b/erpnext/patches/v11_0/set_department_for_doctypes.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals 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 3c2cea2230..4353ef80e2 100644 --- a/erpnext/patches/v11_0/set_missing_gst_hsn_code.py +++ b/erpnext/patches/v11_0/set_missing_gst_hsn_code.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals 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 a45c38fe09..fa3605ba5f 100644 --- a/erpnext/patches/v11_0/set_salary_component_properties.py +++ b/erpnext/patches/v11_0/set_salary_component_properties.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): 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 ca8f0dc924..d0cabb3835 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,3 +1,4 @@ +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 a18f3ff1be..7bd8577f9c 100644 --- a/erpnext/patches/v11_0/set_user_permissions_for_department.py +++ b/erpnext/patches/v11_0/set_user_permissions_for_department.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): 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 7f7cfc1327..0f7fad7e49 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,3 +1,4 @@ +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 9cd574390e..91470b3558 100644 --- a/erpnext/patches/v11_0/uom_conversion_data.py +++ b/erpnext/patches/v11_0/uom_conversion_data.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe, json def execute(): 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 a19a6c47b6..a8d3fab481 100644 --- a/erpnext/patches/v11_0/update_brand_in_item_price.py +++ b/erpnext/patches/v11_0/update_brand_in_item_price.py @@ -1,6 +1,7 @@ # 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 def execute(): @@ -10,5 +11,5 @@ def execute(): set `tabItem Price`.brand = `tabItem`.brand where - `tabItem Price`.item_code = `tabItem`.name + `tabItem Price`.item_code = `tabItem`.name and `tabItem`.brand is not null and `tabItem`.brand != ''""") \ No newline at end of file diff --git a/erpnext/patches/v11_0/update_hub_url.py b/erpnext/patches/v11_0/update_hub_url.py index 40181a2e90..6c6ca3c5c2 100644 --- a/erpnext/patches/v11_0/update_hub_url.py +++ b/erpnext/patches/v11_0/update_hub_url.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v11_0/update_sales_partner_type.py b/erpnext/patches/v11_0/update_sales_partner_type.py index 508c51a376..b393926b23 100644 --- a/erpnext/patches/v11_0/update_sales_partner_type.py +++ b/erpnext/patches/v11_0/update_sales_partner_type.py @@ -1,3 +1,4 @@ +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 8f086992b6..fcb76af459 100644 --- a/erpnext/patches/v11_0/update_total_qty_field.py +++ b/erpnext/patches/v11_0/update_total_qty_field.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v4_4/make_email_accounts.py b/erpnext/patches/v4_4/make_email_accounts.py index d055fce969..57df1ae491 100644 --- a/erpnext/patches/v4_4/make_email_accounts.py +++ b/erpnext/patches/v4_4/make_email_accounts.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.model import default_fields diff --git a/erpnext/patches/v5_0/convert_stock_reconciliation.py b/erpnext/patches/v5_0/convert_stock_reconciliation.py index 8a0b93d9d8..75d1da752f 100644 --- a/erpnext/patches/v5_0/convert_stock_reconciliation.py +++ b/erpnext/patches/v5_0/convert_stock_reconciliation.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe, json def execute(): diff --git a/erpnext/patches/v5_0/execute_on_doctype_update.py b/erpnext/patches/v5_0/execute_on_doctype_update.py index 9641320d46..70b1d8ded6 100644 --- a/erpnext/patches/v5_0/execute_on_doctype_update.py +++ b/erpnext/patches/v5_0/execute_on_doctype_update.py @@ -1,6 +1,7 @@ # 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 def execute(): diff --git a/erpnext/patches/v5_0/fix_taxes_and_totals_in_party_currency.py b/erpnext/patches/v5_0/fix_taxes_and_totals_in_party_currency.py index 062159b410..30dc0f8db4 100644 --- a/erpnext/patches/v5_0/fix_taxes_and_totals_in_party_currency.py +++ b/erpnext/patches/v5_0/fix_taxes_and_totals_in_party_currency.py @@ -1,27 +1,27 @@ - # 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.meta import get_field_precision def execute(): - if not frappe.db.sql("""select name from `tabPatch Log` + if not frappe.db.sql("""select name from `tabPatch Log` where patch = 'erpnext.patches.v5_0.taxes_and_totals_in_party_currency'"""): return selling_doctypes = ["Quotation", "Sales Order", "Delivery Note", "Sales Invoice"] buying_doctypes = ["Supplier Quotation", "Purchase Order", "Purchase Receipt", "Purchase Invoice"] - + for dt in selling_doctypes: update_values(dt, "Sales Taxes and Charges") for dt in buying_doctypes: update_values(dt, "Purchase Taxes and Charges") - + def update_values(dt, tax_table): rate_field_precision = get_field_precision(frappe.get_meta(dt + " Item").get_field("rate")) tax_amount_precision = get_field_precision(frappe.get_meta(tax_table).get_field("tax_amount")) - + # update net_total, discount_on frappe.db.sql(""" UPDATE @@ -33,7 +33,7 @@ def update_values(dt, tax_table): and ifnull(base_total_taxes_and_charges, 0) != 0 and ifnull(total_taxes_and_charges, 0) = 0 """.format(dt, tax_amount_precision)) - + # update net_amount frappe.db.sql(""" UPDATE @@ -61,6 +61,6 @@ def update_values(dt, tax_table): and par.docstatus < 2 and ((ifnull(tax.base_tax_amount, 0) != 0 and ifnull(tax.tax_amount, 0) = 0) or (ifnull(tax.base_total, 0) != 0 and ifnull(tax.total, 0) = 0) - or (ifnull(tax.base_tax_amount_after_discount_amount, 0) != 0 and + or (ifnull(tax.base_tax_amount_after_discount_amount, 0) != 0 and ifnull(tax.tax_amount_after_discount_amount, 0) = 0)) """.format(dt, tax_table, tax_amount_precision)) \ No newline at end of file diff --git a/erpnext/patches/v5_0/item_patches.py b/erpnext/patches/v5_0/item_patches.py index 37992adec6..e223e09f5b 100644 --- a/erpnext/patches/v5_0/item_patches.py +++ b/erpnext/patches/v5_0/item_patches.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v5_0/new_crm_module.py b/erpnext/patches/v5_0/new_crm_module.py index f7e0793fd1..f5dda1f273 100644 --- a/erpnext/patches/v5_0/new_crm_module.py +++ b/erpnext/patches/v5_0/new_crm_module.py @@ -1,6 +1,7 @@ # 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 frappe diff --git a/erpnext/patches/v5_0/newsletter.py b/erpnext/patches/v5_0/newsletter.py index fcf95ca4c6..63e3312413 100644 --- a/erpnext/patches/v5_0/newsletter.py +++ b/erpnext/patches/v5_0/newsletter.py @@ -1,6 +1,7 @@ # 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.permissions diff --git a/erpnext/patches/v5_0/portal_fixes.py b/erpnext/patches/v5_0/portal_fixes.py index 260222e6cb..1fefd99167 100644 --- a/erpnext/patches/v5_0/portal_fixes.py +++ b/erpnext/patches/v5_0/portal_fixes.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe import erpnext.setup.install diff --git a/erpnext/patches/v5_0/project_costing.py b/erpnext/patches/v5_0/project_costing.py index 33bb9c1630..e2d65d0594 100644 --- a/erpnext/patches/v5_0/project_costing.py +++ b/erpnext/patches/v5_0/project_costing.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v5_0/recalculate_total_amount_in_jv.py b/erpnext/patches/v5_0/recalculate_total_amount_in_jv.py index 89bd5808a8..d5af43c541 100644 --- a/erpnext/patches/v5_0/recalculate_total_amount_in_jv.py +++ b/erpnext/patches/v5_0/recalculate_total_amount_in_jv.py @@ -1,6 +1,7 @@ # 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 money_in_words diff --git a/erpnext/patches/v5_0/remove_birthday_events.py b/erpnext/patches/v5_0/remove_birthday_events.py index 589792a04a..3ead8669b8 100644 --- a/erpnext/patches/v5_0/remove_birthday_events.py +++ b/erpnext/patches/v5_0/remove_birthday_events.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v5_0/rename_customer_issue.py b/erpnext/patches/v5_0/rename_customer_issue.py index 5b16fd2145..1bd69ceec1 100644 --- a/erpnext/patches/v5_0/rename_customer_issue.py +++ b/erpnext/patches/v5_0/rename_customer_issue.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v5_0/rename_pos_setting.py b/erpnext/patches/v5_0/rename_pos_setting.py index ad579b61ff..bf10333564 100644 --- a/erpnext/patches/v5_0/rename_pos_setting.py +++ b/erpnext/patches/v5_0/rename_pos_setting.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v5_0/rename_table_fieldnames.py b/erpnext/patches/v5_0/rename_table_fieldnames.py index e93070f950..59f534303f 100644 --- a/erpnext/patches/v5_0/rename_table_fieldnames.py +++ b/erpnext/patches/v5_0/rename_table_fieldnames.py @@ -1,6 +1,7 @@ # 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 from frappe.modules import scrub, get_doctype_module diff --git a/erpnext/patches/v5_0/rename_taxes_and_charges_master.py b/erpnext/patches/v5_0/rename_taxes_and_charges_master.py index f5fcb3af31..e26f48cda1 100644 --- a/erpnext/patches/v5_0/rename_taxes_and_charges_master.py +++ b/erpnext/patches/v5_0/rename_taxes_and_charges_master.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe diff --git a/erpnext/patches/v5_0/set_default_company_in_bom.py b/erpnext/patches/v5_0/set_default_company_in_bom.py index 0b2c921151..a5cd761119 100644 --- a/erpnext/patches/v5_0/set_default_company_in_bom.py +++ b/erpnext/patches/v5_0/set_default_company_in_bom.py @@ -1,6 +1,7 @@ # 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 def execute(): diff --git a/erpnext/patches/v5_0/set_footer_address.py b/erpnext/patches/v5_0/set_footer_address.py index a3324a0455..8120d834e1 100644 --- a/erpnext/patches/v5_0/set_footer_address.py +++ b/erpnext/patches/v5_0/set_footer_address.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v5_0/stock_entry_update_value.py b/erpnext/patches/v5_0/stock_entry_update_value.py index 9abd315ff1..ba1af310f5 100644 --- a/erpnext/patches/v5_0/stock_entry_update_value.py +++ b/erpnext/patches/v5_0/stock_entry_update_value.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v5_0/taxes_and_totals_in_party_currency.py b/erpnext/patches/v5_0/taxes_and_totals_in_party_currency.py index f4ed66bcf6..76d10820b5 100644 --- a/erpnext/patches/v5_0/taxes_and_totals_in_party_currency.py +++ b/erpnext/patches/v5_0/taxes_and_totals_in_party_currency.py @@ -1,7 +1,7 @@ - # 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.meta import get_field_precision from frappe.custom.doctype.property_setter.property_setter import make_property_setter @@ -20,20 +20,20 @@ def update_values(dt, tax_table): frappe.reload_doctype(dt) frappe.reload_doctype(dt + " Item") frappe.reload_doctype(tax_table) - + net_total_precision = get_field_precision(frappe.get_meta(dt).get_field("net_total")) for field in ("total", "base_total", "base_net_total"): make_property_setter(dt, field, "precision", net_total_precision, "Select") - + rate_field_precision = get_field_precision(frappe.get_meta(dt + " Item").get_field("rate")) for field in ("net_rate", "base_net_rate", "net_amount", "base_net_amount", "base_rate", "base_amount"): make_property_setter(dt + " Item", field, "precision", rate_field_precision, "Select") - + tax_amount_precision = get_field_precision(frappe.get_meta(tax_table).get_field("tax_amount")) - for field in ("base_tax_amount", "total", "base_total", "tax_amount_after_discount_amount", + for field in ("base_tax_amount", "total", "base_total", "tax_amount_after_discount_amount", "base_tax_amount_after_discount_amount"): make_property_setter(tax_table, field, "precision", tax_amount_precision, "Select") - + # update net_total, discount_on frappe.db.sql(""" UPDATE @@ -46,7 +46,7 @@ def update_values(dt, tax_table): WHERE docstatus < 2 """.format(dt, net_total_precision)) - + # update net_amount frappe.db.sql(""" UPDATE diff --git a/erpnext/patches/v5_0/update_dn_against_doc_fields.py b/erpnext/patches/v5_0/update_dn_against_doc_fields.py index 0fb508583a..56f4f484b1 100644 --- a/erpnext/patches/v5_0/update_dn_against_doc_fields.py +++ b/erpnext/patches/v5_0/update_dn_against_doc_fields.py @@ -1,6 +1,7 @@ # 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 def execute(): diff --git a/erpnext/patches/v5_0/update_frozen_accounts_permission_role.py b/erpnext/patches/v5_0/update_frozen_accounts_permission_role.py index 14426f5e80..b52785ae60 100644 --- a/erpnext/patches/v5_0/update_frozen_accounts_permission_role.py +++ b/erpnext/patches/v5_0/update_frozen_accounts_permission_role.py @@ -1,6 +1,7 @@ # 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 def execute(): diff --git a/erpnext/patches/v5_0/update_item_and_description_again.py b/erpnext/patches/v5_0/update_item_and_description_again.py index 622274807a..35dedcc072 100644 --- a/erpnext/patches/v5_0/update_item_and_description_again.py +++ b/erpnext/patches/v5_0/update_item_and_description_again.py @@ -1,6 +1,7 @@ # 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 cstr import re diff --git a/erpnext/patches/v5_0/update_item_desc_in_invoice.py b/erpnext/patches/v5_0/update_item_desc_in_invoice.py index 1f74184a98..dba35d5693 100644 --- a/erpnext/patches/v5_0/update_item_desc_in_invoice.py +++ b/erpnext/patches/v5_0/update_item_desc_in_invoice.py @@ -1,6 +1,7 @@ # 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.website.utils import find_first_image from frappe.utils import cstr @@ -29,7 +30,7 @@ def execute(): image = item_details.get(d.item_code).image else: desc, image = extract_image_and_description(cstr(d.description)) - + if not image: item_detail = item_details.get(d.item_code) if item_detail: diff --git a/erpnext/patches/v5_0/update_item_description_and_image.py b/erpnext/patches/v5_0/update_item_description_and_image.py index a18df2f653..75df39ee39 100644 --- a/erpnext/patches/v5_0/update_item_description_and_image.py +++ b/erpnext/patches/v5_0/update_item_description_and_image.py @@ -1,6 +1,7 @@ # 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.website.utils import find_first_image from frappe.utils import cstr diff --git a/erpnext/patches/v5_0/update_item_name_in_bom.py b/erpnext/patches/v5_0/update_item_name_in_bom.py index f4e29907f1..5781542a2a 100644 --- a/erpnext/patches/v5_0/update_item_name_in_bom.py +++ b/erpnext/patches/v5_0/update_item_name_in_bom.py @@ -1,6 +1,7 @@ # 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 def execute(): diff --git a/erpnext/patches/v5_0/update_material_transfer_for_manufacture.py b/erpnext/patches/v5_0/update_material_transfer_for_manufacture.py index b858bd8074..f31c9fed4d 100644 --- a/erpnext/patches/v5_0/update_material_transfer_for_manufacture.py +++ b/erpnext/patches/v5_0/update_material_transfer_for_manufacture.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v5_0/update_material_transferred_for_manufacturing.py b/erpnext/patches/v5_0/update_material_transferred_for_manufacturing.py index 2133d1c050..2a09aa29af 100644 --- a/erpnext/patches/v5_0/update_material_transferred_for_manufacturing.py +++ b/erpnext/patches/v5_0/update_material_transferred_for_manufacturing.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v5_0/update_material_transferred_for_manufacturing_again.py b/erpnext/patches/v5_0/update_material_transferred_for_manufacturing_again.py index 187f4ea0bd..5847c83d38 100644 --- a/erpnext/patches/v5_0/update_material_transferred_for_manufacturing_again.py +++ b/erpnext/patches/v5_0/update_material_transferred_for_manufacturing_again.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v5_0/update_operation_description.py b/erpnext/patches/v5_0/update_operation_description.py index ae7b6326cb..4ce32f35f1 100644 --- a/erpnext/patches/v5_0/update_operation_description.py +++ b/erpnext/patches/v5_0/update_operation_description.py @@ -1,10 +1,11 @@ # 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.permissions def execute(): if "opn_description" in frappe.db.get_table_columns("BOM Operation"): - frappe.db.sql("""update `tabBOM Operation` set description = opn_description + frappe.db.sql("""update `tabBOM Operation` set description = opn_description where ifnull(description, '') = ''""") \ No newline at end of file diff --git a/erpnext/patches/v5_0/update_tax_amount_after_discount_in_purchase_cycle.py b/erpnext/patches/v5_0/update_tax_amount_after_discount_in_purchase_cycle.py index 987247c2f3..53df9422b3 100644 --- a/erpnext/patches/v5_0/update_tax_amount_after_discount_in_purchase_cycle.py +++ b/erpnext/patches/v5_0/update_tax_amount_after_discount_in_purchase_cycle.py @@ -1,16 +1,17 @@ # 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 def execute(): frappe.db.sql(""" - update + update `tabPurchase Taxes and Charges` set tax_amount_after_discount_amount = tax_amount, base_tax_amount_after_discount_amount = base_tax_amount where - ifnull(tax_amount_after_discount_amount, 0) = 0 - and ifnull(base_tax_amount_after_discount_amount, 0) = 0 + ifnull(tax_amount_after_discount_amount, 0) = 0 + and ifnull(base_tax_amount_after_discount_amount, 0) = 0 """) \ No newline at end of file diff --git a/erpnext/patches/v5_1/rename_roles.py b/erpnext/patches/v5_1/rename_roles.py index 26208aa1e5..e19c22a614 100644 --- a/erpnext/patches/v5_1/rename_roles.py +++ b/erpnext/patches/v5_1/rename_roles.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v5_4/cleanup_journal_entry.py b/erpnext/patches/v5_4/cleanup_journal_entry.py index 9100b8f4a8..6860e6ad09 100644 --- a/erpnext/patches/v5_4/cleanup_journal_entry.py +++ b/erpnext/patches/v5_4/cleanup_journal_entry.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from pymysql import InternalError 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 6851e67475..2045358ddb 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,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v6_0/default_activity_rate.py b/erpnext/patches/v6_0/default_activity_rate.py index 44fda3415c..cfbfb723bc 100644 --- a/erpnext/patches/v6_0/default_activity_rate.py +++ b/erpnext/patches/v6_0/default_activity_rate.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v6_0/set_default_title.py b/erpnext/patches/v6_0/set_default_title.py index 83b6b59897..cceff3f480 100644 --- a/erpnext/patches/v6_0/set_default_title.py +++ b/erpnext/patches/v6_0/set_default_title.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v6_10/email_digest_default_quote.py b/erpnext/patches/v6_10/email_digest_default_quote.py index 003b317ad8..6139f1a88a 100644 --- a/erpnext/patches/v6_10/email_digest_default_quote.py +++ b/erpnext/patches/v6_10/email_digest_default_quote.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v6_10/fix_jv_total_amount.py b/erpnext/patches/v6_10/fix_jv_total_amount.py index 3797ff441d..42cb9e9e15 100644 --- a/erpnext/patches/v6_10/fix_jv_total_amount.py +++ b/erpnext/patches/v6_10/fix_jv_total_amount.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe # patch all for-print field (total amount) in Journal Entry in 2015 diff --git a/erpnext/patches/v6_12/set_overdue_tasks.py b/erpnext/patches/v6_12/set_overdue_tasks.py index 39d601aa00..7dbb8ba8b6 100644 --- a/erpnext/patches/v6_12/set_overdue_tasks.py +++ b/erpnext/patches/v6_12/set_overdue_tasks.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v6_2/remove_newsletter_duplicates.py b/erpnext/patches/v6_2/remove_newsletter_duplicates.py index dc5b77851e..f9d15475d1 100644 --- a/erpnext/patches/v6_2/remove_newsletter_duplicates.py +++ b/erpnext/patches/v6_2/remove_newsletter_duplicates.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v6_24/set_recurring_id.py b/erpnext/patches/v6_24/set_recurring_id.py index 85a39e3371..527a2fd3d9 100644 --- a/erpnext/patches/v6_24/set_recurring_id.py +++ b/erpnext/patches/v6_24/set_recurring_id.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v6_3/convert_applicable_territory.py b/erpnext/patches/v6_3/convert_applicable_territory.py index b1793db5cb..231a483ea2 100644 --- a/erpnext/patches/v6_3/convert_applicable_territory.py +++ b/erpnext/patches/v6_3/convert_applicable_territory.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v6_4/email_digest_update.py b/erpnext/patches/v6_4/email_digest_update.py index a1624276fe..8342b7fce6 100644 --- a/erpnext/patches/v6_4/email_digest_update.py +++ b/erpnext/patches/v6_4/email_digest_update.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v6_4/fix_sales_order_maintenance_status.py b/erpnext/patches/v6_4/fix_sales_order_maintenance_status.py index dbd34d54d1..50aa9e542e 100644 --- a/erpnext/patches/v6_4/fix_sales_order_maintenance_status.py +++ b/erpnext/patches/v6_4/fix_sales_order_maintenance_status.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v6_4/fix_status_in_sales_and_purchase_order.py b/erpnext/patches/v6_4/fix_status_in_sales_and_purchase_order.py index 867a5b2182..746a99004a 100644 --- a/erpnext/patches/v6_4/fix_status_in_sales_and_purchase_order.py +++ b/erpnext/patches/v6_4/fix_status_in_sales_and_purchase_order.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v6_4/make_image_thumbnail.py b/erpnext/patches/v6_4/make_image_thumbnail.py index 3315acc896..2c86e8af86 100644 --- a/erpnext/patches/v6_4/make_image_thumbnail.py +++ b/erpnext/patches/v6_4/make_image_thumbnail.py @@ -1,4 +1,4 @@ -from __future__ import print_function +from __future__ import print_function, unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v6_4/set_user_in_contact.py b/erpnext/patches/v6_4/set_user_in_contact.py index 41f76af94d..7e8a6eecd5 100644 --- a/erpnext/patches/v6_4/set_user_in_contact.py +++ b/erpnext/patches/v6_4/set_user_in_contact.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v6_8/make_webform_standard.py b/erpnext/patches/v6_8/make_webform_standard.py index 8633ba694e..2cc16a286f 100644 --- a/erpnext/patches/v6_8/make_webform_standard.py +++ b/erpnext/patches/v6_8/make_webform_standard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v6_8/move_drop_ship_to_po_items.py b/erpnext/patches/v6_8/move_drop_ship_to_po_items.py index 06d158e4ec..7184deeccc 100644 --- a/erpnext/patches/v6_8/move_drop_ship_to_po_items.py +++ b/erpnext/patches/v6_8/move_drop_ship_to_po_items.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_0/calculate_total_costing_amount.py b/erpnext/patches/v7_0/calculate_total_costing_amount.py index 11fdff9abd..8ed60a2955 100644 --- a/erpnext/patches/v7_0/calculate_total_costing_amount.py +++ b/erpnext/patches/v7_0/calculate_total_costing_amount.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.utils import flt diff --git a/erpnext/patches/v7_0/convert_timelog_to_timesheet.py b/erpnext/patches/v7_0/convert_timelog_to_timesheet.py index 4177e07630..3af6622d96 100644 --- a/erpnext/patches/v7_0/convert_timelog_to_timesheet.py +++ b/erpnext/patches/v7_0/convert_timelog_to_timesheet.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_0/convert_timelogbatch_to_timesheet.py b/erpnext/patches/v7_0/convert_timelogbatch_to_timesheet.py index 83c738ef07..e78f163e07 100644 --- a/erpnext/patches/v7_0/convert_timelogbatch_to_timesheet.py +++ b/erpnext/patches/v7_0/convert_timelogbatch_to_timesheet.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.utils import cint diff --git a/erpnext/patches/v7_0/create_budget_record.py b/erpnext/patches/v7_0/create_budget_record.py index 607ef69096..fd8bec9f32 100644 --- a/erpnext/patches/v7_0/create_budget_record.py +++ b/erpnext/patches/v7_0/create_budget_record.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from erpnext.accounts.doctype.budget.budget import DuplicateBudgetError diff --git a/erpnext/patches/v7_0/fix_duplicate_icons.py b/erpnext/patches/v7_0/fix_duplicate_icons.py index f6d227d304..9f442029b5 100644 --- a/erpnext/patches/v7_0/fix_duplicate_icons.py +++ b/erpnext/patches/v7_0/fix_duplicate_icons.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.desk.doctype.desktop_icon.desktop_icon import (sync_desktop_icons, diff --git a/erpnext/patches/v7_0/merge_account_type_stock_and_warehouse_to_stock.py b/erpnext/patches/v7_0/merge_account_type_stock_and_warehouse_to_stock.py index 6141792b8f..02808a742f 100644 --- a/erpnext/patches/v7_0/merge_account_type_stock_and_warehouse_to_stock.py +++ b/erpnext/patches/v7_0/merge_account_type_stock_and_warehouse_to_stock.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_0/move_timelogbatch_from_salesinvoiceitem_to_salesinvoicetimesheet.py b/erpnext/patches/v7_0/move_timelogbatch_from_salesinvoiceitem_to_salesinvoicetimesheet.py index 727a44ee28..998c4b674b 100644 --- a/erpnext/patches/v7_0/move_timelogbatch_from_salesinvoiceitem_to_salesinvoicetimesheet.py +++ b/erpnext/patches/v7_0/move_timelogbatch_from_salesinvoiceitem_to_salesinvoicetimesheet.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_0/re_route.py b/erpnext/patches/v7_0/re_route.py index 1db492094b..3cec6f39b2 100644 --- a/erpnext/patches/v7_0/re_route.py +++ b/erpnext/patches/v7_0/re_route.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe.patches.v7_0.re_route import update_routes def execute(): diff --git a/erpnext/patches/v7_0/remove_doctypes_and_reports.py b/erpnext/patches/v7_0/remove_doctypes_and_reports.py index 03461dee1f..746cae0e1c 100644 --- a/erpnext/patches/v7_0/remove_doctypes_and_reports.py +++ b/erpnext/patches/v7_0/remove_doctypes_and_reports.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_0/remove_features_setup.py b/erpnext/patches/v7_0/remove_features_setup.py index 596f7a9dcf..49393cc248 100644 --- a/erpnext/patches/v7_0/remove_features_setup.py +++ b/erpnext/patches/v7_0/remove_features_setup.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from erpnext.setup.install import create_compact_item_print_custom_field diff --git a/erpnext/patches/v7_0/rename_prevdoc_fields.py b/erpnext/patches/v7_0/rename_prevdoc_fields.py index d189056b0c..ded4ad4aae 100644 --- a/erpnext/patches/v7_0/rename_prevdoc_fields.py +++ b/erpnext/patches/v7_0/rename_prevdoc_fields.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe import json from frappe.model.utils.rename_field import update_reports, rename_field, update_property_setters diff --git a/erpnext/patches/v7_0/rename_salary_components.py b/erpnext/patches/v7_0/rename_salary_components.py index 8409ca842d..de92fc6083 100644 --- a/erpnext/patches/v7_0/rename_salary_components.py +++ b/erpnext/patches/v7_0/rename_salary_components.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import update_property_setters diff --git a/erpnext/patches/v7_0/rename_time_sheet_doctype.py b/erpnext/patches/v7_0/rename_time_sheet_doctype.py index a00804518b..f80a8301d7 100644 --- a/erpnext/patches/v7_0/rename_time_sheet_doctype.py +++ b/erpnext/patches/v7_0/rename_time_sheet_doctype.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_0/set_is_group_for_warehouse.py b/erpnext/patches/v7_0/set_is_group_for_warehouse.py index d3aca216cb..3e69616b80 100644 --- a/erpnext/patches/v7_0/set_is_group_for_warehouse.py +++ b/erpnext/patches/v7_0/set_is_group_for_warehouse.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_0/update_home_page.py b/erpnext/patches/v7_0/update_home_page.py index ed88e203e6..909825c572 100644 --- a/erpnext/patches/v7_0/update_home_page.py +++ b/erpnext/patches/v7_0/update_home_page.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe import erpnext diff --git a/erpnext/patches/v7_0/update_mins_to_first_response.py b/erpnext/patches/v7_0/update_mins_to_first_response.py index a89a9c8129..1df4b42ced 100644 --- a/erpnext/patches/v7_0/update_mins_to_first_response.py +++ b/erpnext/patches/v7_0/update_mins_to_first_response.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.core.doctype.communication.email import update_mins_to_first_communication diff --git a/erpnext/patches/v7_0/update_party_status.py b/erpnext/patches/v7_0/update_party_status.py index 9ca3d02b9d..0c6b4ea598 100644 --- a/erpnext/patches/v7_0/update_party_status.py +++ b/erpnext/patches/v7_0/update_party_status.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_0/update_prevdoc_values_for_supplier_quotation_item.py b/erpnext/patches/v7_0/update_prevdoc_values_for_supplier_quotation_item.py index 1c41ec8e80..e90de50c1e 100644 --- a/erpnext/patches/v7_0/update_prevdoc_values_for_supplier_quotation_item.py +++ b/erpnext/patches/v7_0/update_prevdoc_values_for_supplier_quotation_item.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_0/update_project_in_gl_entry.py b/erpnext/patches/v7_0/update_project_in_gl_entry.py index 7f9923b396..d99e9a41e3 100644 --- a/erpnext/patches/v7_0/update_project_in_gl_entry.py +++ b/erpnext/patches/v7_0/update_project_in_gl_entry.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_1/add_field_for_task_dependent.py b/erpnext/patches/v7_1/add_field_for_task_dependent.py index 96daa13918..65b1c74e87 100644 --- a/erpnext/patches/v7_1/add_field_for_task_dependent.py +++ b/erpnext/patches/v7_1/add_field_for_task_dependent.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_1/fix_link_for_customer_from_lead.py b/erpnext/patches/v7_1/fix_link_for_customer_from_lead.py index cbb3ea4092..33f809fe37 100644 --- a/erpnext/patches/v7_1/fix_link_for_customer_from_lead.py +++ b/erpnext/patches/v7_1/fix_link_for_customer_from_lead.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_1/set_budget_against_as_cost_center.py b/erpnext/patches/v7_1/set_budget_against_as_cost_center.py index 1d334a5012..dd9a432cf0 100644 --- a/erpnext/patches/v7_1/set_budget_against_as_cost_center.py +++ b/erpnext/patches/v7_1/set_budget_against_as_cost_center.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_1/set_currency_exchange_date.py b/erpnext/patches/v7_1/set_currency_exchange_date.py index 630b7d4229..2a2d420f21 100644 --- a/erpnext/patches/v7_1/set_currency_exchange_date.py +++ b/erpnext/patches/v7_1/set_currency_exchange_date.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_1/set_student_guardian.py b/erpnext/patches/v7_1/set_student_guardian.py index 0942505b56..093c0bf6d9 100644 --- a/erpnext/patches/v7_1/set_student_guardian.py +++ b/erpnext/patches/v7_1/set_student_guardian.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_1/set_total_amount_currency_in_je.py b/erpnext/patches/v7_1/set_total_amount_currency_in_je.py index eb4a347a32..8426ddcd7d 100644 --- a/erpnext/patches/v7_1/set_total_amount_currency_in_je.py +++ b/erpnext/patches/v7_1/set_total_amount_currency_in_je.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from erpnext import get_default_currency diff --git a/erpnext/patches/v7_1/update_bom_base_currency.py b/erpnext/patches/v7_1/update_bom_base_currency.py index c8af0333cb..9a59209ea5 100644 --- a/erpnext/patches/v7_1/update_bom_base_currency.py +++ b/erpnext/patches/v7_1/update_bom_base_currency.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from erpnext import get_default_currency diff --git a/erpnext/patches/v7_1/update_component_type.py b/erpnext/patches/v7_1/update_component_type.py index aecbc9fac2..552fc89467 100644 --- a/erpnext/patches/v7_1/update_component_type.py +++ b/erpnext/patches/v7_1/update_component_type.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.utils import flt diff --git a/erpnext/patches/v7_1/update_lead_source.py b/erpnext/patches/v7_1/update_lead_source.py index 7fd4c14ed1..517e66c4bc 100644 --- a/erpnext/patches/v7_1/update_lead_source.py +++ b/erpnext/patches/v7_1/update_lead_source.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/patches/v7_1/update_portal_roles.py b/erpnext/patches/v7_1/update_portal_roles.py index 72e9434c26..482586b8ef 100644 --- a/erpnext/patches/v7_1/update_portal_roles.py +++ b/erpnext/patches/v7_1/update_portal_roles.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_2/arrear_leave_encashment_as_salary_component.py b/erpnext/patches/v7_2/arrear_leave_encashment_as_salary_component.py index 13a2bb8d5a..3b9642dd3b 100644 --- a/erpnext/patches/v7_2/arrear_leave_encashment_as_salary_component.py +++ b/erpnext/patches/v7_2/arrear_leave_encashment_as_salary_component.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_2/contact_address_links.py b/erpnext/patches/v7_2/contact_address_links.py index cf23e88798..200434c208 100644 --- a/erpnext/patches/v7_2/contact_address_links.py +++ b/erpnext/patches/v7_2/contact_address_links.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.core.doctype.dynamic_link.dynamic_link import deduplicate_dynamic_links from frappe.utils import update_progress_bar diff --git a/erpnext/patches/v7_2/mark_students_active.py b/erpnext/patches/v7_2/mark_students_active.py index 0a2f2d3c10..7289e4a915 100644 --- a/erpnext/patches/v7_2/mark_students_active.py +++ b/erpnext/patches/v7_2/mark_students_active.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_2/rename_att_date_attendance.py b/erpnext/patches/v7_2/rename_att_date_attendance.py index b2658ba7f1..7f06d8f123 100644 --- a/erpnext/patches/v7_2/rename_att_date_attendance.py +++ b/erpnext/patches/v7_2/rename_att_date_attendance.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import update_reports, update_users_report_view_settings, update_property_setters diff --git a/erpnext/patches/v7_2/rename_evaluation_criteria.py b/erpnext/patches/v7_2/rename_evaluation_criteria.py index d74976084b..c6520b1b72 100644 --- a/erpnext/patches/v7_2/rename_evaluation_criteria.py +++ b/erpnext/patches/v7_2/rename_evaluation_criteria.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v7_2/stock_uom_in_selling.py b/erpnext/patches/v7_2/stock_uom_in_selling.py index 875fc4e6b9..d029555747 100644 --- a/erpnext/patches/v7_2/stock_uom_in_selling.py +++ b/erpnext/patches/v7_2/stock_uom_in_selling.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_2/update_abbr_in_salary_slips.py b/erpnext/patches/v7_2/update_abbr_in_salary_slips.py index aa6965f17c..19dcb5e3b2 100644 --- a/erpnext/patches/v7_2/update_abbr_in_salary_slips.py +++ b/erpnext/patches/v7_2/update_abbr_in_salary_slips.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_2/update_assessment_modules.py b/erpnext/patches/v7_2/update_assessment_modules.py index 37ae7c77f8..2b5e774d46 100644 --- a/erpnext/patches/v7_2/update_assessment_modules.py +++ b/erpnext/patches/v7_2/update_assessment_modules.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v7_2/update_attendance_docstatus.py b/erpnext/patches/v7_2/update_attendance_docstatus.py index 863c0c02bb..a69052657d 100644 --- a/erpnext/patches/v7_2/update_attendance_docstatus.py +++ b/erpnext/patches/v7_2/update_attendance_docstatus.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v7_2/update_guardian_name_in_student_master.py b/erpnext/patches/v7_2/update_guardian_name_in_student_master.py index 163e7c3d19..9f589ef00e 100644 --- a/erpnext/patches/v7_2/update_guardian_name_in_student_master.py +++ b/erpnext/patches/v7_2/update_guardian_name_in_student_master.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.model.utils.rename_field import rename_field diff --git a/erpnext/patches/v7_2/update_salary_slips.py b/erpnext/patches/v7_2/update_salary_slips.py index c6bca8e7b9..11a52f9587 100644 --- a/erpnext/patches/v7_2/update_salary_slips.py +++ b/erpnext/patches/v7_2/update_salary_slips.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from erpnext.hr.doctype.payroll_entry.payroll_entry import get_month_details from frappe.utils import cint diff --git a/erpnext/patches/v7_2/update_website_for_variant.py b/erpnext/patches/v7_2/update_website_for_variant.py index 639569883e..e8eef6e7da 100644 --- a/erpnext/patches/v7_2/update_website_for_variant.py +++ b/erpnext/patches/v7_2/update_website_for_variant.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v8_0/addresses_linked_to_lead.py b/erpnext/patches/v8_0/addresses_linked_to_lead.py index c485b5b10a..b5f2234228 100644 --- a/erpnext/patches/v8_0/addresses_linked_to_lead.py +++ b/erpnext/patches/v8_0/addresses_linked_to_lead.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v8_1/add_hsn_sac_codes.py b/erpnext/patches/v8_1/add_hsn_sac_codes.py index 0b54f15d3b..0fce96a8d4 100644 --- a/erpnext/patches/v8_1/add_hsn_sac_codes.py +++ b/erpnext/patches/v8_1/add_hsn_sac_codes.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from erpnext.regional.india.setup import setup diff --git a/erpnext/patches/v8_1/add_indexes_in_transaction_doctypes.py b/erpnext/patches/v8_1/add_indexes_in_transaction_doctypes.py index 2fa0221ed7..4631602606 100644 --- a/erpnext/patches/v8_1/add_indexes_in_transaction_doctypes.py +++ b/erpnext/patches/v8_1/add_indexes_in_transaction_doctypes.py @@ -1,6 +1,7 @@ # 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 def execute(): diff --git a/erpnext/patches/v8_1/allow_invoice_copy_to_edit_after_submit.py b/erpnext/patches/v8_1/allow_invoice_copy_to_edit_after_submit.py index 1fb297f288..4c606af424 100644 --- a/erpnext/patches/v8_1/allow_invoice_copy_to_edit_after_submit.py +++ b/erpnext/patches/v8_1/allow_invoice_copy_to_edit_after_submit.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v8_1/gst_fixes.py b/erpnext/patches/v8_1/gst_fixes.py index b47879c08d..22fa53ba37 100644 --- a/erpnext/patches/v8_1/gst_fixes.py +++ b/erpnext/patches/v8_1/gst_fixes.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.custom.doctype.custom_field.custom_field import create_custom_field from erpnext.regional.india.setup import update_address_template diff --git a/erpnext/patches/v8_1/set_delivery_date_in_so_item.py b/erpnext/patches/v8_1/set_delivery_date_in_so_item.py index 2e81571072..af2d28b857 100644 --- a/erpnext/patches/v8_1/set_delivery_date_in_so_item.py +++ b/erpnext/patches/v8_1/set_delivery_date_in_so_item.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v8_1/setup_gst_india.py b/erpnext/patches/v8_1/setup_gst_india.py index 5370fa2aa5..e8b017d864 100644 --- a/erpnext/patches/v8_1/setup_gst_india.py +++ b/erpnext/patches/v8_1/setup_gst_india.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.email import sendmail_to_system_managers diff --git a/erpnext/patches/v8_1/update_gst_state.py b/erpnext/patches/v8_1/update_gst_state.py index 5fb9be0445..7aaf2d5ff3 100644 --- a/erpnext/patches/v8_1/update_gst_state.py +++ b/erpnext/patches/v8_1/update_gst_state.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from erpnext.regional.india import states diff --git a/erpnext/patches/v8_5/fix_tax_breakup_for_non_invoice_docs.py b/erpnext/patches/v8_5/fix_tax_breakup_for_non_invoice_docs.py index fe9befe265..82beba3770 100644 --- a/erpnext/patches/v8_5/fix_tax_breakup_for_non_invoice_docs.py +++ b/erpnext/patches/v8_5/fix_tax_breakup_for_non_invoice_docs.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from erpnext.regional.india.setup import make_custom_fields from erpnext.controllers.taxes_and_totals import get_itemised_tax_breakup_html diff --git a/erpnext/patches/v8_5/remove_project_type_property_setter.py b/erpnext/patches/v8_5/remove_project_type_property_setter.py index 03d128d3ec..70a08f5377 100644 --- a/erpnext/patches/v8_5/remove_project_type_property_setter.py +++ b/erpnext/patches/v8_5/remove_project_type_property_setter.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v8_5/update_customer_group_in_POS_profile.py b/erpnext/patches/v8_5/update_customer_group_in_POS_profile.py index 9a5fef90c8..2661914401 100644 --- a/erpnext/patches/v8_5/update_customer_group_in_POS_profile.py +++ b/erpnext/patches/v8_5/update_customer_group_in_POS_profile.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v8_6/rename_bom_update_tool.py b/erpnext/patches/v8_6/rename_bom_update_tool.py index 45a4ddc788..ef5f335e45 100644 --- a/erpnext/patches/v8_6/rename_bom_update_tool.py +++ b/erpnext/patches/v8_6/rename_bom_update_tool.py @@ -1,4 +1,6 @@ +from __future__ import unicode_literals import frappe + def execute(): frappe.delete_doc_if_exists("DocType", "BOM Replace Tool") diff --git a/erpnext/patches/v8_7/fix_purchase_receipt_status.py b/erpnext/patches/v8_7/fix_purchase_receipt_status.py index f7037dd7df..99ecb44214 100644 --- a/erpnext/patches/v8_7/fix_purchase_receipt_status.py +++ b/erpnext/patches/v8_7/fix_purchase_receipt_status.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v8_7/sync_india_custom_fields.py b/erpnext/patches/v8_7/sync_india_custom_fields.py index 323b5bcd3e..c684b24b2b 100644 --- a/erpnext/patches/v8_7/sync_india_custom_fields.py +++ b/erpnext/patches/v8_7/sync_india_custom_fields.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from erpnext.regional.india.setup import make_custom_fields diff --git a/erpnext/patches/v8_9/delete_gst_doctypes_for_outside_india_accounts.py b/erpnext/patches/v8_9/delete_gst_doctypes_for_outside_india_accounts.py index 2b4ac58a67..f67af90555 100644 --- a/erpnext/patches/v8_9/delete_gst_doctypes_for_outside_india_accounts.py +++ b/erpnext/patches/v8_9/delete_gst_doctypes_for_outside_india_accounts.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v8_9/remove_employee_from_salary_structure_parent.py b/erpnext/patches/v8_9/remove_employee_from_salary_structure_parent.py index 4ab9cf3ec8..808ae6d527 100644 --- a/erpnext/patches/v8_9/remove_employee_from_salary_structure_parent.py +++ b/erpnext/patches/v8_9/remove_employee_from_salary_structure_parent.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v8_9/set_default_customer_group.py b/erpnext/patches/v8_9/set_default_customer_group.py index e6351c41fd..cbbe09daf5 100644 --- a/erpnext/patches/v8_9/set_default_customer_group.py +++ b/erpnext/patches/v8_9/set_default_customer_group.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v8_9/set_member_party_type.py b/erpnext/patches/v8_9/set_member_party_type.py index 2934c70ad5..33bbc11a93 100644 --- a/erpnext/patches/v8_9/set_member_party_type.py +++ b/erpnext/patches/v8_9/set_member_party_type.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v9_0/remove_non_existing_warehouse_from_stock_settings.py b/erpnext/patches/v9_0/remove_non_existing_warehouse_from_stock_settings.py index 33dc5192d1..c685bbc681 100644 --- a/erpnext/patches/v9_0/remove_non_existing_warehouse_from_stock_settings.py +++ b/erpnext/patches/v9_0/remove_non_existing_warehouse_from_stock_settings.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v9_0/revert_manufacturing_user_role.py b/erpnext/patches/v9_0/revert_manufacturing_user_role.py index 5bfa8c3f9a..f38b7f29ce 100644 --- a/erpnext/patches/v9_0/revert_manufacturing_user_role.py +++ b/erpnext/patches/v9_0/revert_manufacturing_user_role.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v9_0/set_variant_item_description.py b/erpnext/patches/v9_0/set_variant_item_description.py index c844571506..82d6148508 100644 --- a/erpnext/patches/v9_0/set_variant_item_description.py +++ b/erpnext/patches/v9_0/set_variant_item_description.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.utils import cstr diff --git a/erpnext/patches/v9_2/delete_healthcare_domain_default_items.py b/erpnext/patches/v9_2/delete_healthcare_domain_default_items.py index 187cbd3f9a..54ae18b8e2 100644 --- a/erpnext/patches/v9_2/delete_healthcare_domain_default_items.py +++ b/erpnext/patches/v9_2/delete_healthcare_domain_default_items.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe.utils import getdate diff --git a/erpnext/patches/v9_2/delete_process_payroll.py b/erpnext/patches/v9_2/delete_process_payroll.py index e9e1b99c06..91c49f577f 100644 --- a/erpnext/patches/v9_2/delete_process_payroll.py +++ b/erpnext/patches/v9_2/delete_process_payroll.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v9_2/remove_company_from_patient.py b/erpnext/patches/v9_2/remove_company_from_patient.py index 1ce344501d..1a50088f23 100644 --- a/erpnext/patches/v9_2/remove_company_from_patient.py +++ b/erpnext/patches/v9_2/remove_company_from_patient.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v9_2/rename_translated_domains_in_en.py b/erpnext/patches/v9_2/rename_translated_domains_in_en.py index fc3d01cc60..aec5d438ec 100644 --- a/erpnext/patches/v9_2/rename_translated_domains_in_en.py +++ b/erpnext/patches/v9_2/rename_translated_domains_in_en.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe import _ diff --git a/erpnext/patches/v9_2/repost_reserved_qty_for_production.py b/erpnext/patches/v9_2/repost_reserved_qty_for_production.py index c4eab19d2e..040e655bd8 100644 --- a/erpnext/patches/v9_2/repost_reserved_qty_for_production.py +++ b/erpnext/patches/v9_2/repost_reserved_qty_for_production.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/patches/v9_2/set_item_name_in_production_order.py b/erpnext/patches/v9_2/set_item_name_in_production_order.py index 18b5b8cdc6..1f490e62c8 100644 --- a/erpnext/patches/v9_2/set_item_name_in_production_order.py +++ b/erpnext/patches/v9_2/set_item_name_in_production_order.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def execute(): diff --git a/erpnext/portal/utils.py b/erpnext/portal/utils.py index 93fe5da693..2e710c75f3 100644 --- a/erpnext/portal/utils.py +++ b/erpnext/portal/utils.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def set_default_role(doc, method): diff --git a/erpnext/projects/doctype/project/project_dashboard.py b/erpnext/projects/doctype/project/project_dashboard.py index 485aae77e7..39cf016d61 100644 --- a/erpnext/projects/doctype/project/project_dashboard.py +++ b/erpnext/projects/doctype/project/project_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/regional/__init__.py b/erpnext/regional/__init__.py index 1bd3357a81..dc14d04960 100644 --- a/erpnext/regional/__init__.py +++ b/erpnext/regional/__init__.py @@ -1,6 +1,7 @@ # Copyright (c) 2018, Frappe Technologies and contributors # For license information, please see license.txt +from __future__ import unicode_literals import frappe from frappe import _ from erpnext import get_region diff --git a/erpnext/regional/france/utils.py b/erpnext/regional/france/utils.py index 9e9f0ad9be..e4b72f6586 100644 --- a/erpnext/regional/france/utils.py +++ b/erpnext/regional/france/utils.py @@ -1,6 +1,7 @@ # Copyright (c) 2018, Frappe Technologies and contributors # For license information, please see license.txt +from __future__ import unicode_literals import frappe from frappe import _ from erpnext import get_region diff --git a/erpnext/regional/india/__init__.py b/erpnext/regional/india/__init__.py index 4a9a211b41..46c874b252 100644 --- a/erpnext/regional/india/__init__.py +++ b/erpnext/regional/india/__init__.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + states = [ '', 'Andaman and Nicobar Islands', diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index a1fba072b2..fd9ac4c81b 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe, re from frappe import _ from frappe.utils import cstr, flt, date_diff, getdate diff --git a/erpnext/regional/united_arab_emirates/utils.py b/erpnext/regional/united_arab_emirates/utils.py index 61ffadb443..a01c6ceec3 100644 --- a/erpnext/regional/united_arab_emirates/utils.py +++ b/erpnext/regional/united_arab_emirates/utils.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe.utils import flt from erpnext.controllers.taxes_and_totals import get_itemised_tax diff --git a/erpnext/restaurant/doctype/restaurant/restaurant_dashboard.py b/erpnext/restaurant/doctype/restaurant/restaurant_dashboard.py index 1f84ccf1d8..ec62ba22b4 100644 --- a/erpnext/restaurant/doctype/restaurant/restaurant_dashboard.py +++ b/erpnext/restaurant/doctype/restaurant/restaurant_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/selling/doctype/customer/customer_dashboard.py b/erpnext/selling/doctype/customer/customer_dashboard.py index bf01363bd6..f2f430a61e 100644 --- a/erpnext/selling/doctype/customer/customer_dashboard.py +++ b/erpnext/selling/doctype/customer/customer_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/selling/doctype/quotation/quotation_dashboard.py b/erpnext/selling/doctype/quotation/quotation_dashboard.py index d32fd0cfed..f1ac951ef9 100644 --- a/erpnext/selling/doctype/quotation/quotation_dashboard.py +++ b/erpnext/selling/doctype/quotation/quotation_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/selling/doctype/sales_order/sales_order_dashboard.py b/erpnext/selling/doctype/sales_order/sales_order_dashboard.py index 35c643de6c..aab6db2584 100644 --- a/erpnext/selling/doctype/sales_order/sales_order_dashboard.py +++ b/erpnext/selling/doctype/sales_order/sales_order_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): 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 f2b7701b10..f2518f09f8 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,6 +1,7 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt +from __future__ import unicode_literals import unittest from frappe.utils import nowdate, add_months from erpnext.selling.report.pending_so_items_for_purchase_request.pending_so_items_for_purchase_request\ diff --git a/erpnext/selling/report/sales_analytics/test_analytics.py b/erpnext/selling/report/sales_analytics/test_analytics.py index 5d68b06b6d..4d81a1e4dd 100644 --- a/erpnext/selling/report/sales_analytics/test_analytics.py +++ b/erpnext/selling/report/sales_analytics/test_analytics.py @@ -1,6 +1,7 @@ # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt +from __future__ import unicode_literals import frappe import frappe.defaults import unittest diff --git a/erpnext/setup/doctype/company/company_dashboard.py b/erpnext/setup/doctype/company/company_dashboard.py index 5efcf3839f..9b483dd55e 100644 --- a/erpnext/setup/doctype/company/company_dashboard.py +++ b/erpnext/setup/doctype/company/company_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/setup/doctype/sales_person/sales_person_dashboard.py b/erpnext/setup/doctype/sales_person/sales_person_dashboard.py index 42528d8832..3d0b2ff7f8 100644 --- a/erpnext/setup/doctype/sales_person/sales_person_dashboard.py +++ b/erpnext/setup/doctype/sales_person/sales_person_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/setup/setup_wizard/data/industry_type.py b/erpnext/setup/setup_wizard/data/industry_type.py index 74a10ff56a..4fa9f8abb1 100644 --- a/erpnext/setup/setup_wizard/data/industry_type.py +++ b/erpnext/setup/setup_wizard/data/industry_type.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_industry_types(): diff --git a/erpnext/setup/setup_wizard/utils.py b/erpnext/setup/setup_wizard/utils.py index d821a12989..e82bc96d93 100644 --- a/erpnext/setup/setup_wizard/utils.py +++ b/erpnext/setup/setup_wizard/utils.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import json, os from frappe.desk.page.setup_wizard.setup_wizard import setup_complete diff --git a/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py b/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py index 63c32a4b93..beeb9ebb05 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py +++ b/erpnext/stock/doctype/delivery_note/delivery_note_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/stock/doctype/item/item_dashboard.py b/erpnext/stock/doctype/item/item_dashboard.py index c571355cad..8e4f74ddbb 100644 --- a/erpnext/stock/doctype/item/item_dashboard.py +++ b/erpnext/stock/doctype/item/item_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/stock/doctype/item_attribute/test_item_attribute.py b/erpnext/stock/doctype/item_attribute/test_item_attribute.py index 6357b52569..61e53d24a4 100644 --- a/erpnext/stock/doctype/item_attribute/test_item_attribute.py +++ b/erpnext/stock/doctype/item_attribute/test_item_attribute.py @@ -1,6 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt +from __future__ import unicode_literals import frappe import unittest diff --git a/erpnext/stock/doctype/material_request/material_request_dashboard.py b/erpnext/stock/doctype/material_request/material_request_dashboard.py index 6cfb8af0a2..adfab86cc4 100644 --- a/erpnext/stock/doctype/material_request/material_request_dashboard.py +++ b/erpnext/stock/doctype/material_request/material_request_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py index a517703c9a..3832c827e2 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_dashboard.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from frappe import _ def get_data(): diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index a4eb2bb15d..472083b5a1 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -1,8 +1,7 @@ # 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 import frappe, erpnext import frappe.defaults @@ -352,7 +351,7 @@ class TestPurchaseReceipt(unittest.TestCase): set_perpetual_inventory(1, "_Test Company") pr = make_purchase_receipt(cost_center=cost_center) - + stock_in_hand_account = get_inventory_account(pr.company, pr.get("items")[0].warehouse) gl_entries = get_gl_entries("Purchase Receipt", pr.name) diff --git a/erpnext/stock/doctype/quality_inspection/test_quality_inspection.py b/erpnext/stock/doctype/quality_inspection/test_quality_inspection.py index 0f0b4016e2..bb535c1f6a 100644 --- a/erpnext/stock/doctype/quality_inspection/test_quality_inspection.py +++ b/erpnext/stock/doctype/quality_inspection/test_quality_inspection.py @@ -1,6 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors # See license.txt +from __future__ import unicode_literals import frappe import unittest from frappe.utils import nowdate diff --git a/erpnext/stock/doctype/stock_entry/stock_entry_utils.py b/erpnext/stock/doctype/stock_entry/stock_entry_utils.py index 6b4ca18191..7a3433819d 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry_utils.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry_utils.py @@ -1,6 +1,7 @@ # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt +from __future__ import unicode_literals import frappe, erpnext from frappe.utils import cint, flt diff --git a/erpnext/stock/reorder_item.py b/erpnext/stock/reorder_item.py index 1578bb68ce..39fb024023 100644 --- a/erpnext/stock/reorder_item.py +++ b/erpnext/stock/reorder_item.py @@ -1,6 +1,7 @@ # 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 erpnext from frappe.utils import flt, nowdate, add_days, cint @@ -138,7 +139,7 @@ def create_material_request(material_requests): if request_type == 'Purchase': uom = item.purchase_uom or item.stock_uom if uom != item.stock_uom: - conversion_factor = frappe.db.get_value("UOM Conversion Detail", + conversion_factor = frappe.db.get_value("UOM Conversion Detail", {'parent': item.name, 'uom': uom}, 'conversion_factor') or 1.0 mr.append("items", { diff --git a/erpnext/templates/pages/non_profit/join_chapter.py b/erpnext/templates/pages/non_profit/join_chapter.py index 121f4440eb..aa54a58eeb 100644 --- a/erpnext/templates/pages/non_profit/join_chapter.py +++ b/erpnext/templates/pages/non_profit/join_chapter.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def get_context(context): diff --git a/erpnext/templates/pages/non_profit/leave_chapter.py b/erpnext/templates/pages/non_profit/leave_chapter.py index da2d819eb7..21cb722b88 100644 --- a/erpnext/templates/pages/non_profit/leave_chapter.py +++ b/erpnext/templates/pages/non_profit/leave_chapter.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe def get_context(context): diff --git a/erpnext/templates/pages/regional/india/update_gstin.py b/erpnext/templates/pages/regional/india/update_gstin.py index 5493e544b7..f555db0d72 100644 --- a/erpnext/templates/pages/regional/india/update_gstin.py +++ b/erpnext/templates/pages/regional/india/update_gstin.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe from frappe import _ from six import iteritems diff --git a/erpnext/tests/test_init.py b/erpnext/tests/test_init.py index 43340ce37a..abc04a8808 100644 --- a/erpnext/tests/test_init.py +++ b/erpnext/tests/test_init.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import unittest import frappe diff --git a/erpnext/tests/test_regional.py b/erpnext/tests/test_regional.py index 7bd6fa8238..282fc6454b 100644 --- a/erpnext/tests/test_regional.py +++ b/erpnext/tests/test_regional.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import unittest, frappe, erpnext @erpnext.allow_regional diff --git a/erpnext/tests/test_woocommerce.py b/erpnext/tests/test_woocommerce.py index 0347e953f4..373d0a0ca4 100644 --- a/erpnext/tests/test_woocommerce.py +++ b/erpnext/tests/test_woocommerce.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import unittest, frappe, requests, os, time, erpnext from erpnext.erpnext_integrations.connectors.woocommerce_connection import order diff --git a/erpnext/utilities/__init__.py b/erpnext/utilities/__init__.py index 7912a59aa8..618cc985ae 100644 --- a/erpnext/utilities/__init__.py +++ b/erpnext/utilities/__init__.py @@ -1,5 +1,5 @@ ## temp utility -from __future__ import print_function +from __future__ import print_function, unicode_literals import frappe from erpnext.utilities.activation import get_level from frappe.utils import cstr diff --git a/erpnext/utilities/activation.py b/erpnext/utilities/activation.py index 8ad042b74a..16391e073e 100644 --- a/erpnext/utilities/activation.py +++ b/erpnext/utilities/activation.py @@ -1,6 +1,7 @@ # 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, erpnext from frappe import _ diff --git a/erpnext/utilities/user_progress.py b/erpnext/utilities/user_progress.py index 2901d52276..402f1bb367 100644 --- a/erpnext/utilities/user_progress.py +++ b/erpnext/utilities/user_progress.py @@ -1,6 +1,7 @@ # 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, erpnext from frappe import _ from erpnext.setup.doctype.setup_progress.setup_progress import get_action_completed_state diff --git a/erpnext/utilities/user_progress_utils.py b/erpnext/utilities/user_progress_utils.py index a665c5dbbd..b7c24a71ba 100644 --- a/erpnext/utilities/user_progress_utils.py +++ b/erpnext/utilities/user_progress_utils.py @@ -1,6 +1,7 @@ # 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, erpnext import json diff --git a/erpnext/www/payment_setup_certification.py b/erpnext/www/payment_setup_certification.py index 185c220942..3ec8ca013e 100644 --- a/erpnext/www/payment_setup_certification.py +++ b/erpnext/www/payment_setup_certification.py @@ -1,3 +1,4 @@ +from __future__ import unicode_literals import frappe import foundation diff --git a/setup.py b/setup.py index 71107a9a2f..a864e73831 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from __future__ import unicode_literals from setuptools import setup, find_packages import re, ast