Merge pull request #13283 from achillesrasquinha/py3
string_types from basestirng
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py
index 4956b6e..1649494 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.py
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.py
@@ -13,6 +13,7 @@
from frappe.desk.notifications import clear_doctype_notifications
from erpnext.buying.utils import validate_for_items, check_for_closed_status
from erpnext.stock.utils import get_bin
+from six import string_types
form_grid_templates = {
"items": "templates/form_grid/item_grid.html"
@@ -407,7 +408,7 @@
@frappe.whitelist()
def make_rm_stock_entry(purchase_order, rm_items):
- if isinstance(rm_items, basestring):
+ if isinstance(rm_items, string_types):
rm_items_list = json.loads(rm_items)
else:
frappe.throw(_("No Items available for transfer"))
diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py
index fdfb0d3..2a767cc 100644
--- a/erpnext/manufacturing/doctype/production_plan/production_plan.py
+++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py
@@ -9,6 +9,7 @@
from erpnext.manufacturing.doctype.bom.bom import validate_bom_no
from frappe.utils import cstr, flt, cint, nowdate, add_days, comma_and, now_datetime
from erpnext.manufacturing.doctype.production_order.production_order import get_item_details
+from six import string_types
class ProductionPlan(Document):
def validate(self):
@@ -483,7 +484,7 @@
@frappe.whitelist()
def get_bin_details(row):
- if isinstance(row, basestring):
+ if isinstance(row, string_types):
row = frappe._dict(json.loads(row))
conditions = ""