From 225af4a4cb59566e117f33932a10ad08831462b0 Mon Sep 17 00:00:00 2001 From: neckos Date: Wed, 23 May 2018 17:13:53 +0300 Subject: [PATCH] unicode error in python3 (#14192) --- erpnext/manufacturing/doctype/work_order/work_order.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index a6d2baaed8..1cb215a23e 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -24,6 +24,8 @@ class StockOverProductionError(frappe.ValidationError): pass class OperationTooLongError(frappe.ValidationError): pass class ItemHasVariantError(frappe.ValidationError): pass +from six import string_types + form_grid_templates = { "operations": "templates/form_grid/work_order_grid.html" } @@ -660,10 +662,10 @@ def make_timesheet(work_order, company): @frappe.whitelist() def add_timesheet_detail(timesheet, args): - if isinstance(timesheet, unicode): + if isinstance(timesheet, string_types): timesheet = frappe.get_doc('Timesheet', timesheet) - if isinstance(args, unicode): + if isinstance(args, string_types): args = json.loads(args) timesheet.append('time_logs', args)