Merge branch 'staging-fixes' into pos_issue
diff --git a/README.md b/README.md
index f4a08be..8c13e1e 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@
 
 ERPNext is built on the [Frappe](https://github.com/frappe/frappe) Framework, a full-stack web app framework in Python & JavaScript.
 
-- [User Guide](https://erpnext.org/docs/user)
+- [User Guide](https://erpnext.com/docs/user)
 - [Discussion Forum](https://discuss.erpnext.com/)
 
 ---
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 9b812a8..bcb163f 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 bf1e967..014cf45 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 6e7b687..43ebcb0 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 834d105..efbf4eb 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 80ac69f..6b93f92 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_dashboard.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_dashboard.py
index f101b6a..173939d 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 40ca736..3e013f5 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.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index 91a44b3..8911ddf 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -217,6 +217,9 @@
 		this.get_terms();
 	},
 	customer: function() {
+		if (this.frm.doc.is_pos){
+			var pos_profile = this.frm.doc.pos_profile;
+		}
 		var me = this;
 		if(this.frm.updating_party_details) return;
 		erpnext.utils.get_party_details(this.frm,
@@ -226,6 +229,7 @@
 				party_type: "Customer",
 				account: this.frm.doc.debit_to,
 				price_list: this.frm.doc.selling_price_list,
+				pos_profile: pos_profile
 			}, function() {
 				me.apply_pricing_rule();
 			});
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index 6072fb8..895ca07 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -398,11 +398,16 @@
 				self.account_for_change_amount = pos.get('account_for_change_amount')
 
 			for fieldname in ('territory', 'naming_series', 'currency', 'taxes_and_charges', 'letter_head', 'tc_name',
-				'selling_price_list', 'company', 'select_print_heading', 'cash_bank_account', 'company_address',
+				'company', 'select_print_heading', 'cash_bank_account', 'company_address',
 				'write_off_account', 'write_off_cost_center', 'apply_discount_on'):
 					if (not for_validate) or (for_validate and not self.get(fieldname)):
 						self.set(fieldname, pos.get(fieldname))
 
+			customer_price_list = frappe.get_value("Customer", self.customer, 'default_price_list')
+
+			if not customer_price_list:
+				self.set('selling_price_list', pos.get('selling_price_list'))
+
 			if not for_validate:
 				self.update_stock = cint(pos.get("update_stock"))
 
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice_dashboard.py
index 71fce77..28da815 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/party.py b/erpnext/accounts/party.py
index 1e1f8b5..5855ac3 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -22,18 +22,20 @@
 
 @frappe.whitelist()
 def get_party_details(party=None, account=None, party_type="Customer", company=None, posting_date=None,
-	bill_date=None, price_list=None, currency=None, doctype=None, ignore_permissions=False, fetch_payment_terms_template=True, party_address=None, shipping_address=None):
+	bill_date=None, price_list=None, currency=None, doctype=None, ignore_permissions=False, fetch_payment_terms_template=True,
+	party_address=None, shipping_address=None, pos_profile=None):
 
 	if not party:
 		return {}
 	if not frappe.db.exists(party_type, party):
 		frappe.throw(_("{0}: {1} does not exists").format(party_type, party))
 	return _get_party_details(party, account, party_type,
-		company, posting_date, bill_date, price_list, currency, doctype, ignore_permissions, fetch_payment_terms_template, party_address, shipping_address)
+		company, posting_date, bill_date, price_list, currency, doctype, ignore_permissions,
+		fetch_payment_terms_template, party_address, shipping_address, pos_profile)
 
 def _get_party_details(party=None, account=None, party_type="Customer", company=None, posting_date=None,
 	bill_date=None, price_list=None, currency=None, doctype=None, ignore_permissions=False,
-	fetch_payment_terms_template=True, party_address=None, shipping_address=None):
+	fetch_payment_terms_template=True, party_address=None, shipping_address=None, pos_profile=None):
 
 	out = frappe._dict(set_account_and_due_date(party, account, party_type, company, posting_date, bill_date, doctype))
 	party = out[party_type.lower()]
@@ -49,7 +51,7 @@
 	set_address_details(out, party, party_type, doctype, company, party_address, shipping_address)
 	set_contact_details(out, party, party_type)
 	set_other_values(out, party, party_type)
-	set_price_list(out, party, party_type, price_list)
+	set_price_list(out, party, party_type, price_list, pos_profile)
 
 	out["taxes_and_charges"] = set_taxes(party.name, party_type, posting_date, company, out.customer_group, out.supplier_type)
 
@@ -149,12 +151,20 @@
 
 	return None
 
-def set_price_list(out, party, party_type, given_price_list):
+def set_price_list(out, party, party_type, given_price_list, pos=None):
 	# price list
 	price_list = get_permitted_documents('Price List')
 
 	if price_list:
 		price_list = price_list[0]
+	elif pos and party_type == 'Customer':
+		customer_price_list = frappe.get_value('Customer', party.name, 'default_price_list')
+
+		if customer_price_list:
+			price_list = customer_price_list
+		else:
+			pos_price_list = frappe.get_value('POS Profile', pos, 'selling_price_list')
+			price_list = pos_price_list or given_price_list
 	else:
 		price_list = get_default_price_list(party) or given_price_list
 
diff --git a/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/test_accounts_receivable.py
index f911eaa..43786a4 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/accounts_receivable_summary/accounts_receivable_summary.py b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py
index cc21d34..73ca8b4 100644
--- a/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py
+++ b/erpnext/accounts/report/accounts_receivable_summary/accounts_receivable_summary.py
@@ -190,7 +190,7 @@
 	def get_voucherwise_data(self, party_naming_by, args):
 		voucherwise_data = ReceivablePayableReport(self.filters).run(args)[1]
 
