From cbfcb3e61d54bd30ea05cebde54b1f952286e448 Mon Sep 17 00:00:00 2001 From: Achilles Rasquinha Date: Mon, 12 Mar 2018 19:15:29 +0530 Subject: [PATCH] string_types from basestirng --- erpnext/buying/doctype/purchase_order/purchase_order.py | 3 ++- .../manufacturing/doctype/production_plan/production_plan.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 4956b6e626..1649494ce6 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -13,6 +13,7 @@ from erpnext.stock.stock_balance import update_bin_qty, get_ordered_qty 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 @@ def make_purchase_invoice(source_name, target_doc=None): @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 fdfb0d37ba..2a767ccd50 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py @@ -9,6 +9,7 @@ from frappe.model.document import Document 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 @@ class ProductionPlan(Document): @frappe.whitelist() def get_bin_details(row): - if isinstance(row, basestring): + if isinstance(row, string_types): row = frappe._dict(json.loads(row)) conditions = ""