string_types from basestirng

This commit is contained in:
Achilles Rasquinha 2018-03-12 19:15:29 +05:30
parent 0702f29860
commit cbfcb3e61d
2 changed files with 4 additions and 2 deletions

View File

@ -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"))

View File

@ -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 = ""