-		cols = ["posting_date", "party", "customer-contact"]
+		cols = ["posting_date", "party"]
 
 		if party_naming_by == "Naming Series":
 			cols += ["party_name"]
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 b19f630..2e805f8 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 e33bd83..a8ae94f 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 0fca470..628c8ce 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 715f92b..9a8f26f 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 89699f3..b489899 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 cce4b27..ab514da 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 9582523..6efbc78 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 f971776..aea1e2d 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 0387437..6b40305 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 ff7f119..3d2305e 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/change_log/v6/v6_13_1.md b/erpnext/change_log/v6/v6_13_1.md
index 4b2c4a9..d5a930e 100644
--- a/erpnext/change_log/v6/v6_13_1.md
+++ b/erpnext/change_log/v6/v6_13_1.md
@@ -1 +1 @@
-- [ERPNext Manual in German](http://erpnext.org/docs/user/manual/de/) contributed by [CWT Connector & Wire Technology GmbH](http://www.cwt-assembly.com/)
+- [ERPNext Manual in German](http://erpnext.com/docs/user/manual/de/) contributed by [CWT Connector & Wire Technology GmbH](http://www.cwt-assembly.com/)
diff --git a/erpnext/config/crm.py b/erpnext/config/crm.py
index dd67005..5ac46bd 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 7a44f55..97be47c 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 237c49c..59e7d40 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 b87fc0e..e8472aa 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 bd4a6a2..9ed616a 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 0403c06..cf9451d 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 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 3ddb2ae..aa389e5 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 5946247..8c7427a 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 020ab3b..3661260 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 0631f29..c640576 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 4e783c7..8bd4c76 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 09b98c2..2a2d0c6 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 7f328b1..259ee92 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 81aff02..b6772c5 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 07b2e27..7360761 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 1fb0e19..7a4ffc4 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 13bc12d..c0589bb 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 b36599c..d86f4f2 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 23acd28..aeb5352 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 212f81b..9d3f02e 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 bf6d85b..fd364e8 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 985ac08..58db669 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 @@
 
 @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 02e1fc9..4b284b2 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 ff1edea..5570e69 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 2c03686..9065779 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 635464e..70c0b3c 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 0dc8970..92cc610 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 46b1013..e3def72 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 a030f19..085c4f6 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 ec35211..b08b172 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/hooks.py b/erpnext/hooks.py
index 3c3750a..86c230f 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -16,8 +16,6 @@
 
 error_report_email = "support@erpnext.com"
 
-docs_app = "foundation"
-
 app_include_js = "assets/js/erpnext.min.js"
 app_include_css = "assets/css/erpnext.css"
 web_include_js = "assets/js/erpnext-web.min.js"
diff --git a/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py b/erpnext/hr/doctype/attendance_request/attendance_request_dashboard.py
index cc5f629..cfdd6d3 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 e62f59f..46461da 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 2ac6698..f2656e9 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 30828a3..d1599a4 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 37a3474..2aa5498 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 5214a58..1572de3 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 a12ba7f..f97d285 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 75e0c08..5cae9a8 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 c621a7f..7256d94 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 c4fa7f6..7af507d 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 7a29878..3803c1d 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 a314081..441a71b 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 2c1c4c3..d27c7ac 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 a9811fc..d48bccf 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 401ac74..17d206a 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 8611372..91c2855 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 02fbfcd..3fe5282 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 c44a9a8..945fb7b 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.txt b/erpnext/patches.txt
index 69ad5d1..1544f99 100755
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -581,4 +581,5 @@
 erpnext.patches.v11_0.set_missing_gst_hsn_code
 erpnext.patches.v11_0.rename_bom_wo_fields
 erpnext.patches.v11_0.rename_additional_salary_component_additional_salary
-erpnext.patches.v11_0.renamed_from_to_fields_in_project
\ No newline at end of file
+erpnext.patches.v11_0.renamed_from_to_fields_in_project
+erpnext.patches.v11_0.add_permissions_in_gst_settings
\ No newline at end of file
diff --git a/erpnext/patches/v10_0/copy_projects_renamed_fields.py b/erpnext/patches/v10_0/copy_projects_renamed_fields.py
index 58e32b0..80db3bd 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 6dcfec7..f6a1499 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 f888ef6..2e30951 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 eb8bb2d..d5e2c5a 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 6ac1451..08376ae 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 1ae8b4a..7e2ff7a 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 44b8c7f..b947a40 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 808ae77..baf580a 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 82fbeaa..46ca786 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 b0df918..7b2c366 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 69e2bb8..a0bdd9e 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 c02d327..8f0c230 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 08006ad..f4c1895 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 bd86ae2..f722be2 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 6850202..eecf755 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 029ea87..d956052 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 064e036..5a30c78 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 0e7a23a..ed47d42 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_permissions_in_gst_settings.py b/erpnext/patches/v11_0/add_permissions_in_gst_settings.py
new file mode 100644
index 0000000..e8fcf33
--- /dev/null
+++ b/erpnext/patches/v11_0/add_permissions_in_gst_settings.py
@@ -0,0 +1,12 @@
+import frappe
+from frappe.permissions import add_permission, update_permission_property
+
+def execute():
+	company = frappe.get_all('Company', filters = {'country': 'India'})
+	if not company:
+		return
+
+	for doctype in ('GST HSN Code', 'GST Settings'):
+		add_permission(doctype, 'Accounts Manager', 0)
+		update_permission_property(doctype, 'Accounts Manager', 0, 'write', 1)
+		update_permission_property(doctype, 'Accounts Manager', 0, 'create', 1)
\ No newline at end of file
diff --git a/erpnext/patches/v11_0/add_sales_stages.py b/erpnext/patches/v11_0/add_sales_stages.py
index 69182c2..ac2ae15 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 ed7df50..0b77395 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 ee336be..462f830 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 29687d2..31feff2 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 eb48eed..1257f19 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 f663674..591c521 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 fc552a9..9925b70 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 acaf83d..80476c8 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 7f5c3aa..232d442 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 304bf7d..edab34c 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 0fc4780..4cb74c7 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 eef6722..7c8a822 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 98051cc..f28c16f 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 4e50c35..4839a20 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 8fa876d..8eb7016 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 e32149e..c03ab0b 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 e674137..b2ff6b8 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 730b271..4e99fac 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 ba18de8..8fdac07 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 d47a3c3..9aeb433 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 7fa1b09..84f5518 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 fac772c..56e95e0 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 a4bc355..e895eae 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 b1098ab..175d2a1 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 3c2cea2..4353ef8 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 a45c38f..fa3605b 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 ca8f0dc..d0cabb3 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 a18f3ff..7bd8577 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 7f7cfc1..0f7fad7 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 9cd5743..91470b3 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 a19a6c4..a8d3fab 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 @@
 		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 40181a2..6c6ca3c 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 508c51a..b393926 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 8f08699..fcb76af 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 d055fce..57df1ae 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 8a0b93d..75d1da7 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 9641320..70b1d8d 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 062159b..30dc0f8 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 @@
 			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 @@
 			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 37992ad..e223e09 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 f7e0793..f5dda1f 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 fcf95ca..63e3312 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 260222e..1fefd99 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 33bb9c1..e2d65d0 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 89bd580..d5af43c 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 589792a..3ead866 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 5b16fd2..1bd69ce 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 ad579b6..bf10333 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 e93070f..59f5343 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 f5fcb3a..e26f48c 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 0b2c921..a5cd761 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 a3324a0..8120d83 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 9abd315..ba1af31 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 f4ed66b..76d1082 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 @@
 	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 @@
 		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 0fb5085..56f4f48 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 14426f5..b52785a 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 6222748..35dedcc 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 1f74184..dba35d5 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 @@
 				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 a18df2f..75df39e 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 f4e2990..5781542 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 b858bd8..f31c9fe 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 2133d1c..2a09aa2 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 187f4ea..5847c83 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 ae7b632..4ce32f3 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 987247c..53df942 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 26208aa..e19c22a 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 9100b8f..6860e6a 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 6851e67..2045358 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 44fda34..cfbfb72 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 83b6b59..cceff3f 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 003b317..6139f1a 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 3797ff4..42cb9e9 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 39d601a..7dbb8ba 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 dc5b778..f9d1547 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 85a39e3..527a2fd 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 b1793db..231a483 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 a162427..8342b7f 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 dbd34d5..50aa9e5 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 867a5b2..746a990 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 3315acc..2c86e8a 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 41f76af..7e8a6ee 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 8633ba6..2cc16a2 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 06d158e..7184dee 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 11fdff9..8ed60a2 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 4177e07..3af6622 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 83c738e..e78f163 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 607ef690..fd8bec9 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 f6d227d..9f44202 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 6141792..02808a7 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 727a44e..998c4b6 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 1db4920..3cec6f3 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 03461de..746cae0 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 596f7a9..49393cc 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 d189056..ded4ad4 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 8409ca8..de92fc6 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 a008045..f80a830 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 d3aca21..3e69616 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 ed88e20..909825c 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 a89a9c8..1df4b42 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 9ca3d02..0c6b4ea 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 1c41ec8..e90de50 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 7f9923b..d99e9a4 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 96daa13..65b1c74 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 cbb3ea4..33f809f 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 1d334a5..dd9a432 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 630b7d4..2a2d420 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 0942505..093c0bf 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 eb4a347..8426ddcd 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 c8af033..9a59209 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 aecbc9f..552fc89 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 7fd4c14..517e66c 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 72e9434..482586b 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 13a2bb8..3b9642d 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 cf23e88..200434c 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 0a2f2d3..7289e4a 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 b2658ba..7f06d8f 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 d749760..c6520b1 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 875fc4e..d029555 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 aa6965f..19dcb5e 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 37ae7c7..2b5e774 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 863c0c0..a690526 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 163e7c3..9f589ef 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 c6bca8e..11a52f9 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 6395698..e8eef6e 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 c485b5b..b5f2234 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 0b54f15..0fce96a 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 2fa0221..4631602 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 1fb297f..4c606af 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 b47879c..22fa53b 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 2e81571..af2d28b 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 5370fa2..e8b017d 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 5fb9be0..7aaf2d5 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 fe9befe..82beba3 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 03d128d..70a08f5 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 9a5fef9..2661914 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 45a4ddc..ef5f335 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 f7037dd..99ecb44 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 323b5bc..c684b24 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 2b4ac58..f67af90 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 4ab9cf3..808ae6d 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 e6351c4..cbbe09d 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 2934c70..33bbc11 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 33dc519..c685bbc 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 5bfa8c3..f38b7f2 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 c844571..82d6148 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 187cbd3..54ae18b 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 e9e1b99..91c49f5 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 1ce3445..1a50088 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 fc3d01c..aec5d43 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 c4eab19..040e655 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 18b5b8c..1f490e6 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 93fe5da..2e710c7 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 485aae7..39cf016 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/public/js/conf.js b/erpnext/public/js/conf.js
index 3208155..56e6bdb 100644
--- a/erpnext/public/js/conf.js
+++ b/erpnext/public/js/conf.js
@@ -14,7 +14,7 @@
 	$('.navbar-home').html('<img class="erpnext-icon" src="'+
 			frappe.urllib.get_base_url()+'/assets/erpnext/images/erp-icon.svg" />');
 
-	$('[data-link="docs"]').attr("href", "https://frappe.github.io/erpnext/")
+	$('[data-link="docs"]').attr("href", "https://erpnext.com/docs")
 	$('[data-link="issues"]').attr("href", "https://github.com/frappe/erpnext/issues")
 
 
@@ -23,7 +23,8 @@
 
 	// additional help links for erpnext
 	var $help_menu = $('.dropdown-help ul .documentation-links');
-
+	$('<li><a data-link-type="forum" href="https://erpnext.com/docs/user/manual" \
+		target="_blank">'+__('Documentation')+'</a></li>').insertBefore($help_menu);
 	$('<li><a data-link-type="forum" href="https://discuss.erpnext.com" \
 		target="_blank">'+__('User Forum')+'</a></li>').insertBefore($help_menu);
 	$('<li class="gitter-chat-link"><a href="https://gitter.im/frappe/erpnext" \
diff --git a/erpnext/public/js/help_links.js b/erpnext/public/js/help_links.js
index b8d0019..17b726e 100644
--- a/erpnext/public/js/help_links.js
+++ b/erpnext/public/js/help_links.js
@@ -1,524 +1,526 @@
 frappe.provide('frappe.help.help_links');
 
+const docsUrl = 'https://erpnext.com/docs/';
+
 frappe.help.help_links['Form/Rename Tool'] = [
-	{ label: 'Bulk Rename', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/data/bulk-rename' },
+	{ label: 'Bulk Rename', url: docsUrl + 'user/manual/en/setting-up/data/bulk-rename' },
 ]
 
 //Setup
 
 frappe.help.help_links['List/User'] = [
-	{ label: 'New User', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/adding-users' },
-	{ label: 'Rename User', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/rename-user' },
+	{ label: 'New User', url: docsUrl + 'user/manual/en/setting-up/users-and-permissions/adding-users' },
+	{ label: 'Rename User', url: docsUrl + 'user/manual/en/setting-up/articles/rename-user' },
 ]
 
 frappe.help.help_links['permission-manager'] = [
-	{ label: 'Role Permissions Manager', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/role-based-permissions' },
-	{ label: 'Managing Perm Level in Permissions Manager', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/managing-perm-level' },
-	{ label: 'User Permissions', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/user-permissions' },
-	{ label: 'Sharing', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/sharing' },
-	{ label: 'Password', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/change-password' },
+	{ label: 'Role Permissions Manager', url: docsUrl + 'user/manual/en/setting-up/users-and-permissions/role-based-permissions' },
+	{ label: 'Managing Perm Level in Permissions Manager', url: docsUrl + 'user/manual/en/setting-up/articles/managing-perm-level' },
+	{ label: 'User Permissions', url: docsUrl + 'user/manual/en/setting-up/users-and-permissions/user-permissions' },
+	{ label: 'Sharing', url: docsUrl + 'user/manual/en/setting-up/users-and-permissions/sharing' },
+	{ label: 'Password', url: docsUrl + 'user/manual/en/setting-up/articles/change-password' },
 ]
 
 frappe.help.help_links['Form/System Settings'] = [
-	{ label: 'Naming Series', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/settings/system-settings' },
+	{ label: 'Naming Series', url: docsUrl + 'user/manual/en/setting-up/settings/system-settings' },
 ]
 
 frappe.help.help_links['data-import-tool'] = [
-	{ label: 'Importing and Exporting Data', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/data/data-import-tool' },
-	{ label: 'Overwriting Data from Data Import Tool', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/overwriting-data-from-data-import-tool' },
+	{ label: 'Importing and Exporting Data', url: docsUrl + 'user/manual/en/setting-up/data/data-import-tool' },
+	{ label: 'Overwriting Data from Data Import Tool', url: docsUrl + 'user/manual/en/setting-up/articles/overwriting-data-from-data-import-tool' },
 ]
 
 frappe.help.help_links['module_setup'] = [
-	{ label: 'Role Permissions Manager', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/role-based-permissions' },
+	{ label: 'Role Permissions Manager', url: docsUrl + 'user/manual/en/setting-up/users-and-permissions/role-based-permissions' },
 ]
 
 frappe.help.help_links['Form/Naming Series'] = [
-	{ label: 'Naming Series', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/settings/naming-series' },
-	{ label: 'Setting the Current Value for Naming Series', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/naming-series-current-value' },
+	{ label: 'Naming Series', url: docsUrl + 'user/manual/en/setting-up/settings/naming-series' },
+	{ label: 'Setting the Current Value for Naming Series', url: docsUrl + 'user/manual/en/setting-up/articles/naming-series-current-value' },
 ]
 
 frappe.help.help_links['Form/Global Defaults'] = [
-	{ label: 'Global Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/settings/global-defaults' },
+	{ label: 'Global Settings', url: docsUrl + 'user/manual/en/setting-up/settings/global-defaults' },
 ]
 
 frappe.help.help_links['Form/Email Digest'] = [
-	{ label: 'Email Digest', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/email-digest' },
+	{ label: 'Email Digest', url: docsUrl + 'user/manual/en/setting-up/email/email-digest' },
 ]
 
 frappe.help.help_links['List/Print Heading'] = [
-	{ label: 'Print Heading', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/print-headings' },
+	{ label: 'Print Heading', url: docsUrl + 'user/manual/en/setting-up/print/print-headings' },
 ]
 
 frappe.help.help_links['List/Letter Head'] = [
-	{ label: 'Letter Head', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/letter-head' },
+	{ label: 'Letter Head', url: docsUrl + 'user/manual/en/setting-up/print/letter-head' },
 ]
 
 frappe.help.help_links['List/Address Template'] = [
-	{ label: 'Address Template', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/address-template' },
+	{ label: 'Address Template', url: docsUrl + 'user/manual/en/setting-up/print/address-template' },
 ]
 
 frappe.help.help_links['List/Terms and Conditions'] = [
-	{ label: 'Terms and Conditions', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/terms-and-conditions' },
+	{ label: 'Terms and Conditions', url: docsUrl + 'user/manual/en/setting-up/print/terms-and-conditions' },
 ]
 
 frappe.help.help_links['List/Cheque Print Template'] = [
-	{ label: 'Cheque Print Template', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/cheque-print-template' },
+	{ label: 'Cheque Print Template', url: docsUrl + 'user/manual/en/setting-up/print/cheque-print-template' },
 ]
 
 frappe.help.help_links['List/Email Account'] = [
-	{ label: 'Email Account', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/email-account' },
+	{ label: 'Email Account', url: docsUrl + 'user/manual/en/setting-up/email/email-account' },
 ]
 
 frappe.help.help_links['List/Notification'] = [
-	{ label: 'Notification', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/notifications' },
+	{ label: 'Notification', url: docsUrl + 'user/manual/en/setting-up/email/notifications' },
 ]
 
 frappe.help.help_links['Form/Notification'] = [
-	{ label: 'Notification', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/notifications' },
+	{ label: 'Notification', url: docsUrl + 'user/manual/en/setting-up/email/notifications' },
 ]
 
 frappe.help.help_links['List/Email Digest'] = [
-	{ label: 'Email Digest', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/email-digest' },
+	{ label: 'Email Digest', url: docsUrl + 'user/manual/en/setting-up/email/email-digest' },
 ]
 
 frappe.help.help_links['List/Auto Email Report'] = [
-	{ label: 'Auto Email Reports', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/email/email-reports' },
+	{ label: 'Auto Email Reports', url: docsUrl + 'user/manual/en/setting-up/email/email-reports' },
 ]
 
 frappe.help.help_links['Form/Print Settings'] = [
-	{ label: 'Print Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/print-settings' },
+	{ label: 'Print Settings', url: docsUrl + 'user/manual/en/setting-up/print/print-settings' },
 ]
 
 frappe.help.help_links['print-format-builder'] = [
-	{ label: 'Print Format Builder', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/print-settings' },
+	{ label: 'Print Format Builder', url: docsUrl + 'user/manual/en/setting-up/print/print-settings' },
 ]
 
 frappe.help.help_links['List/Print Heading'] = [
-	{ label: 'Print Heading', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/print/print-headings' },
+	{ label: 'Print Heading', url: docsUrl + 'user/manual/en/setting-up/print/print-headings' },
 ]
 
 //setup-integrations
 
 frappe.help.help_links['Form/PayPal Settings'] = [
-	{ label: 'PayPal Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/integrations/paypal-integration' },
+	{ label: 'PayPal Settings', url: docsUrl + 'user/manual/en/setting-up/integrations/paypal-integration' },
 ]
 
 frappe.help.help_links['Form/Razorpay Settings'] = [
-	{ label: 'Razorpay Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/integrations/razorpay-integration' },
+	{ label: 'Razorpay Settings', url: docsUrl + 'user/manual/en/setting-up/integrations/razorpay-integration' },
 ]
 
 frappe.help.help_links['Form/Dropbox Settings'] = [
-	{ label: 'Dropbox Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/integrations/dropbox-backup' },
+	{ label: 'Dropbox Settings', url: docsUrl + 'user/manual/en/setting-up/integrations/dropbox-backup' },
 ]
 
 frappe.help.help_links['Form/LDAP Settings'] = [
-	{ label: 'LDAP Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/integrations/ldap-integration' },
+	{ label: 'LDAP Settings', url: docsUrl + 'user/manual/en/setting-up/integrations/ldap-integration' },
 ]
 
 frappe.help.help_links['Form/Stripe Settings'] = [
-	{ label: 'Stripe Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/integrations/stripe-integration' },
+	{ label: 'Stripe Settings', url: docsUrl + 'user/manual/en/setting-up/integrations/stripe-integration' },
 ]
 
 //Sales
 
 frappe.help.help_links['Form/Quotation'] = [
-	{ label: 'Quotation', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/quotation' },
-	{ label: 'Applying Discount', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/applying-discount' },
-	{ label: 'Sales Person', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/sales-persons-in-the-sales-transactions' },
-	{ label: 'Applying Margin', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/adding-margin' },
+	{ label: 'Quotation', url: docsUrl + 'user/manual/en/selling/quotation' },
+	{ label: 'Applying Discount', url: docsUrl + 'user/manual/en/selling/articles/applying-discount' },
+	{ label: 'Sales Person', url: docsUrl + 'user/manual/en/selling/articles/sales-persons-in-the-sales-transactions' },
+	{ label: 'Applying Margin', url: docsUrl + 'user/manual/en/selling/articles/adding-margin' },
 ]
 
 frappe.help.help_links['List/Customer'] = [
-	{ label: 'Customer', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/customer' },
-	{ label: 'Credit Limit', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/credit-limit' },
+	{ label: 'Customer', url: docsUrl + 'user/manual/en/CRM/customer' },
+	{ label: 'Credit Limit', url: docsUrl + 'user/manual/en/accounts/credit-limit' },
 ]
 
 frappe.help.help_links['Form/Customer'] = [
-	{ label: 'Customer', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/customer' },
-	{ label: 'Credit Limit', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/credit-limit' },
+	{ label: 'Customer', url: docsUrl + 'user/manual/en/CRM/customer' },
+	{ label: 'Credit Limit', url: docsUrl + 'user/manual/en/accounts/credit-limit' },
 ]
 
 frappe.help.help_links['List/Sales Taxes and Charges Template'] = [
-	{ label: 'Setting Up Taxes', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/setting-up-taxes' },
+	{ label: 'Setting Up Taxes', url: docsUrl + 'user/manual/en/setting-up/setting-up-taxes' },
 ]
 
 frappe.help.help_links['Form/Sales Taxes and Charges Template'] = [
-	{ label: 'Setting Up Taxes', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/setting-up-taxes' },
+	{ label: 'Setting Up Taxes', url: docsUrl + 'user/manual/en/setting-up/setting-up-taxes' },
 ]
 
 frappe.help.help_links['List/Sales Order'] = [
-	{ label: 'Sales Order', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/sales-order' },
-	{ label: 'Recurring Sales Order', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' },
-	{ label: 'Applying Discount', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/applying-discount' },
+	{ label: 'Sales Order', url: docsUrl + 'user/manual/en/selling/sales-order' },
+	{ label: 'Recurring Sales Order', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' },
+	{ label: 'Applying Discount', url: docsUrl + 'user/manual/en/selling/articles/applying-discount' },
 ]
 
 frappe.help.help_links['Form/Sales Order'] = [
-	{ label: 'Sales Order', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/sales-order' },
-	{ label: 'Recurring Sales Order', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' },
-	{ label: 'Applying Discount', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/applying-discount' },
-	{ label: 'Drop Shipping', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/drop-shipping' },
-	{ label: 'Sales Person', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/sales-persons-in-the-sales-transactions' },
-	{ label: 'Close Sales Order', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/close-sales-order' },
-	{ label: 'Applying Margin', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/articles/adding-margin' },
+	{ label: 'Sales Order', url: docsUrl + 'user/manual/en/selling/sales-order' },
+	{ label: 'Recurring Sales Order', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' },
+	{ label: 'Applying Discount', url: docsUrl + 'user/manual/en/selling/articles/applying-discount' },
+	{ label: 'Drop Shipping', url: docsUrl + 'user/manual/en/selling/articles/drop-shipping' },
+	{ label: 'Sales Person', url: docsUrl + 'user/manual/en/selling/articles/sales-persons-in-the-sales-transactions' },
+	{ label: 'Close Sales Order', url: docsUrl + 'user/manual/en/selling/articles/close-sales-order' },
+	{ label: 'Applying Margin', url: docsUrl + 'user/manual/en/selling/articles/adding-margin' },
 ]
 
 frappe.help.help_links['Form/Product Bundle'] = [
-	{ label: 'Product Bundle', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/setup/product-bundle' },
+	{ label: 'Product Bundle', url: docsUrl + 'user/manual/en/selling/setup/product-bundle' },
 ]
 
 frappe.help.help_links['Form/Selling Settings'] = [
-	{ label: 'Selling Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/setup/selling-settings' },
+	{ label: 'Selling Settings', url: docsUrl + 'user/manual/en/selling/setup/selling-settings' },
 ]
 
 //Buying
 
 frappe.help.help_links['List/Supplier'] = [
-	{ label: 'Supplier', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/supplier' },
+	{ label: 'Supplier', url: docsUrl + 'user/manual/en/buying/supplier' },
 ]
 
 frappe.help.help_links['Form/Supplier'] = [
-	{ label: 'Supplier', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/supplier' },
+	{ label: 'Supplier', url: docsUrl + 'user/manual/en/buying/supplier' },
 ]
 
 frappe.help.help_links['Form/Request for Quotation'] = [
-	{ label: 'Request for Quotation', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/request-for-quotation' },
-	{ label: 'RFQ Video', url: 'https://frappe.github.io/erpnext/user/videos/learn/request-for-quotation.html' },
+	{ label: 'Request for Quotation', url: docsUrl + 'user/manual/en/buying/request-for-quotation' },
+	{ label: 'RFQ Video', url: docsUrl + 'user/videos/learn/request-for-quotation.html' },
 ]
 
 frappe.help.help_links['Form/Supplier Quotation'] = [
-	{ label: 'Supplier Quotation', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/supplier-quotation' },
+	{ label: 'Supplier Quotation', url: docsUrl + 'user/manual/en/buying/supplier-quotation' },
 ]
 
 frappe.help.help_links['Form/Buying Settings'] = [
-	{ label: 'Buying Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/setup/buying-settings' },
+	{ label: 'Buying Settings', url: docsUrl + 'user/manual/en/buying/setup/buying-settings' },
 ]
 
 frappe.help.help_links['List/Purchase Order'] = [
-	{ label: 'Purchase Order', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/purchase-order' },
-	{ label: 'Recurring Purchase Order', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' },
+	{ label: 'Purchase Order', url: docsUrl + 'user/manual/en/buying/purchase-order' },
+	{ label: 'Recurring Purchase Order', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' },
 ]
 
 frappe.help.help_links['Form/Purchase Order'] = [
-	{ label: 'Purchase Order', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/purchase-order' },
-	{ label: 'Item UoM', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/articles/purchasing-in-different-unit' },
-	{ label: 'Supplier Item Code', url: 'https://frappe.github.io/erpnext/user/manual/en/buying/articles/maintaining-suppliers-part-no-in-item' },
-	{ label: 'Recurring Purchase Order', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' },
-	{ label: 'Subcontracting', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/subcontracting' },
+	{ label: 'Purchase Order', url: docsUrl + 'user/manual/en/buying/purchase-order' },
+	{ label: 'Item UoM', url: docsUrl + 'user/manual/en/buying/articles/purchasing-in-different-unit' },
+	{ label: 'Supplier Item Code', url: docsUrl + 'user/manual/en/buying/articles/maintaining-suppliers-part-no-in-item' },
+	{ label: 'Recurring Purchase Order', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' },
+	{ label: 'Subcontracting', url: docsUrl + 'user/manual/en/manufacturing/subcontracting' },
 ]
 
 frappe.help.help_links['List/Purchase Taxes and Charges Template'] = [
-	{ label: 'Setting Up Taxes', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/setting-up-taxes' },
+	{ label: 'Setting Up Taxes', url: docsUrl + 'user/manual/en/setting-up/setting-up-taxes' },
 ]
 
 frappe.help.help_links['List/POS Profile'] = [
-	{ label: 'POS Profile', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/pos-setting' },
+	{ label: 'POS Profile', url: docsUrl + 'user/manual/en/setting-up/pos-setting' },
 ]
 
 frappe.help.help_links['List/Price List'] = [
-	{ label: 'Price List', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/price-lists' },
+	{ label: 'Price List', url: docsUrl + 'user/manual/en/setting-up/price-lists' },
 ]
 
 frappe.help.help_links['List/Authorization Rule'] = [
-	{ label: 'Authorization Rule', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/authorization-rule' },
+	{ label: 'Authorization Rule', url: docsUrl + 'user/manual/en/setting-up/authorization-rule' },
 ]
 
 frappe.help.help_links['Form/SMS Settings'] = [
-	{ label: 'SMS Settings', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/sms-setting' },
+	{ label: 'SMS Settings', url: docsUrl + 'user/manual/en/setting-up/sms-setting' },
 ]
 
 frappe.help.help_links['List/Stock Reconciliation'] = [
-	{ label: 'Stock Reconciliation', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/stock-reconciliation-for-non-serialized-item' },
+	{ label: 'Stock Reconciliation', url: docsUrl + 'user/manual/en/setting-up/stock-reconciliation-for-non-serialized-item' },
 ]
 
 frappe.help.help_links['Tree/Territory'] = [
-	{ label: 'Territory', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/territory' },
+	{ label: 'Territory', url: docsUrl + 'user/manual/en/setting-up/territory' },
 ]
 
 frappe.help.help_links['Form/Dropbox Backup'] = [
-	{ label: 'Dropbox Backup', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/third-party-backups' },
-	{ label: 'Setting Up Dropbox Backup', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/setting-up-dropbox-backups' },
+	{ label: 'Dropbox Backup', url: docsUrl + 'user/manual/en/setting-up/third-party-backups' },
+	{ label: 'Setting Up Dropbox Backup', url: docsUrl + 'user/manual/en/setting-up/articles/setting-up-dropbox-backups' },
 ]
 
 frappe.help.help_links['List/Workflow'] = [
-	{ label: 'Workflow', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/workflows' },
+	{ label: 'Workflow', url: docsUrl + 'user/manual/en/setting-up/workflows' },
 ]
 
 frappe.help.help_links['List/Company'] = [
-	{ label: 'Company', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/company-setup' },
-	{ label: 'Managing Multiple Companies', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/managing-multiple-companies' },
-	{ label: 'Delete All Related Transactions for a Company', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/delete-a-company-and-all-related-transactions' },
+	{ label: 'Company', url: docsUrl + 'user/manual/en/setting-up/company-setup' },
+	{ label: 'Managing Multiple Companies', url: docsUrl + 'user/manual/en/setting-up/articles/managing-multiple-companies' },
+	{ label: 'Delete All Related Transactions for a Company', url: docsUrl + 'user/manual/en/setting-up/articles/delete-a-company-and-all-related-transactions' },
 ]
 
 //Accounts
 
 frappe.help.help_links['modules/Accounts'] = [
-	{ label: 'Introduction to Accounts', url: 'http://frappe.github.io/erpnext/user/manual/en/accounts/' },
-	{ label: 'Chart of Accounts', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/chart-of-accounts.html' },
-	{ label: 'Multi Currency Accounting', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/multi-currency-accounting' },
+	{ label: 'Introduction to Accounts', url: docsUrl + 'user/manual/en/accounts/' },
+	{ label: 'Chart of Accounts', url: docsUrl + 'user/manual/en/accounts/chart-of-accounts.html' },
+	{ label: 'Multi Currency Accounting', url: docsUrl + 'user/manual/en/accounts/multi-currency-accounting' },
 ]
 
 frappe.help.help_links['Tree/Account'] = [
-	{ label: 'Chart of Accounts', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/chart-of-accounts' },
-	{ label: 'Managing Tree Mastes', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/managing-tree-structure-masters' },
+	{ label: 'Chart of Accounts', url: docsUrl + 'user/manual/en/accounts/chart-of-accounts' },
+	{ label: 'Managing Tree Mastes', url: docsUrl + 'user/manual/en/setting-up/articles/managing-tree-structure-masters' },
 ]
 
 frappe.help.help_links['Form/Sales Invoice'] = [
-	{ label: 'Sales Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/sales-invoice' },
-	{ label: 'Accounts Opening Balance', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/opening-accounts' },
-	{ label: 'Sales Return', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/sales-return' },
-	{ label: 'Recurring Sales Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' },
+	{ label: 'Sales Invoice', url: docsUrl + 'user/manual/en/accounts/sales-invoice' },
+	{ label: 'Accounts Opening Balance', url: docsUrl + 'user/manual/en/accounts/opening-accounts' },
+	{ label: 'Sales Return', url: docsUrl + 'user/manual/en/stock/sales-return' },
+	{ label: 'Recurring Sales Invoice', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' },
 ]
 
 frappe.help.help_links['List/Sales Invoice'] = [
-	{ label: 'Sales Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/sales-invoice' },
-	{ label: 'Accounts Opening Balance', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/opening-accounts' },
-	{ label: 'Sales Return', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/sales-return' },
-	{ label: 'Recurring Sales Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' },
+	{ label: 'Sales Invoice', url: docsUrl + 'user/manual/en/accounts/sales-invoice' },
+	{ label: 'Accounts Opening Balance', url: docsUrl + 'user/manual/en/accounts/opening-accounts' },
+	{ label: 'Sales Return', url: docsUrl + 'user/manual/en/stock/sales-return' },
+	{ label: 'Recurring Sales Invoice', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' },
 ]
 
 frappe.help.help_links['pos'] = [
-	{ label: 'Point of Sale Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/point-of-sale-pos-invoice' },
+	{ label: 'Point of Sale Invoice', url: docsUrl + 'user/manual/en/accounts/point-of-sale-pos-invoice' },
 ]
 
 frappe.help.help_links['List/POS Profile'] = [
-	{ label: 'Point of Sale Profile', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/pos-setting' },
+	{ label: 'Point of Sale Profile', url: docsUrl + 'user/manual/en/setting-up/pos-setting' },
 ]
 
 frappe.help.help_links['List/Purchase Invoice'] = [
-	{ label: 'Purchase Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/purchase-invoice' },
-	{ label: 'Accounts Opening Balance', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/opening-accounts' },
-	{ label: 'Recurring Purchase Invoice', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/recurring-orders-and-invoices' },
+	{ label: 'Purchase Invoice', url: docsUrl + 'user/manual/en/accounts/purchase-invoice' },
+	{ label: 'Accounts Opening Balance', url: docsUrl + 'user/manual/en/accounts/opening-accounts' },
+	{ label: 'Recurring Purchase Invoice', url: docsUrl + 'user/manual/en/accounts/recurring-orders-and-invoices' },
 ]
 
 frappe.help.help_links['List/Journal Entry'] = [
-	{ label: 'Journal Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/journal-entry' },
-	{ label: 'Advance Payment Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/advance-payment-entry' },
-	{ label: 'Accounts Opening Balance', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/opening-accounts' },
+	{ label: 'Journal Entry', url: docsUrl + 'user/manual/en/accounts/journal-entry' },
+	{ label: 'Advance Payment Entry', url: docsUrl + 'user/manual/en/accounts/advance-payment-entry' },
+	{ label: 'Accounts Opening Balance', url: docsUrl + 'user/manual/en/accounts/opening-accounts' },
 ]
 
 frappe.help.help_links['List/Payment Entry'] = [
-	{ label: 'Payment Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/payment-entry' },
+	{ label: 'Payment Entry', url: docsUrl + 'user/manual/en/accounts/payment-entry' },
 ]
 
 frappe.help.help_links['List/Payment Request'] = [
-	{ label: 'Payment Request', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/payment-request' },
+	{ label: 'Payment Request', url: docsUrl + 'user/manual/en/accounts/payment-request' },
 ]
 
 frappe.help.help_links['List/Asset'] = [
-	{ label: 'Managing Fixed Assets', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/managing-fixed-assets' },
+	{ label: 'Managing Fixed Assets', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' },
 ]
 
 frappe.help.help_links['List/Asset Category'] = [
-	{ label: 'Asset Category', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/managing-fixed-assets' },
+	{ label: 'Asset Category', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' },
 ]
 
 frappe.help.help_links['Tree/Cost Center'] = [
-	{ label: 'Budgeting', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/budgeting' },
+	{ label: 'Budgeting', url: docsUrl + 'user/manual/en/accounts/budgeting' },
 ]
 
 frappe.help.help_links['List/Item'] = [
-	{ label: 'Item', url: 'http://frappe.github.io/erpnext/user/manual/en/stock/item' },
-	{ label: 'Item Price', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-price' },	
-	{ label: 'Barcode', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/track-items-using-barcode' },
-	{ label: 'Item Wise Taxation', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/item-wise-taxation' },
-	{ label: 'Managing Fixed Assets', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/managing-fixed-assets' },
-	{ label: 'Item Codification', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-codification' },
-	{ label: 'Item Variants', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-variants' },	
-	{ label: 'Item Valuation', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-valuation-fifo-and-moving-average' },				
+	{ label: 'Item', url: docsUrl + 'user/manual/en/stock/item' },
+	{ label: 'Item Price', url: docsUrl + 'user/manual/en/stock/item/item-price' },
+	{ label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' },
+	{ label: 'Item Wise Taxation', url: docsUrl + 'user/manual/en/accounts/item-wise-taxation' },
+	{ label: 'Managing Fixed Assets', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' },
+	{ label: 'Item Codification', url: docsUrl + 'user/manual/en/stock/item/item-codification' },
+	{ label: 'Item Variants', url: docsUrl + 'user/manual/en/stock/item/item-variants' },
+	{ label: 'Item Valuation', url: docsUrl + 'user/manual/en/stock/item/item-valuation-fifo-and-moving-average' },
 ]
 
 frappe.help.help_links['Form/Item'] = [
-	{ label: 'Item', url: 'http://frappe.github.io/erpnext/user/manual/en/stock/item' },
-	{ label: 'Item Price', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-price' },	
-	{ label: 'Barcode', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/track-items-using-barcode' },
-	{ label: 'Item Wise Taxation', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/item-wise-taxation' },
-	{ label: 'Managing Fixed Assets', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/managing-fixed-assets' },
-	{ label: 'Item Codification', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-codification' },
-	{ label: 'Item Variants', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-variants' },	
-	{ label: 'Item Valuation', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/item/item-valuation-fifo-and-moving-average' },				
+	{ label: 'Item', url: docsUrl + 'user/manual/en/stock/item' },
+	{ label: 'Item Price', url: docsUrl + 'user/manual/en/stock/item/item-price' },
+	{ label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' },
+	{ label: 'Item Wise Taxation', url: docsUrl + 'user/manual/en/accounts/item-wise-taxation' },
+	{ label: 'Managing Fixed Assets', url: docsUrl + 'user/manual/en/accounts/managing-fixed-assets' },
+	{ label: 'Item Codification', url: docsUrl + 'user/manual/en/stock/item/item-codification' },
+	{ label: 'Item Variants', url: docsUrl + 'user/manual/en/stock/item/item-variants' },
+	{ label: 'Item Valuation', url: docsUrl + 'user/manual/en/stock/item/item-valuation-fifo-and-moving-average' },
 ]
 
 frappe.help.help_links['List/Purchase Receipt'] = [
-	{ label: 'Purchase Receipt', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/purchase-receipt' },
-	{ label: 'Barcode', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/track-items-using-barcode' },
+	{ label: 'Purchase Receipt', url: docsUrl + 'user/manual/en/stock/purchase-receipt' },
+	{ label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' },
 ]
 
 frappe.help.help_links['List/Delivery Note'] = [
-	{ label: 'Delivery Note', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/delivery-note' },
-	{ label: 'Barcode', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/track-items-using-barcode' },
-	{ label: 'Sales Return', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/sales-return' },
+	{ label: 'Delivery Note', url: docsUrl + 'user/manual/en/stock/delivery-note' },
+	{ label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' },
+	{ label: 'Sales Return', url: docsUrl + 'user/manual/en/stock/sales-return' },
 ]
 
 frappe.help.help_links['Form/Delivery Note'] = [
-	{ label: 'Delivery Note', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/delivery-note' },
-	{ label: 'Sales Return', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/sales-return' },
-	{ label: 'Barcode', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/track-items-using-barcode' },
-	{ label: 'Subcontracting', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/subcontracting' },
+	{ label: 'Delivery Note', url: docsUrl + 'user/manual/en/stock/delivery-note' },
+	{ label: 'Sales Return', url: docsUrl + 'user/manual/en/stock/sales-return' },
+	{ label: 'Barcode', url: docsUrl + 'user/manual/en/stock/articles/track-items-using-barcode' },
+	{ label: 'Subcontracting', url: docsUrl + 'user/manual/en/manufacturing/subcontracting' },
 ]
 
 frappe.help.help_links['List/Installation Note'] = [
-	{ label: 'Installation Note', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/installation-note' },
+	{ label: 'Installation Note', url: docsUrl + 'user/manual/en/stock/installation-note' },
 ]
 
 
 frappe.help.help_links['Tree'] = [
-	{ label: 'Managing Tree Structure Masters', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/managing-tree-structure-masters' },
+	{ label: 'Managing Tree Structure Masters', url: docsUrl + 'user/manual/en/setting-up/articles/managing-tree-structure-masters' },
 ]
 
 frappe.help.help_links['List/Budget'] = [
-	{ label: 'Budgeting', url: 'https://frappe.github.io/erpnext/user/manual/en/accounts/budgeting' },
+	{ label: 'Budgeting', url: docsUrl + 'user/manual/en/accounts/budgeting' },
 ]
 
 //Stock
 
 frappe.help.help_links['List/Material Request'] = [
-	{ label: 'Material Request', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/material-request' },
-	{ label: 'Auto-creation of Material Request', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/auto-creation-of-material-request' },
+	{ label: 'Material Request', url: docsUrl + 'user/manual/en/stock/material-request' },
+	{ label: 'Auto-creation of Material Request', url: docsUrl + 'user/manual/en/stock/articles/auto-creation-of-material-request' },
 ]
 
 frappe.help.help_links['Form/Material Request'] = [
-	{ label: 'Material Request', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/material-request' },
-	{ label: 'Auto-creation of Material Request', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/auto-creation-of-material-request' },
+	{ label: 'Material Request', url: docsUrl + 'user/manual/en/stock/material-request' },
+	{ label: 'Auto-creation of Material Request', url: docsUrl + 'user/manual/en/stock/articles/auto-creation-of-material-request' },
 ]
 
 frappe.help.help_links['Form/Stock Entry'] = [
-	{ label: 'Stock Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/stock-entry' },
-	{ label: 'Stock Entry Types', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/stock-entry-purpose' },
-	{ label: 'Repack Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/repack-entry' },
-	{ label: 'Opening Stock', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/opening-stock' },
-	{ label: 'Subcontracting', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/subcontracting' },
+	{ label: 'Stock Entry', url: docsUrl + 'user/manual/en/stock/stock-entry' },
+	{ label: 'Stock Entry Types', url: docsUrl + 'user/manual/en/stock/articles/stock-entry-purpose' },
+	{ label: 'Repack Entry', url: docsUrl + 'user/manual/en/stock/articles/repack-entry' },
+	{ label: 'Opening Stock', url: docsUrl + 'user/manual/en/stock/opening-stock' },
+	{ label: 'Subcontracting', url: docsUrl + 'user/manual/en/manufacturing/subcontracting' },
 ]
 
 frappe.help.help_links['List/Stock Entry'] = [
-	{ label: 'Stock Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/stock-entry' },
+	{ label: 'Stock Entry', url: docsUrl + 'user/manual/en/stock/stock-entry' },
 ]
 
 frappe.help.help_links['Tree/Warehouse'] = [
-	{ label: 'Warehouse', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/warehouse' },
+	{ label: 'Warehouse', url: docsUrl + 'user/manual/en/stock/warehouse' },
 ]
 
 frappe.help.help_links['List/Serial No'] = [
-	{ label: 'Serial No', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/serial-no' },
+	{ label: 'Serial No', url: docsUrl + 'user/manual/en/stock/serial-no' },
 ]
 
 frappe.help.help_links['Form/Serial No'] = [
-	{ label: 'Serial No', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/serial-no' },
+	{ label: 'Serial No', url: docsUrl + 'user/manual/en/stock/serial-no' },
 ]
 
 frappe.help.help_links['Form/Batch'] = [
-	{ label: 'Batch', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/batch' },
+	{ label: 'Batch', url: docsUrl + 'user/manual/en/stock/batch' },
 ]
 
 frappe.help.help_links['Form/Packing Slip'] = [
-	{ label: 'Packing Slip', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/tools/packing-slip' },
+	{ label: 'Packing Slip', url: docsUrl + 'user/manual/en/stock/tools/packing-slip' },
 ]
 
 frappe.help.help_links['Form/Quality Inspection'] = [
-	{ label: 'Quality Inspection', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/tools/quality-inspection' },
+	{ label: 'Quality Inspection', url: docsUrl + 'user/manual/en/stock/tools/quality-inspection' },
 ]
 
 frappe.help.help_links['Form/Landed Cost Voucher'] = [
-	{ label: 'Landed Cost Voucher', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/tools/landed-cost-voucher' },
+	{ label: 'Landed Cost Voucher', url: docsUrl + 'user/manual/en/stock/tools/landed-cost-voucher' },
 ]
 
 frappe.help.help_links['Tree/Item Group'] = [
-	{ label: 'Item Group', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/setup/item-group' },
+	{ label: 'Item Group', url: docsUrl + 'user/manual/en/stock/setup/item-group' },
 ]
 
 frappe.help.help_links['Form/Item Attribute'] = [
-	{ label: 'Item Attribute', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/setup/item-attribute' },
+	{ label: 'Item Attribute', url: docsUrl + 'user/manual/en/stock/setup/item-attribute' },
 ]
 
 frappe.help.help_links['Form/UOM'] = [
-	{ label: 'Fractions in UOM', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/articles/managing-fractions-in-uom' },
+	{ label: 'Fractions in UOM', url: docsUrl + 'user/manual/en/stock/articles/managing-fractions-in-uom' },
 ]
 
 frappe.help.help_links['Form/Stock Reconciliation'] = [
-	{ label: 'Opening Stock Entry', url: 'https://frappe.github.io/erpnext/user/manual/en/stock/opening-stock' },
+	{ label: 'Opening Stock Entry', url: docsUrl + 'user/manual/en/stock/opening-stock' },
 ]
 
 //CRM
 
 frappe.help.help_links['Form/Lead'] = [
-	{ label: 'Lead', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/lead' },
+	{ label: 'Lead', url: docsUrl + 'user/manual/en/CRM/lead' },
 ]
 
 frappe.help.help_links['Form/Opportunity'] = [
-	{ label: 'Opportunity', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/opportunity' },
+	{ label: 'Opportunity', url: docsUrl + 'user/manual/en/CRM/opportunity' },
 ]
 
 frappe.help.help_links['Form/Address'] = [
-	{ label: 'Address', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/contact' },
+	{ label: 'Address', url: docsUrl + 'user/manual/en/CRM/contact' },
 ]
 
 frappe.help.help_links['Form/Contact'] = [
-	{ label: 'Contact', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/contact' },
+	{ label: 'Contact', url: docsUrl + 'user/manual/en/CRM/contact' },
 ]
 
 frappe.help.help_links['Form/Newsletter'] = [
-	{ label: 'Newsletter', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/newsletter' },
+	{ label: 'Newsletter', url: docsUrl + 'user/manual/en/CRM/newsletter' },
 ]
 
 frappe.help.help_links['Form/Campaign'] = [
-	{ label: 'Campaign', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/setup/campaign' },
+	{ label: 'Campaign', url: docsUrl + 'user/manual/en/CRM/setup/campaign' },
 ]
 
 frappe.help.help_links['Tree/Sales Person'] = [
-	{ label: 'Sales Person', url: 'https://frappe.github.io/erpnext/user/manual/en/CRM/setup/sales-person' },
+	{ label: 'Sales Person', url: docsUrl + 'user/manual/en/CRM/setup/sales-person' },
 ]
 
 frappe.help.help_links['Form/Sales Person'] = [
-	{ label: 'Sales Person Target', url: 'https://frappe.github.io/erpnext/user/manual/en/selling/setup/sales-person-target-allocation' },
+	{ label: 'Sales Person Target', url: docsUrl + 'user/manual/en/selling/setup/sales-person-target-allocation' },
 ]
 
 //Support
 
 frappe.help.help_links['List/Feedback Trigger'] = [
-	{ label: 'Feedback Trigger', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/feedback/setting-up-feedback' },
+	{ label: 'Feedback Trigger', url: docsUrl + 'user/manual/en/setting-up/feedback/setting-up-feedback' },
 ]
 
 frappe.help.help_links['List/Feedback Request'] = [
-	{ label: 'Feedback Request', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/feedback/submit-feedback' },
+	{ label: 'Feedback Request', url: docsUrl + 'user/manual/en/setting-up/feedback/submit-feedback' },
 ]
 
 frappe.help.help_links['List/Feedback Request'] = [
-	{ label: 'Feedback Request', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/feedback/submit-feedback' },
+	{ label: 'Feedback Request', url: docsUrl + 'user/manual/en/setting-up/feedback/submit-feedback' },
 ]
 
 //Manufacturing
 
 frappe.help.help_links['Form/BOM'] = [
-	{ label: 'Bill of Material', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/bill-of-materials' },
-	{ label: 'Nested BOM Structure', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/articles/nested-bom-structure' },
+	{ label: 'Bill of Material', url: docsUrl + 'user/manual/en/manufacturing/bill-of-materials' },
+	{ label: 'Nested BOM Structure', url: docsUrl + 'user/manual/en/manufacturing/articles/nested-bom-structure' },
 ]
 
 frappe.help.help_links['Form/Work Order'] = [
-	{ label: 'Work Order', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/work-order' },
+	{ label: 'Work Order', url: docsUrl + 'user/manual/en/manufacturing/work-order' },
 ]
 
 frappe.help.help_links['Form/Workstation'] = [
-	{ label: 'Workstation', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/workstation' },
+	{ label: 'Workstation', url: docsUrl + 'user/manual/en/manufacturing/workstation' },
 ]
 
 frappe.help.help_links['Form/Operation'] = [
-	{ label: 'Operation', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/operation' },
+	{ label: 'Operation', url: docsUrl + 'user/manual/en/manufacturing/operation' },
 ]
 
 frappe.help.help_links['Form/BOM Update Tool'] = [
-	{ label: 'BOM Update Tool', url: 'https://frappe.github.io/erpnext/user/manual/en/manufacturing/tools/bom-update-tool' },
+	{ label: 'BOM Update Tool', url: docsUrl + 'user/manual/en/manufacturing/tools/bom-update-tool' },
 ]
 
 //Customize
 
 frappe.help.help_links['Form/Customize Form'] = [
-	{ label: 'Custom Field', url: 'https://frappe.github.io/erpnext/user/manual/en/customize-erpnext/custom-field' },
-	{ label: 'Customize Field', url: 'https://frappe.github.io/erpnext/user/manual/en/customize-erpnext/customize-form' },
+	{ label: 'Custom Field', url: docsUrl + 'user/manual/en/customize-erpnext/custom-field' },
+	{ label: 'Customize Field', url: docsUrl + 'user/manual/en/customize-erpnext/customize-form' },
 ]
 
 frappe.help.help_links['Form/Custom Field'] = [
-	{ label: 'Custom Field', url: 'https://frappe.github.io/erpnext/user/manual/en/customize-erpnext/custom-field' },
+	{ label: 'Custom Field', url: docsUrl + 'user/manual/en/customize-erpnext/custom-field' },
 ]
 
 frappe.help.help_links['Form/Custom Field'] = [
-	{ label: 'Custom Field', url: 'https://frappe.github.io/erpnext/user/manual/en/customize-erpnext/custom-field' },
-]
\ No newline at end of file
+	{ label: 'Custom Field', url: docsUrl + 'user/manual/en/customize-erpnext/custom-field' },
+]
diff --git a/erpnext/public/js/utils/serial_no_batch_selector.js b/erpnext/public/js/utils/serial_no_batch_selector.js
index eabb81e..b94cdd8 100644
--- a/erpnext/public/js/utils/serial_no_batch_selector.js
+++ b/erpnext/public/js/utils/serial_no_batch_selector.js
@@ -208,6 +208,7 @@
 
 	map_row_values: function(row, values, number, qty_field, warehouse) {
 		row.qty = values[qty_field];
+		row.transfer_qty = flt(values[qty_field]) * flt(row.conversion_factor);
 		row[number] = values[number];
 		if(this.warehouse_details.type === 'Source Warehouse') {
 			row.s_warehouse = values.warehouse || warehouse;
diff --git a/erpnext/regional/__init__.py b/erpnext/regional/__init__.py
index 1bd3357..dc14d04 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/doctype/gst_settings/gst_settings.js b/erpnext/regional/doctype/gst_settings/gst_settings.js
index ab2358f..808f9bc 100644
--- a/erpnext/regional/doctype/gst_settings/gst_settings.js
+++ b/erpnext/regional/doctype/gst_settings/gst_settings.js
@@ -21,5 +21,23 @@
 				</tr>
 			</tbody></table>`
 		);
+	},
+
+	setup: function(frm) {
+		$.each(["cgst_account", "sgst_account", "igst_account", "cess_account"], function(i, field) {
+			frm.events.filter_accounts(frm, field);
+		});
+	},
+
+	filter_accounts: function(frm, account_field) {
+		frm.set_query(account_field, "gst_accounts", function(doc, cdt, cdn) {
+			var row = locals[cdt][cdn];
+			return {
+				filters: {
+					company: row.company,
+					is_group: 0
+				}
+			};
+		});
 	}
 });
diff --git a/erpnext/regional/france/utils.py b/erpnext/regional/france/utils.py
index 9e9f0ad..e4b72f6 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 4a9a211..46c874b 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/setup.py b/erpnext/regional/india/setup.py
index ec4da0d..a6d723a 100644
--- a/erpnext/regional/india/setup.py
+++ b/erpnext/regional/india/setup.py
@@ -5,7 +5,7 @@
 
 import frappe, os, json
 from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
-from frappe.permissions import add_permission
+from frappe.permissions import add_permission, update_permission_property
 from erpnext.regional.india import states
 from erpnext.accounts.utils import get_fiscal_year
 from frappe.utils import today
@@ -79,6 +79,9 @@
 def add_permissions():
 	for doctype in ('GST HSN Code', 'GST Settings'):
 		add_permission(doctype, 'All', 0)
+		add_permission(doctype, 'Accounts Manager', 0)
+		update_permission_property(doctype, 'Accounts Manager', 0, 'write', 1)
+		update_permission_property(doctype, 'Accounts Manager', 0, 'create', 1)
 
 def add_print_formats():
 	frappe.reload_doc("regional", "print_format", "gst_tax_invoice")
diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py
index 43ed868..e7d0d50 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 61ffadb..a01c6ce 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 1f84ccf..ec62ba2 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 bf01363..f2f430a 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 d32fd0c..f1ac951 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 35c643d..aab6db2 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 f2b7701..f2518f0 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 5d68b06..4d81a1e 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.py b/erpnext/setup/doctype/company/company.py
index 09ff5a8..c49c264 100644
--- a/erpnext/setup/doctype/company/company.py
+++ b/erpnext/setup/doctype/company/company.py
@@ -94,6 +94,9 @@
 
 		if frappe.flags.country_change:
 			install_country_fixtures(self.name)
+			self.create_default_tax_template()
+
+
 
 		if not frappe.db.get_value("Department", {"company": self.name}):
 			from erpnext.setup.setup_wizard.operations.install_fixtures import install_post_company_fixtures
@@ -336,6 +339,9 @@
 		frappe.db.sql("delete from tabDepartment where company=%s", self.name)
 		frappe.db.sql("delete from `tabTax Withholding Account` where company=%s", self.name)
 
+		frappe.db.sql("delete from `tabSales Taxes and Charges Template` where company=%s", self.name)
+		frappe.db.sql("delete from `tabPurchase Taxes and Charges Template` where company=%s", self.name)
+
 @frappe.whitelist()
 def enqueue_replace_abbr(company, old, new):
 	kwargs = dict(company=company, old=old, new=new)
diff --git a/erpnext/setup/doctype/company/company_dashboard.py b/erpnext/setup/doctype/company/company_dashboard.py
index 5efcf38..9b483dd 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 42528d8..3d0b2ff 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/page/welcome_to_erpnext/welcome_to_erpnext.html b/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html
index 57fce28..5808ce7 100644
--- a/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html
+++ b/erpnext/setup/page/welcome_to_erpnext/welcome_to_erpnext.html
@@ -22,7 +22,7 @@
 			<ul class="list-unstyled">
 				<li><a class="text-muted" href="#">{%= __("Go to the Desktop and start using ERPNext") %}</a></li>
 				<li><a class="text-muted" href="#modules/Learn">{%= __("View a list of all the help videos") %}</a></li>
-				<li><a class="text-muted" href="https://erpnext.org/docs/user" target="_blank">{%= __("Read the ERPNext Manual") %}</a></li>
+				<li><a class="text-muted" href="https://erpnext.com/docs/user" target="_blank">{%= __("Read the ERPNext Manual") %}</a></li>
 				<li><a class="text-muted" href="https://discuss.erpnext.com" target="_blank">{%= __("Community Forum") %}</a></li>
 			</ul>
 
diff --git a/erpnext/setup/setup_wizard/data/industry_type.py b/erpnext/setup/setup_wizard/data/industry_type.py
index 74a10ff..4fa9f8a 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/setup_wizard.py b/erpnext/setup/setup_wizard/setup_wizard.py
index e062e28..b293f5d 100644
--- a/erpnext/setup/setup_wizard/setup_wizard.py
+++ b/erpnext/setup/setup_wizard/setup_wizard.py
@@ -6,7 +6,7 @@
 import frappe
 from frappe import _
 
-from .operations import install_fixtures as fixtures, company_setup, taxes_setup, sample_data
+from .operations import install_fixtures as fixtures, company_setup, sample_data
 
 def get_setup_stages(args=None):
 	if frappe.db.sql("select name from tabCompany"):
@@ -37,18 +37,13 @@
 				]
 			},
 			{
-				'status': _('Setting up company and taxes'),
+				'status': _('Setting up company'),
 				'fail_msg': _('Failed to setup company'),
 				'tasks': [
 					{
 						'fn': setup_company,
 						'args': args,
 						'fail_msg': _("Failed to setup company")
-					},
-					{
-						'fn': setup_taxes,
-						'args': args,
-						'fail_msg': _("Failed to setup taxes")
 					}
 				]
 			},
@@ -94,9 +89,6 @@
 def setup_company(args):
 	fixtures.install_company(args)
 
-def setup_taxes(args):
-	taxes_setup.create_sales_tax(args)
-
 def setup_post_company_fixtures(args):
 	fixtures.install_post_company_fixtures(args)
 
@@ -132,7 +124,6 @@
 def setup_complete(args=None):
 	stage_fixtures(args)
 	setup_company(args)
-	setup_taxes(args)
 	setup_post_company_fixtures(args)
 	setup_defaults(args)
 	stage_four(args)
diff --git a/erpnext/setup/setup_wizard/utils.py b/erpnext/setup/setup_wizard/utils.py
index d821a12..e82bc96 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 63c32a4..beeb9eb 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 c571355..8e4f74d 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 6357b52..61e53d2 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 6cfb8af..adfab86 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 a517703..3832c82 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 a4eb2bb..472083b 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 @@
 
 		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 0f0b401..bb535c1 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 6b4ca18..7a34338 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 1578bb6..39fb024 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 @@
 					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 121f444..aa54a58 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 da2d819..21cb722 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 5493e54..f555db0 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 43340ce..abc04a8 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 7bd6fa8..282fc64 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 a48d48c..373d0a0 100644
--- a/erpnext/tests/test_woocommerce.py
+++ b/erpnext/tests/test_woocommerce.py
@@ -1,4 +1,5 @@
-import unittest, frappe, requests, os, time
+from __future__ import unicode_literals
+import unittest, frappe, requests, os, time, erpnext
 from erpnext.erpnext_integrations.connectors.woocommerce_connection import order
 
 class TestWoocommerce(unittest.TestCase):
diff --git a/erpnext/utilities/__init__.py b/erpnext/utilities/__init__.py
index 7912a59..618cc98 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 8ad042b..16391e0 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 2901d52..5cec3ca 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
@@ -33,7 +34,7 @@
 			help_links=[
 				{
 					"label": _("Chart of Accounts"),
-					"url": ["https://erpnext.org/docs/user/manual/en/accounts/chart-of-accounts"]
+					"url": ["https://erpnext.com/docs/user/manual/en/accounts/chart-of-accounts"]
 				},
 				{
 					"label": _("Opening Balances"),
@@ -56,7 +57,7 @@
 			help_links=[
 				{
 					"label": _('Learn More'),
-					"url": ["https://erpnext.org/docs/user/manual/en/setting-up/setting-company-sales-goal"]
+					"url": ["https://erpnext.com/docs/user/manual/en/setting-up/setting-company-sales-goal"]
 				}
 			]
 		),
@@ -80,7 +81,7 @@
 			help_links=[
 				{
 					"label": _('Learn More'),
-					"url": ["https://erpnext.org/docs/user/manual/en/CRM/customer.html"]
+					"url": ["https://erpnext.com/docs/user/manual/en/CRM/customer.html"]
 				}
 			]
 		),
@@ -123,7 +124,7 @@
 			help_links=[
 				{
 					"label": _('Learn More'),
-					"url": ["https://erpnext.org/docs/user/manual/en/buying/supplier"]
+					"url": ["https://erpnext.com/docs/user/manual/en/buying/supplier"]
 				},
 				{
 					"label": _('Customers and Suppliers'),
@@ -261,7 +262,7 @@
 			help_links=[
 				{
 					"label": _('Learn More'),
-					"url": ["https://erpnext.org/docs/user/manual/en/setting-up/users-and-permissions"]
+					"url": ["https://erpnext.com/docs/user/manual/en/setting-up/users-and-permissions"]
 				},
 				{
 					"label": _('Users and Permissions'),
diff --git a/erpnext/utilities/user_progress_utils.py b/erpnext/utilities/user_progress_utils.py
index a665c5d..b7c24a7 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 c65cddb..6b02e4e 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
 
 no_cache = 1
diff --git a/setup.py b/setup.py
index 71107a9..a864e73 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